[boxes] closes #1832844: translate views category in possible views boxes stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 20 Jul 2011 14:09:42 +0200
branchstable
changeset 7670 6397a9051f65
parent 7654 5515807ac408
child 7671 d911a73ac8c5
child 7676 cc3987eb793c
child 7677 134613d3b353
[boxes] closes #1832844: translate views category in possible views boxes
i18n/de.po
i18n/en.po
i18n/es.po
i18n/fr.po
view.py
web/views/boxes.py
--- a/i18n/de.po	Tue Jul 12 12:22:03 2011 +0200
+++ b/i18n/de.po	Wed Jul 20 14:09:42 2011 +0200
@@ -1200,6 +1200,9 @@
 msgid "anonymous"
 msgstr "anonym"
 
+msgid "anyrsetview"
+msgstr ""
+
 msgid "april"
 msgstr "April"
 
@@ -2331,6 +2334,9 @@
 msgid "entity update"
 msgstr "Aktualisierung der Entität"
 
+msgid "entityview"
+msgstr ""
+
 msgid "error"
 msgstr ""
 
@@ -3759,6 +3765,9 @@
 msgid "startup views"
 msgstr "Start-Ansichten"
 
+msgid "startupview"
+msgstr ""
+
 msgid "state"
 msgstr "Zustand"
 
--- a/i18n/en.po	Tue Jul 12 12:22:03 2011 +0200
+++ b/i18n/en.po	Wed Jul 20 14:09:42 2011 +0200
@@ -1157,6 +1157,9 @@
 msgid "anonymous"
 msgstr ""
 
+msgid "anyrsetview"
+msgstr "rset views"
+
 msgid "april"
 msgstr ""
 
@@ -2275,6 +2278,9 @@
 msgid "entity update"
 msgstr ""
 
+msgid "entityview"
+msgstr "entity views"
+
 msgid "error"
 msgstr ""
 
@@ -3659,6 +3665,9 @@
 msgid "startup views"
 msgstr ""
 
+msgid "startupview"
+msgstr "startup views"
+
 msgid "state"
 msgstr ""
 
--- a/i18n/es.po	Tue Jul 12 12:22:03 2011 +0200
+++ b/i18n/es.po	Wed Jul 20 14:09:42 2011 +0200
@@ -1209,6 +1209,9 @@
 msgid "anonymous"
 msgstr "anónimo"
 
+msgid "anyrsetview"
+msgstr ""
+
 msgid "april"
 msgstr "Abril"
 
@@ -2373,6 +2376,9 @@
 msgid "entity update"
 msgstr "Actualización de la Entidad"
 
+msgid "entityview"
+msgstr ""
+
 msgid "error"
 msgstr "error"
 
@@ -3809,6 +3815,9 @@
 msgid "startup views"
 msgstr "Vistas de inicio"
 
+msgid "startupview"
+msgstr ""
+
 msgid "state"
 msgstr "Estado"
 
--- a/i18n/fr.po	Tue Jul 12 12:22:03 2011 +0200
+++ b/i18n/fr.po	Wed Jul 20 14:09:42 2011 +0200
@@ -1207,6 +1207,9 @@
 msgid "anonymous"
 msgstr "anonyme"
 
+msgid "anyrsetview"
+msgstr "vues \"tous les rset\""
+
 msgid "april"
 msgstr "avril"
 
@@ -2371,6 +2374,9 @@
 msgid "entity update"
 msgstr "mise à jour d'entité"
 
+msgid "entityview"
+msgstr "vues d'entité"
+
 msgid "error"
 msgstr "erreur"
 
@@ -3810,6 +3816,9 @@
 msgid "startup views"
 msgstr "vues de départ"
 
+msgid "startupview"
+msgstr "vues de départ"
+
 msgid "state"
 msgstr "état"
 
--- a/view.py	Tue Jul 12 12:22:03 2011 +0200
+++ b/view.py	Wed Jul 20 14:09:42 2011 +0200
@@ -371,7 +371,7 @@
 class EntityView(View):
     """base class for views applying on an entity (i.e. uniform result set)"""
     __select__ = non_final_entity()
-    category = 'entityview'
+    category = _('entityview')
 
     def call(self, **kwargs):
         if self.cw_rset is None:
@@ -392,7 +392,7 @@
     """
     __select__ = none_rset()
 
-    category = 'startupview'
+    category = _('startupview')
 
     def html_headers(self):
         """return a list of html headers (eg something to be inserted between
@@ -436,7 +436,7 @@
     """base class for views applying on any non empty result sets"""
     __select__ = nonempty_rset()
 
-    category = 'anyrsetview'
+    category = _('anyrsetview')
 
     def columns_labels(self, mainindex=0, tr=True):
         if tr:
--- a/web/views/boxes.py	Tue Jul 12 12:22:03 2011 +0200
+++ b/web/views/boxes.py	Wed Jul 20 14:09:42 2011 +0200
@@ -185,7 +185,7 @@
 
     def render_body(self, w):
         for category, views in box.sort_by_category(self.views):
-            menu = htmlwidgets.BoxMenu(category)
+            menu = htmlwidgets.BoxMenu(self._cw._(category))
             for view in views:
                 menu.append(self.action_link(view))
             self.append(menu)
@@ -208,6 +208,7 @@
             raise component.EmptyComponent()
         self.items = []
 
+
 class RsetBox(component.CtxComponent):
     """helper view class to display an rset in a sidebox"""
     __select__ = nonempty_rset() & match_kwargs('title', 'vid')