changeset 64:5b156d90317f

remove support for translated item names (only used by cfg.item_root still) see reasoning in cs 14832b8cc7ed
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 02 Mar 2011 03:22:09 +0100
parents 14832b8cc7ed
children 21cc311e30a8 9ca492c52070
files MoinMoin/templates/layout.html MoinMoin/themes/__init__.py
diffstat 2 files changed, 2 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/layout.html	Wed Mar 02 03:06:55 2011 +0100
+++ b/MoinMoin/templates/layout.html	Wed Mar 02 03:22:09 2011 +0100
@@ -30,7 +30,7 @@
 
     {% if logo %}
     <div id="moin-logo">
-        <a href="{{ url_for('frontend.show_item', item_name=theme_supp.translated_item_name(cfg.item_root)) }}">{{ logo }}</a>
+        <a href="{{ url_for('frontend.show_item', item_name=cfg.item_root) }}">{{ logo }}</a>
     </div>
     {% endif %}
 
@@ -64,7 +64,7 @@
     <div id="moin-locationline">
         {% if cfg.show_interwiki -%}
         <span id="moin-interwiki">
-            <a href="{{ url_for('frontend.show_item', item_name=theme_supp.translated_item_name(cfg.item_root)) }}" rel="nofollow">
+            <a href="{{ url_for('frontend.show_item', item_name=cfg.item_root) }}" rel="nofollow">
                 {% if cfg.interwikiname %}{{ cfg.interwikiname }}{% else %}Self{% endif %}
             </a>
             <span class="sep">: </span>
--- a/MoinMoin/themes/__init__.py	Wed Mar 02 03:06:55 2011 +0100
+++ b/MoinMoin/themes/__init__.py	Wed Mar 02 03:22:09 2011 +0100
@@ -70,23 +70,6 @@
         self.content_dir = 'ltr' # XXX
         self.meta_items = [] # list of (name, content) for html head <meta>
 
-    def translated_item_name(self, item_en):
-        """
-        Get a translated item name.
-        If a translated item exists return its name, if not return item name in English.
-
-        :param item_name: unicode
-        :rtype: unicode
-        """
-        item_lang_request = _(item_en)
-        if self.storage.has_item(item_lang_request):
-            return item_lang_request
-
-        item_lang_default = item_en # FIXME, was: i18n.getText(item_en, request, self.cfg.language_default)
-        if self.storage.has_item(item_lang_default):
-            return item_lang_default
-        return item_en
-
     def location_breadcrumbs(self, item_name):
         """
         Assemble the location using breadcrumbs (was: title)