From 068b808f2b31f0d3375aac9c72c1e9f6e2285c18 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Mon, 31 Aug 2020 18:02:41 +0200 Subject: [PATCH 4/4] misc: add workalendar translations (#18904) --- chrono/agendas/models.py | 3 +- chrono/settings.py | 5 ++- .../fr/LC_MESSAGES/django.po | 40 +++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 chrono/workalendar_locale/fr/LC_MESSAGES/django.po diff --git a/chrono/agendas/models.py b/chrono/agendas/models.py index 5665ade..f1aec20 100644 --- a/chrono/agendas/models.py +++ b/chrono/agendas/models.py @@ -1462,7 +1462,8 @@ class TimePeriodException(models.Model): ) if self.label: - exc_repr = u'%s (%s)' % (self.label, exc_repr) + label = _(self.label) if self.external else self.label + exc_repr = u'%s (%s)' % (label, exc_repr) return exc_repr diff --git a/chrono/settings.py b/chrono/settings.py index de44215..f7be5a0 100644 --- a/chrono/settings.py +++ b/chrono/settings.py @@ -95,7 +95,10 @@ USE_L10N = True USE_TZ = True -LOCALE_PATHS = (os.path.join(BASE_DIR, 'chrono', 'locale'),) +LOCALE_PATHS = ( + os.path.join(BASE_DIR, 'chrono', 'locale'), + os.path.join(BASE_DIR, 'chrono', 'workalendar_locale'), +) FORMAT_MODULE_PATH = 'chrono.formats' diff --git a/chrono/workalendar_locale/fr/LC_MESSAGES/django.po b/chrono/workalendar_locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..91700e6 --- /dev/null +++ b/chrono/workalendar_locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,40 @@ +msgid "" +msgstr "" +"Project-Id-Version: workalendar\n" +"Language: French\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "New year" +msgstr "Jour de l'An" + +msgid "Easter Monday" +msgstr "Lundi de Pâques" + +msgid "Labour Day" +msgstr "Fête du travail" + +msgid "Victory in Europe Day" +msgstr "Armistice 1945" + +msgid "Ascension Thursday" +msgstr "Ascension" + +msgid "Whit Monday" +msgstr "Lundi de Pentecôte" + +msgid "Bastille Day" +msgstr "Fête Nationale" + +msgid "Assumption of Mary to Heaven" +msgstr "Assomption" + +msgid "All Saints Day" +msgstr "Toussaint" + +msgid "Armistice Day" +msgstr "Armistice 1918" + +msgid "Christmas Day" +msgstr "Noël" -- 2.20.1