Skip to content

Commit

Permalink
Add Makefile to update .po and .mo files
Browse files Browse the repository at this point in the history
Also, update .po files and compile .mo files.

Also, make sure that these files get updated when creating a new
release.
  • Loading branch information
Flimm committed Jun 14, 2024
1 parent f1fbe32 commit 39c964b
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 66 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
python -m pip install -U pip
python -m pip install -U poetry
- name: Update .po and .mo files
run: |
make po mo
- name: Build package
run: |
poetry build
Expand Down
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# You may wish to run this file under poetry's virtual environment, like this:
#
# poetry run make

.DEFAULT_GOAL := mo
.PHONY: po mo clean


# Update .po files, used for translation
po:
cd invitations && python ../manage.py makemessages -a --no-wrap

# Compile .mo files, used for translation
mo: po
cd invitations && python ../manage.py compilemessages

# Clean files that are compiled by this Makefile
clean:
rm -f invitations/locale/*/LC_MESSAGES/*.mo
Binary file modified invitations/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
54 changes: 41 additions & 13 deletions invitations/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-07 18:53+0500\n"
"POT-Creation-Date: 2024-06-14 06:18-0500\n"
"PO-Revision-Date: 2018-01-07 18:53+0500\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -18,39 +18,45 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: base_invitation.py:11
#: base_invitation.py:9
msgid "accepted"
msgstr "angenommen"

#: base_invitation.py:12
#: base_invitation.py:10
msgid "key"
msgstr "Schlüssel"

#: base_invitation.py:13
#: base_invitation.py:11
msgid "sent"
msgstr "gesendet"

#: forms.py:31
#: base_invitation.py:14
#, fuzzy
#| msgid "Invite"
msgid "inviter"
msgstr "Einladung"

#: forms.py:28
msgid "This e-mail address has already been invited."
msgstr "Diese E-Mail-Adresse wurde bereits eingeladen."

#: forms.py:33
#: forms.py:30
msgid "This e-mail address has already accepted an invite."
msgstr "Diese E-Mail-Adresse hat bereits eine Einladung angenommen."

#: forms.py:35
#: forms.py:32
msgid "An active user is using this e-mail address"
msgstr "Ein aktiver Benutzer verwendet diese E-Mail-Adresse"

#: forms.py:51 forms.py:62
#: forms.py:47 forms.py:59
msgid "E-mail"
msgstr "E-Mail"

#: models.py:21
#: models.py:25
msgid "e-mail address"
msgstr "E-Mail-Adresse"

#: models.py:23
#: models.py:28
msgid "created"
msgstr "erstellt"

Expand Down Expand Up @@ -85,8 +91,9 @@ msgid "Invite"
msgstr "Einladung"

#: templates/invitations/forms/_invite.html:4
msgid ""
"Please add an email below. The user will recieve an email with instructions."
#, fuzzy
#| msgid "Please add an email below. The user will recieve an email with instructions."
msgid "Please add an email below. The user will receive an email with instructions."
msgstr "Bitte fügen Sie eine E-Mail unten hinzu. Der Benutzer erhält eine E-Mail mit Anweisungen."

#: templates/invitations/forms/_invite.html:9
Expand All @@ -98,6 +105,27 @@ msgstr "E-mail"
msgid "Invitation to - %(email)s - has been accepted"
msgstr "Die an %(email)s gesendete Einladung wurde angenommen"

#: views.py:44
#: templates/invitations/messages/invite_already_accepted.txt:3
#, fuzzy, python-format
#| msgid "Invitation to - %(email)s - has been accepted"
msgid "The invitation for %(email)s was already accepted."
msgstr "Die an %(email)s gesendete Einladung wurde angenommen"

#: templates/invitations/messages/invite_expired.txt:3
#, fuzzy, python-format
#| msgid "Invitation to - %(email)s - has been accepted"
msgid "The invitation for %(email)s has expired."
msgstr "Die an %(email)s gesendete Einladung wurde angenommen"

#: templates/invitations/messages/invite_invalid.txt:3
msgid "An invalid invitation key was submitted."
msgstr ""

#: views.py:52
#, python-format
msgid "%(email)s has been invited"
msgstr "Einladung ist an %(email)s gesendet"

#: views.py:131
msgid "405 Method Not Allowed"
msgstr ""
Binary file added invitations/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
46 changes: 36 additions & 10 deletions invitations/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-16 18:16+0100\n"
"POT-Creation-Date: 2024-06-14 06:18-0500\n"
"PO-Revision-Date: 2020-02-16 18:57+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 2.2.1\n"

#: base_invitation.py:9
Expand All @@ -30,27 +30,33 @@ msgstr "clef"
msgid "sent"
msgstr "envoyée"

#: forms.py:31
#: base_invitation.py:14
#, fuzzy
#| msgid "Invite"
msgid "inviter"
msgstr "Inviter"

#: forms.py:28
msgid "This e-mail address has already been invited."
msgstr "Cette adresse e-mail a déjà reçu une invitation."

#: forms.py:33
#: forms.py:30
msgid "This e-mail address has already accepted an invite."
msgstr "Cette adresse e-mail a déjà accepté une invitation."

#: forms.py:35
#: forms.py:32
msgid "An active user is using this e-mail address"
msgstr "Un utilisateur actif utilise cette adresse e-mail"

#: forms.py:51 forms.py:62
#: forms.py:47 forms.py:59
msgid "E-mail"
msgstr "E-mail"

#: models.py:21
#: models.py:25
msgid "e-mail address"
msgstr "adresse e-mail"

#: models.py:23
#: models.py:28
msgid "created"
msgstr "créée"

Expand Down Expand Up @@ -97,7 +103,27 @@ msgstr "Email"
msgid "Invitation to - %(email)s - has been accepted"
msgstr "L'invitation envoyée à - %(email)s - a été acceptée"

#: views.py:44
#: templates/invitations/messages/invite_already_accepted.txt:3
#, fuzzy, python-format
#| msgid "Invitation to - %(email)s - has been accepted"
msgid "The invitation for %(email)s was already accepted."
msgstr "L'invitation envoyée à - %(email)s - a été acceptée"

#: templates/invitations/messages/invite_expired.txt:3
#, fuzzy, python-format
#| msgid "Invitation to - %(email)s - has been accepted"
msgid "The invitation for %(email)s has expired."
msgstr "L'invitation envoyée à - %(email)s - a été acceptée"

#: templates/invitations/messages/invite_invalid.txt:3
msgid "An invalid invitation key was submitted."
msgstr ""

#: views.py:52
#, python-format
msgid "%(email)s has been invited"
msgstr "%(email)s a été invité·e"

#: views.py:131
msgid "405 Method Not Allowed"
msgstr ""
23 changes: 12 additions & 11 deletions invitations/locale/pt_BR/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-15 13:13-0300\n"
"POT-Creation-Date: 2024-06-14 06:18-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -34,19 +34,19 @@ msgstr "enviado"
msgid "inviter"
msgstr "Convidador"

#: forms.py:30
#: forms.py:28
msgid "This e-mail address has already been invited."
msgstr "Esse endereço de e-mail já foi convidado."

#: forms.py:32
#: forms.py:30
msgid "This e-mail address has already accepted an invite."
msgstr "Esse endereço de e-mail já aceitou um convite."

#: forms.py:34
#: forms.py:32
msgid "An active user is using this e-mail address"
msgstr "Um usuário ativo está usando esse endereço de e-mail"

#: forms.py:50 forms.py:62
#: forms.py:47 forms.py:59
msgid "E-mail"
msgstr "E-mail"

Expand Down Expand Up @@ -89,11 +89,8 @@ msgid "Invite"
msgstr "Convite"

#: templates/invitations/forms/_invite.html:4
msgid ""
"Please add an email below. The user will receive an email with instructions."
msgstr ""
"Por favor adicione um email abaixo. O usuário receberá um email com "
"instruções."
msgid "Please add an email below. The user will receive an email with instructions."
msgstr "Por favor adicione um email abaixo. O usuário receberá um email com instruções."

#: templates/invitations/forms/_invite.html:9
msgid "Email"
Expand All @@ -118,7 +115,11 @@ msgstr "O convite para %(email)s expirou."
msgid "An invalid invitation key was submitted."
msgstr "Uma chave de convite inválida foi enviada."

#: views.py:50
#: views.py:52
#, python-format
msgid "%(email)s has been invited"
msgstr "%(email)s foi convidado"

#: views.py:131
msgid "405 Method Not Allowed"
msgstr ""
Binary file modified invitations/locale/ru/LC_MESSAGES/django.mo
Binary file not shown.
56 changes: 40 additions & 16 deletions invitations/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,55 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-07 18:53+0500\n"
"POT-Creation-Date: 2024-06-14 06:18-0500\n"
"PO-Revision-Date: 2018-01-07 18:53+0500\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"

#: base_invitation.py:11
#: base_invitation.py:9
msgid "accepted"
msgstr "принято"

#: base_invitation.py:12
#: base_invitation.py:10
msgid "key"
msgstr "ключ"

#: base_invitation.py:13
#: base_invitation.py:11
msgid "sent"
msgstr "отправлено"

#: forms.py:31
#: base_invitation.py:14
#, fuzzy
#| msgid "Invite"
msgid "inviter"
msgstr "Приглашение"

#: forms.py:28
msgid "This e-mail address has already been invited."
msgstr "На этот e-mail уже отправлено приглашение."

#: forms.py:33
#: forms.py:30
msgid "This e-mail address has already accepted an invite."
msgstr "Приглашение, отправленное на этот e-mail, уже принято."

#: forms.py:35
#: forms.py:32
msgid "An active user is using this e-mail address"
msgstr "Пользователь с e-mail уже существует"

#: forms.py:51 forms.py:62
#: forms.py:47 forms.py:59
msgid "E-mail"
msgstr "E-mail"

#: models.py:21
#: models.py:25
msgid "e-mail address"
msgstr "e-mail адрес"

#: models.py:23
#: models.py:28
msgid "created"
msgstr "создано"

Expand Down Expand Up @@ -87,8 +91,7 @@ msgid "Invite"
msgstr "Приглашение"

#: templates/invitations/forms/_invite.html:4
msgid ""
"Please add an email below. The user will receive an email with instructions."
msgid "Please add an email below. The user will receive an email with instructions."
msgstr "Введите email ниже и пользователь получит письмо с инструкциями."

#: templates/invitations/forms/_invite.html:9
Expand All @@ -100,6 +103,27 @@ msgstr "Email"
msgid "Invitation to - %(email)s - has been accepted"
msgstr "Приглашение, отправленное на %(email)s, принято"

#: views.py:44
#: templates/invitations/messages/invite_already_accepted.txt:3
#, fuzzy, python-format
#| msgid "Invitation to - %(email)s - has been accepted"
msgid "The invitation for %(email)s was already accepted."
msgstr "Приглашение, отправленное на %(email)s, принято"

#: templates/invitations/messages/invite_expired.txt:3
#, fuzzy, python-format
#| msgid "Invitation to - %(email)s - has been accepted"
msgid "The invitation for %(email)s has expired."
msgstr "Приглашение, отправленное на %(email)s, принято"

#: templates/invitations/messages/invite_invalid.txt:3
msgid "An invalid invitation key was submitted."
msgstr ""

#: views.py:52
#, python-format
msgid "%(email)s has been invited"
msgstr "Приглашение отправлено на %(email)s"

#: views.py:131
msgid "405 Method Not Allowed"
msgstr ""
Binary file modified invitations/locale/uk/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 39c964b

Please sign in to comment.