Updated form title
authorThierry Florac <thierry.florac@onf.fr>
Tue, 04 Sep 2018 14:48:00 +0200
changeset 176 4ac5a1814dc0
parent 175 f91042366ca4
child 177 27cf196f066c
Updated form title
src/pyams_portal/locales/fr/LC_MESSAGES/pyams_portal.mo
src/pyams_portal/locales/fr/LC_MESSAGES/pyams_portal.po
src/pyams_portal/locales/pyams_portal.pot
src/pyams_portal/zmi/portlet.py
Binary file src/pyams_portal/locales/fr/LC_MESSAGES/pyams_portal.mo has changed
--- a/src/pyams_portal/locales/fr/LC_MESSAGES/pyams_portal.po	Tue Sep 04 13:54:54 2018 +0200
+++ b/src/pyams_portal/locales/fr/LC_MESSAGES/pyams_portal.po	Tue Sep 04 14:48:00 2018 +0200
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-09-04 12:03+0200\n"
+"POT-Creation-Date: 2018-09-04 14:12+0200\n"
 "PO-Revision-Date: 2015-05-12 12:10+0200\n"
 "Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
 "Language-Team: French <traduc@traduc.org>\n"
@@ -28,11 +28,11 @@
 msgid "Portal templates manager"
 msgstr "Gestionnaire des modèles"
 
-#: src/pyams_portal/zmi/portlet.py:59
+#: src/pyams_portal/zmi/portlet.py:62
 msgid "Edit portlet settings"
 msgstr "Propriétés du composant"
 
-#: src/pyams_portal/zmi/portlet.py:105
+#: src/pyams_portal/zmi/portlet.py:108
 msgid ""
 "WARNING: Portlet properties are saved automatically when changing inherit "
 "mode!!"
@@ -41,29 +41,34 @@
 "modèle ou du parent en (dé)cochant la case ci-dessous, cette modification "
 "est enregistrée immédiatement sans attendre votre confirmation !!"
 
-#: src/pyams_portal/zmi/portlet.py:115
+#: src/pyams_portal/zmi/portlet.py:118
 msgid "Main properties"
 msgstr "Propriétés"
 
-#: src/pyams_portal/zmi/portlet.py:173
+#: src/pyams_portal/zmi/portlet.py:176
 #: src/pyams_portal/zmi/templates/renderer-input.pt:4
 msgid "Edit renderer properties"
 msgstr "Propriétés de ce mode de rendu"
 
-#: src/pyams_portal/zmi/portlet.py:80 src/pyams_portal/zmi/portlet.py:86
+#: src/pyams_portal/zmi/portlet.py:83 src/pyams_portal/zmi/portlet.py:89
 msgid "Override template settings"
-msgstr "Remplacer le paramétrage du modèle"
+msgstr "Remplacer le paramétrage du modèle sélectionné"
+
+#: src/pyams_portal/zmi/portlet.py:87
+msgid "Override parent settings"
+msgstr "Remplacer le paramétrage du modèle du parent"
 
-#: src/pyams_portal/zmi/portlet.py:56
+#: src/pyams_portal/zmi/portlet.py:57
+#, python-format
+msgid "Local portal template - {0}"
+msgstr "Modèle de présentation local  - {0}"
+
+#: src/pyams_portal/zmi/portlet.py:59
 #, python-format
 msgid "« {0} »  portal template - {1}"
 msgstr "Modèle de présentation « {0} »  - {1}"
 
-#: src/pyams_portal/zmi/portlet.py:84
-msgid "Override parent settings"
-msgstr "Remplacer le paramétrage du parent"
-
-#: src/pyams_portal/zmi/portlet.py:153
+#: src/pyams_portal/zmi/portlet.py:156
 msgid ""
 "You changed renderer selection. Don't omit to update new renderer "
 "properties..."
@@ -132,13 +137,13 @@
 msgid "Presentation template"
 msgstr "Présentation"
 
-#: src/pyams_portal/zmi/template.py:167 src/pyams_portal/zmi/layout.py:278
-#: src/pyams_portal/zmi/layout.py:647
+#: src/pyams_portal/zmi/template.py:167 src/pyams_portal/zmi/layout.py:277
+#: src/pyams_portal/zmi/layout.py:646
 msgid "Specified name is already used!"
 msgstr "Le nom indiqué est déjà utilisé !"
 
