diff options
author | David A. Madore <david+git@madore.org> | 2011-09-09 17:45:16 +0200 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2011-09-09 17:45:16 +0200 |
commit | 06f6678ad24551ae2c66c3d9db0cbfa6fff6497a (patch) | |
tree | f4c17e41c987cfaedc030f6c34e6dcef9908390f /org | |
parent | dfc13a2f08bb94dae813b52bc9c129bc7904b66e (diff) | |
download | damlengine-06f6678ad24551ae2c66c3d9db0cbfa6fff6497a.tar.gz damlengine-06f6678ad24551ae2c66c3d9db0cbfa6fff6497a.tar.bz2 damlengine-06f6678ad24551ae2c66c3d9db0cbfa6fff6497a.zip |
Put title attributes on category links.
Diffstat (limited to 'org')
-rw-r--r-- | org/madore/damlengine/TodoCategories.java | 2 | ||||
-rw-r--r-- | org/madore/damlengine/TodoWeblogSelectionElement.java | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/org/madore/damlengine/TodoCategories.java b/org/madore/damlengine/TodoCategories.java index 3219e82..cc104e8 100644 --- a/org/madore/damlengine/TodoCategories.java +++ b/org/madore/damlengine/TodoCategories.java @@ -45,6 +45,8 @@ public final class TodoCategories extends TodoElement { String target1URL = ((ctx.gc.uriToTop==null)?"":(ctx.gc.uriToTop+"weblog/")) + cat + ".html"; a1.setAttributeNS(null, "href", target1URL); + a1.setAttributeNS(null, "title", + TodoWeblogSelectionElement.categoryName(cat, lang)); p.appendChild(a1); a1.appendChild(ctx.doc.createTextNode(cat)); p.appendChild(ctx.doc.createTextNode("(")); diff --git a/org/madore/damlengine/TodoWeblogSelectionElement.java b/org/madore/damlengine/TodoWeblogSelectionElement.java index a7b3490..05d5710 100644 --- a/org/madore/damlengine/TodoWeblogSelectionElement.java +++ b/org/madore/damlengine/TodoWeblogSelectionElement.java @@ -44,18 +44,24 @@ public final class TodoWeblogSelectionElement extends TodoDefaultElement { categoryNames = new HashMap<String,Map<String,String>>(); categoryNames.put("en", new HashMap<String,String>()); categoryNames.put("fr", new HashMap<String,String>()); + categoryNames.put("de", new HashMap<String,String>()); + categoryNames.put("ia", new HashMap<String,String>()); categoryNames.get("en").put("glf", "Gratuitous Literary Fragments"); - categoryNames.get("fr").put("glf", "Fragments lit\u00e9raires gratuits"); + categoryNames.get("fr").put("glf", "Fragments litt\u00e9raires gratuits"); + categoryNames.get("ia").put("glf", "Fragmentos litterari gratuite"); categoryNames.get("en").put("math", "Mathematics"); categoryNames.get("fr").put("math", "Math\u00e9matiques"); categoryNames.get("en").put("phys", "Physics"); categoryNames.get("fr").put("phys", "Physique"); } - public String categoryName(String code, String lang) { + public static String categoryName(String code, String lang) { if ( categoryNames.get(lang) == null ) return code; - return categoryNames.get(lang).get(code); + String name = categoryNames.get(lang).get(code); + if ( name == null ) + return code; + return name; } @Override |