Renamed sort constant name and updated translations
authorThierry Florac <thierry.florac@onf.fr>
Tue, 15 Jan 2019 09:55:55 +0100
changeset 1235 3291493e9680
parent 1234 b58b0c89e016
child 1236 251275759b4c
Renamed sort constant name and updated translations
src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.mo
src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po
src/pyams_content/locales/pyams_content.pot
src/pyams_content/shared/view/interfaces.py
src/pyams_content/shared/view/merge.py
Binary file src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.mo has changed
--- a/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po	Mon Jan 14 17:29:43 2019 +0100
+++ b/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po	Tue Jan 15 09:55:55 2019 +0100
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2019-01-14 17:00+0100\n"
+"POT-Creation-Date: 2019-01-15 09:40+0100\n"
 "PO-Revision-Date: 2015-09-10 10:42+0200\n"
 "Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
 "Language-Team: French\n"
@@ -4173,18 +4173,22 @@
 msgstr "Vue"
 
 #: src/pyams_content/shared/view/interfaces.py:40
+#: src/pyams_content/shared/view/interfaces.py:52
 msgid "Published version creation date"
 msgstr "Date de création de la version publiée"
 
 #: src/pyams_content/shared/view/interfaces.py:41
+#: src/pyams_content/shared/view/interfaces.py:53
 msgid "Published version last update date"
 msgstr "Date de dernière modification de la version publiée"
 
 #: src/pyams_content/shared/view/interfaces.py:42
+#: src/pyams_content/shared/view/interfaces.py:54
 msgid "Current version publication date"
 msgstr "Date de publication de la version publiée"
 
 #: src/pyams_content/shared/view/interfaces.py:43
+#: src/pyams_content/shared/view/interfaces.py:55
 msgid "First version publication date"
 msgstr "Date de publication de la première version"
 
@@ -4192,24 +4196,6 @@
 msgid "Relevance (on user search)"
 msgstr "Pertinence (si recherche lancée par l'utilisateur)"
 
-#: src/pyams_content/shared/view/interfaces.py:52
-#: src/pyams_content/interfaces/__init__.py:113
-#: src/pyams_content/features/review/interfaces.py:74
-msgid "Creation date"
-msgstr "Date de création"
-
-#: src/pyams_content/shared/view/interfaces.py:53
-msgid "Last update date"
-msgstr "Date de dernière modification"
-
-#: src/pyams_content/shared/view/interfaces.py:54
-msgid "Current publication date"
-msgstr "Date de publication"
-
-#: src/pyams_content/shared/view/interfaces.py:55
-msgid "First publication date"
-msgstr "Date de première publication"
-
 #: src/pyams_content/shared/view/interfaces.py:73
 msgid "Select context path?"
 msgstr "A l'intérieur du contexte ?"
@@ -5687,6 +5673,11 @@
 msgid "Short name used in breadcrumbs"
 msgstr "Libellé utilisé dans le fil d'Ariane"
 
+#: src/pyams_content/interfaces/__init__.py:113
+#: src/pyams_content/features/review/interfaces.py:74
+msgid "Creation date"
+msgstr "Date de création"
+
 #: src/pyams_content/interfaces/__init__.py:117
 msgid "Modification date"
 msgstr "Dernière modification apportée"
@@ -6705,6 +6696,15 @@
 msgid "Don't inherit parent header"
 msgstr "Ne pas hériter de l'en-tête de pages du parent"
 
+#~ msgid "Last update date"
+#~ msgstr "Date de dernière modification"
+
+#~ msgid "Current publication date"
+#~ msgstr "Date de publication"
+
+#~ msgid "First publication date"
+#~ msgstr "Date de première publication"
+
 #~ msgid "Search folder internal references settings"
 #~ msgstr "Références internes du moteur de recherche"
 
--- a/src/pyams_content/locales/pyams_content.pot	Mon Jan 14 17:29:43 2019 +0100
+++ b/src/pyams_content/locales/pyams_content.pot	Tue Jan 15 09:55:55 2019 +0100
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2019-01-14 17:00+0100\n"
+"POT-Creation-Date: 2019-01-15 09:40+0100\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"
@@ -3897,18 +3897,22 @@
 msgstr ""
 
 #: ./src/pyams_content/shared/view/interfaces.py:40
+#: ./src/pyams_content/shared/view/interfaces.py:52
 msgid "Published version creation date"
 msgstr ""
 
 #: ./src/pyams_content/shared/view/interfaces.py:41
+#: ./src/pyams_content/shared/view/interfaces.py:53
 msgid "Published version last update date"
 msgstr ""
 
 #: ./src/pyams_content/shared/view/interfaces.py:42
+#: ./src/pyams_content/shared/view/interfaces.py:54
 msgid "Current version publication date"
 msgstr ""
 
 #: ./src/pyams_content/shared/view/interfaces.py:43
+#: ./src/pyams_content/shared/view/interfaces.py:55
 msgid "First version publication date"
 msgstr ""
 
@@ -3916,24 +3920,6 @@
 msgid "Relevance (on user search)"
 msgstr ""
 