-#: src/pyams_portal/zmi/template.py:111 src/pyams_portal/zmi/layout.py:242
-#: src/pyams_portal/zmi/layout.py:323 src/pyams_portal/zmi/layout.py:407
+#: src/pyams_portal/zmi/template.py:111 src/pyams_portal/zmi/layout.py:241
+#: src/pyams_portal/zmi/layout.py:322 src/pyams_portal/zmi/layout.py:406
 #, python-format
 msgid "« {0} »  portal template"
 msgstr "Modèle de présentation « {0} »"
@@ -148,71 +153,71 @@
 msgid "{0} (local template)"
 msgstr "{0} (modèle local)"
 
-#: src/pyams_portal/zmi/layout.py:83
+#: src/pyams_portal/zmi/layout.py:82
 msgid "Properties"
 msgstr "Propriétés"
 
-#: src/pyams_portal/zmi/layout.py:184
+#: src/pyams_portal/zmi/layout.py:183
 msgid "Add row..."
 msgstr "Ajouter une ligne"
 
-#: src/pyams_portal/zmi/layout.py:226
+#: src/pyams_portal/zmi/layout.py:225
 msgid "Add slot..."
 msgstr "Ajouter un panneau"
 
-#: src/pyams_portal/zmi/layout.py:244
+#: src/pyams_portal/zmi/layout.py:243
 msgid "Add slot"
 msgstr "Ajouter un panneau"
 
-#: src/pyams_portal/zmi/layout.py:391
+#: src/pyams_portal/zmi/layout.py:390
 msgid "Add portlet..."
 msgstr "Ajouter un composant"
 
-#: src/pyams_portal/zmi/layout.py:409
+#: src/pyams_portal/zmi/layout.py:408
 msgid "Add portlet"
 msgstr "Ajouter un composant"
 
-#: src/pyams_portal/zmi/layout.py:586
+#: src/pyams_portal/zmi/layout.py:585
 msgid "Duplicate template..."
 msgstr "Dupliquer le modèle"
 
-#: src/pyams_portal/zmi/layout.py:606
+#: src/pyams_portal/zmi/layout.py:605
 msgid "Duplicate template"
 msgstr "Dupliquer le modèle"
 
-#: src/pyams_portal/zmi/layout.py:73
+#: src/pyams_portal/zmi/layout.py:72
 msgid "Template management"
 msgstr "Ce modèle"
 
-#: src/pyams_portal/zmi/layout.py:110
+#: src/pyams_portal/zmi/layout.py:109
 msgid "Template configuration"
 msgstr "Configuration d'un modèle"
 
-#: src/pyams_portal/zmi/layout.py:596
+#: src/pyams_portal/zmi/layout.py:595
 msgid "Cancel"
 msgstr "Annuler"
 
-#: src/pyams_portal/zmi/layout.py:597
+#: src/pyams_portal/zmi/layout.py:596
 msgid "Duplicate this template"
 msgstr "Dupliquer ce modèle"
 
-#: src/pyams_portal/zmi/layout.py:617
+#: src/pyams_portal/zmi/layout.py:616
 msgid "New template name"
 msgstr "Nom du nouveau modèle"
 
-#: src/pyams_portal/zmi/layout.py:102
+#: src/pyams_portal/zmi/layout.py:101
 msgid "Local template configuration"
 msgstr "Configuration d'un modèle local"
 
-#: src/pyams_portal/zmi/layout.py:153
+#: src/pyams_portal/zmi/layout.py:152
 msgid "{{ missing portlet }}"
 msgstr "{{ composant indisponible }}"
 
-#: src/pyams_portal/zmi/layout.py:105
+#: src/pyams_portal/zmi/layout.py:104
 msgid "Inherited local template configuration"
 msgstr "Configuration d'un modèle local hérité"
 
-#: src/pyams_portal/zmi/layout.py:144
+#: src/pyams_portal/zmi/layout.py:143
 #, python-format
 msgid ""
 "Add component: {0}<br />Drag and drop button to page template to position "
@@ -221,12 +226,12 @@
 "Ajouter un composant : <strong>{0}</strong><br />Faire un glisser/déposer du "
 "bouton dans le modèle de présentation pour positionner le nouveau composant."
 
