Projet

Général

Profil

0001-change-workalendar-translations-setup-48028.patch

Valentin Deniaud, 26 octobre 2020 15:13

Télécharger (3,66 ko)

Voir les différences:

Subject: [PATCH] change workalendar translations setup (#48028)

 MANIFEST.in                                   |  1 -
 chrono/settings.py                            |  5 +--
 .../fr/LC_MESSAGES/django.po                  | 40 -------------------
 chrono/workalendar_locales.py                 | 34 ++++++++++++++++
 4 files changed, 35 insertions(+), 45 deletions(-)
 delete mode 100644 chrono/workalendar_locale/fr/LC_MESSAGES/django.po
 create mode 100644 chrono/workalendar_locales.py
MANIFEST.in
1 1
# locales
2 2
recursive-include chrono/locale *.po *.mo
3
recursive-include chrono/workalendar_locale *.po *.mo
4 3

  
5 4
# static
6 5
recursive-include chrono/manager/static *.css *.scss *.js
chrono/settings.py
95 95

  
96 96
USE_TZ = True
97 97

  
98
LOCALE_PATHS = (
99
    os.path.join(BASE_DIR, 'chrono', 'locale'),
100
    os.path.join(BASE_DIR, 'chrono', 'workalendar_locale'),
101
)
98
LOCALE_PATHS = (os.path.join(BASE_DIR, 'chrono', 'locale'),)
102 99

  
103 100
FORMAT_MODULE_PATH = 'chrono.formats'
104 101

  
chrono/workalendar_locale/fr/LC_MESSAGES/django.po
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: workalendar\n"
4
"Language: French\n"
5
"MIME-Version: 1.0\n"
6
"Content-Type: text/plain; charset=UTF-8\n"
7
"Content-Transfer-Encoding: 8bit\n"
8

  
9
msgid "New year"
10
msgstr "Jour de l'An"
11

  
12
msgid "Easter Monday"
13
msgstr "Lundi de Pâques"
14

  
15
msgid "Labour Day"
16
msgstr "Fête du travail"
17

  
18
msgid "Victory in Europe Day"
19
msgstr "Armistice 1945"
20

  
21
msgid "Ascension Thursday"
22
msgstr "Ascension"
23

  
24
msgid "Whit Monday"
25
msgstr "Lundi de Pentecôte"
26

  
27
msgid "Bastille Day"
28
msgstr "Fête Nationale"
29

  
30
msgid "Assumption of Mary to Heaven"
31
msgstr "Assomption"
32

  
33
msgid "All Saints Day"
34
msgstr "Toussaint"
35

  
36
msgid "Armistice Day"
37
msgstr "Armistice 1918"
38

  
39
msgid "Christmas Day"
40
msgstr "Noël"
chrono/workalendar_locales.py
1
# chrono - agendas system
2
# Copyright (C) 2020  Entr'ouvert
3
#
4
# This program is free software: you can redistribute it and/or modify it
5
# under the terms of the GNU Affero General Public License as published
6
# by the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU Affero General Public License for more details.
13
#
14
# You should have received a copy of the GNU Affero General Public License
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16

  
17
"""
18
Do nothing but register strings from workalendar module for translations.
19
"""
20
from django.utils.translation import ugettext_lazy as _
21

  
22

  
23
def translations():
24
    _('All Saints Day')
25
    _('Armistice Day')
26
    _('Ascension Thursday')
27
    _('Assumption of Mary to Heaven')
28
    _('Bastille Day')
29
    _('Christmas Day')
30
    _('Easter Monday')
31
    _('Labour Day')
32
    _('New year')
33
    _('Victory in Europe Day')
34
    _('Whit Monday')
0
-