diff options
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 |