-#: src/pyams_portal/zmi/layout.py:328
+#: src/pyams_portal/zmi/layout.py:327
 #, python-format
 msgid "Edit « {0} » slot properties"
 msgstr "Propriétés du panneau « {0} »"
 
-#: src/pyams_portal/zmi/layout.py:108
+#: src/pyams_portal/zmi/layout.py:107
 #, python-format
 msgid "Shared template configuration ({0})"
 msgstr "Configuration d'un modèle partagé ({0})"
--- a/src/pyams_portal/locales/pyams_portal.pot	Tue Sep 04 13:54:54 2018 +0200
+++ b/src/pyams_portal/locales/pyams_portal.pot	Tue Sep 04 14:48:00 2018 +0200
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-09-04 12:03+0200\n"
+"POT-Creation-Date: 2018-09-04 14:12+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -28,39 +28,44 @@
 msgid "Portal templates manager"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/portlet.py:59
+#: ./src/pyams_portal/zmi/portlet.py:62
 msgid "Edit portlet settings"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/portlet.py:105
+#: ./src/pyams_portal/zmi/portlet.py:108
 msgid ""
 "WARNING: Portlet properties are saved automatically when changing inherit "
 "mode!!"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/portlet.py:115
+#: ./src/pyams_portal/zmi/portlet.py:118
 msgid "Main properties"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/portlet.py:173
+#: ./src/pyams_portal/zmi/portlet.py:176
 #: ./src/pyams_portal/zmi/templates/renderer-input.pt:4
 msgid "Edit renderer properties"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/portlet.py:80 ./src/pyams_portal/zmi/portlet.py:86
+#: ./src/pyams_portal/zmi/portlet.py:83 ./src/pyams_portal/zmi/portlet.py:89
 msgid "Override template settings"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/portlet.py:56
+#: ./src/pyams_portal/zmi/portlet.py:87
+msgid "Override parent settings"
+msgstr ""
+
+#: ./src/pyams_portal/zmi/portlet.py:57
+#, python-format
+msgid "Local portal template - {0}"
+msgstr ""
+
+#: ./src/pyams_portal/zmi/portlet.py:59
 #, python-format
 msgid "« {0} »  portal template - {1}"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/portlet.py:84
-msgid "Override parent settings"
-msgstr ""
-
-#: ./src/pyams_portal/zmi/portlet.py:153
+#: ./src/pyams_portal/zmi/portlet.py:156
 msgid ""
 "You changed renderer selection. Don't omit to update new renderer "
 "properties..."
@@ -114,13 +119,13 @@
 msgid "Presentation template"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/template.py:167 ./src/pyams_portal/zmi/layout.py:278
-#: ./src/pyams_portal/zmi/layout.py:647
+#: ./src/pyams_portal/zmi/template.py:167 ./src/pyams_portal/zmi/layout.py:277
+#: ./src/pyams_portal/zmi/layout.py:646
 msgid "Specified name is already used!"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/template.py:111 ./src/pyams_portal/zmi/layout.py:242
-#: ./src/pyams_portal/zmi/layout.py:323 ./src/pyams_portal/zmi/layout.py:407
+#: ./src/pyams_portal/zmi/template.py:111 ./src/pyams_portal/zmi/layout.py:241
+#: ./src/pyams_portal/zmi/layout.py:322 ./src/pyams_portal/zmi/layout.py:406
 #, python-format
 msgid "« {0} »  portal template"
 msgstr ""
@@ -130,83 +135,83 @@
 msgid "{0} (local template)"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:83
+#: ./src/pyams_portal/zmi/layout.py:82
 msgid "Properties"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:184
+#: ./src/pyams_portal/zmi/layout.py:183
 msgid "Add row..."
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:226
+#: ./src/pyams_portal/zmi/layout.py:225
 msgid "Add slot..."
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:244
+#: ./src/pyams_portal/zmi/layout.py:243
 msgid "Add slot"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:391
+#: ./src/pyams_portal/zmi/layout.py:390
 msgid "Add portlet..."
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:409
+#: ./src/pyams_portal/zmi/layout.py:408
 msgid "Add portlet"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:586
+#: ./src/pyams_portal/zmi/layout.py:585
 msgid "Duplicate template..."
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:606
+#: ./src/pyams_portal/zmi/layout.py:605
 msgid "Duplicate template"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:73