-#: ./src/pyams_content/shared/view/interfaces.py:52
-#: ./src/pyams_content/interfaces/__init__.py:113
-#: ./src/pyams_content/features/review/interfaces.py:74
-msgid "Creation date"
-msgstr ""
-
-#: ./src/pyams_content/shared/view/interfaces.py:53
-msgid "Last update date"
-msgstr ""
-
-#: ./src/pyams_content/shared/view/interfaces.py:54
-msgid "Current publication date"
-msgstr ""
-
-#: ./src/pyams_content/shared/view/interfaces.py:55
-msgid "First publication date"
-msgstr ""
-
 #: ./src/pyams_content/shared/view/interfaces.py:73
 msgid "Select context path?"
 msgstr ""
@@ -5300,6 +5286,11 @@
 msgid "Short name used in breadcrumbs"
 msgstr ""
 
+#: ./src/pyams_content/interfaces/__init__.py:113
+#: ./src/pyams_content/features/review/interfaces.py:74
+msgid "Creation date"
+msgstr ""
+
 #: ./src/pyams_content/interfaces/__init__.py:117
 msgid "Modification date"
 msgstr ""
--- a/src/pyams_content/shared/view/interfaces.py	Mon Jan 14 17:29:43 2019 +0100
+++ b/src/pyams_content/shared/view/interfaces.py	Tue Jan 15 09:55:55 2019 +0100
@@ -34,13 +34,13 @@
 CREATION_DATE_ORDER = 'created_date'
 UPDATE_DATE_ORDER = 'modified_date'
 PUBLICATION_DATE_ORDER = 'publication_date'
-FIRSTPUBLICATION_DATE_ORDER = 'first_publication_date'
+FIRST_PUBLICATION_DATE_ORDER = 'first_publication_date'
 
 VIEW_ORDERS = (
     {'id': CREATION_DATE_ORDER, 'title': _("Published version creation date")},
     {'id': UPDATE_DATE_ORDER, 'title': _("Published version last update date")},
     {'id': PUBLICATION_DATE_ORDER, 'title': _("Current version publication date")},
-    {'id': FIRSTPUBLICATION_DATE_ORDER, 'title': _("First version publication date")}
+    {'id': FIRST_PUBLICATION_DATE_ORDER, 'title': _("First version publication date")}
 )
 
 VIEW_ORDER_VOCABULARY = SimpleVocabulary([SimpleTerm(item['id'], title=item['title'])
@@ -49,10 +49,10 @@
 
 USER_VIEW_ORDERS = (
     {'id': RELEVANCE_ORDER, 'title': _("Relevance (on user search)")},
-    {'id': CREATION_DATE_ORDER, 'title': _("Creation date")},
-    {'id': UPDATE_DATE_ORDER, 'title': _("Last update date")},
-    {'id': PUBLICATION_DATE_ORDER, 'title': _("Current publication date")},
-    {'id': FIRSTPUBLICATION_DATE_ORDER, 'title': _("First publication date")}
+    {'id': CREATION_DATE_ORDER, 'title': _("Published version creation date")},
+    {'id': UPDATE_DATE_ORDER, 'title': _("Published version last update date")},
+    {'id': PUBLICATION_DATE_ORDER, 'title': _("Current version publication date")},
+    {'id': FIRST_PUBLICATION_DATE_ORDER, 'title': _("First version publication date")}
 )
 
 USER_VIEW_ORDER_VOCABULARY = SimpleVocabulary([SimpleTerm(item['id'], title=item['title'])
@@ -109,7 +109,7 @@
                       description=_("Property to use to sort results"),
                       vocabulary=VIEW_ORDER_VOCABULARY,
                       required=True,
-                      default=FIRSTPUBLICATION_DATE_ORDER)
+                      default=FIRST_PUBLICATION_DATE_ORDER)
 
     reversed_order = Bool(title=_("Reversed order?"),
                           description=_("If 'yes', items order will be reversed"),
--- a/src/pyams_content/shared/view/merge.py	Mon Jan 14 17:29:43 2019 +0100
+++ b/src/pyams_content/shared/view/merge.py	Tue Jan 15 09:55:55 2019 +0100
@@ -19,7 +19,7 @@
 from zope.componentvocabulary.vocabulary import UtilityTerm, UtilityVocabulary
 from zope.dublincore.interfaces import IZopeDublinCore
 
-from pyams_content.shared.view.interfaces import CREATION_DATE_ORDER, FIRSTPUBLICATION_DATE_ORDER, IViewsMerger, \
+from pyams_content.shared.view.interfaces import CREATION_DATE_ORDER, FIRST_PUBLICATION_DATE_ORDER, IViewsMerger, \
     PUBLICATION_DATE_ORDER, UPDATE_DATE_ORDER, VIEWS_MERGERS_VOCABULARY
 from pyams_utils.registry import utility_config
 from pyams_utils.request import check_request
@@ -142,10 +142,10 @@
     sort_key = lambda x: IWorkflowPublicationInfo(x).publication_date
 
 
-@utility_config(name='{0}.sort'.format(FIRSTPUBLICATION_DATE_ORDER), provides=IViewsMerger)
+@utility_config(name='{0}.sort'.format(FIRST_PUBLICATION_DATE_ORDER), provides=IViewsMerger)
 class FirstPublicationDateSortedMergeMode(SortedMergeMode):
     """Merge pre-sorted views by first publication date"""
 
     label = _("Sort all results by first publication date")
-    sort_index = FIRSTPUBLICATION_DATE_ORDER
+    sort_index = FIRST_PUBLICATION_DATE_ORDER
     sort_key = lambda x: IWorkflowPublicationInfo(x).first_publication_date