+#: ./src/pyams_portal/zmi/layout.py:72
 msgid "Template management"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:110
+#: ./src/pyams_portal/zmi/layout.py:109
 msgid "Template configuration"
 msgstr ""
 
+#: ./src/pyams_portal/zmi/layout.py:595
+msgid "Cancel"
+msgstr ""
+
 #: ./src/pyams_portal/zmi/layout.py:596
-msgid "Cancel"
-msgstr ""
-
-#: ./src/pyams_portal/zmi/layout.py:597
 msgid "Duplicate this template"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:617
+#: ./src/pyams_portal/zmi/layout.py:616
 msgid "New template name"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:102
+#: ./src/pyams_portal/zmi/layout.py:101
 msgid "Local template configuration"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:153
+#: ./src/pyams_portal/zmi/layout.py:152
 msgid "{{ missing portlet }}"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:105
+#: ./src/pyams_portal/zmi/layout.py:104
 msgid "Inherited local template configuration"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:144
+#: ./src/pyams_portal/zmi/layout.py:143
 #, python-format
 msgid ""
 "Add component: {0}<br />Drag and drop button to page template to position new"
 " row"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:328
+#: ./src/pyams_portal/zmi/layout.py:327
 #, python-format
 msgid "Edit « {0} » slot properties"
 msgstr ""
 
-#: ./src/pyams_portal/zmi/layout.py:108
+#: ./src/pyams_portal/zmi/layout.py:107
 #, python-format
 msgid "Shared template configuration ({0})"
 msgstr ""
--- a/src/pyams_portal/zmi/portlet.py	Tue Sep 04 13:54:54 2018 +0200
+++ b/src/pyams_portal/zmi/portlet.py	Tue Sep 04 14:48:00 2018 +0200
@@ -15,30 +15,29 @@
 
 # import standard library
 
-# import interfaces
-from pyams_form.interfaces.form import IInnerTabForm, IFormHelp
-from pyams_portal.interfaces import IPortlet, IPortalTemplate, IPortalPage, MANAGE_TEMPLATE_PERMISSION, \
-    IPortletSettings, IPortletRendererSettings
-from pyams_skin.layer import IPyAMSLayer
-from pyams_zmi.interfaces import IPropertiesEditForm
-from pyams_zmi.layer import IAdminLayer
+from pyramid.decorator import reify
+from z3c.form import field
 from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer, Interface
 
 # import packages
 from pyams_form.form import ajax_config
 from pyams_form.help import FormHelp
+# import interfaces
+from pyams_form.interfaces.form import IInnerTabForm, IFormHelp
 from pyams_pagelet.pagelet import pagelet_config
+from pyams_portal import _
+from pyams_portal.interfaces import IPortlet, IPortalTemplate, IPortalPage, MANAGE_TEMPLATE_PERMISSION, \
+    IPortletSettings, IPortletRendererSettings, LOCAL_TEMPLATE_NAME
 from pyams_portal.zmi.widget import PortletRendererFieldWidget
 from pyams_skin.event import get_json_widget_refresh_event
+from pyams_skin.layer import IPyAMSLayer
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
 from pyams_utils.url import absolute_url
 from pyams_zmi.form import AdminDialogEditForm, InnerAdminEditForm
-from pyramid.decorator import reify
-from z3c.form import field
-from zope.interface import implementer, Interface
-
-from pyams_portal import _
+from pyams_zmi.interfaces import IPropertiesEditForm
+from pyams_zmi.layer import IAdminLayer
 
 
 @template_config(template='templates/portlet.pt', layer=IPyAMSLayer)
@@ -53,8 +52,11 @@
         parent = self.configuration.__parent__
         if not IPortalTemplate.providedBy(parent):
             parent = IPortalPage(parent).template
-        return translate(_("« {0} »  portal template - {1}")).format(parent.name,
-                                                                     translate(self.portlet.label))
+        if parent.name == LOCAL_TEMPLATE_NAME:
+            return translate(_("Local portal template - {0}")).format(translate(self.portlet.label))
+        else:
+            return translate(_("« {0} »  portal template - {1}")).format(parent.name,
+                                                                         translate(self.portlet.label))
 
     legend = _("Edit portlet settings")
     dialog_class = 'modal-large'