Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update translations #126

Merged
merged 3 commits into from
Mar 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ IOError: [Errno 2] No translation file found for domain: 'humanize'
How to add new phrases to existing locale files:

```console
$ xgettext -o humanize.pot -k'_' -k'N_' -k'P_:1c,2' -l python src/humanize/*.py # extract new phrases
$ xgettext --from-code=UTF-8 -o humanize.pot -k'_' -k'N_' -k'P_:1c,2' -l python src/humanize/*.py # extract new phrases
$ msgmerge -U src/humanize/locale/ru_RU/LC_MESSAGES/humanize.po humanize.pot # add them to locale files
$ msgfmt --check -o src/humanize/locale/ru_RU/LC_MESSAGES/humanize{.mo,.po} # compile to binary .mo
```
Expand Down
13 changes: 13 additions & 0 deletions scripts/update-translations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set -e

# extract new phrases
/usr/local/opt/gettext/bin/xgettext --from-code=UTF-8 -o humanize.pot -k'_' -k'N_' -k'P_:1c,2' -l python src/humanize/*.py

for d in src/humanize/locale/*/; do
locale="$(basename $d)"
echo "$locale"
# add them to locale files
/usr/local/opt/gettext/bin/msgmerge -U src/humanize/locale/$locale/LC_MESSAGES/humanize.po humanize.pot
# compile to binary .mo
/usr/local/opt/gettext/bin/msgfmt --check -o src/humanize/locale/$locale/LC_MESSAGES/humanize{.mo,.po}
done
Binary file modified src/humanize/locale/de_DE/LC_MESSAGES/humanize.mo
Binary file not shown.
124 changes: 71 additions & 53 deletions src/humanize/locale/de_DE/LC_MESSAGES/humanize.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: humanize\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-08 20:05+0200\n"
"POT-Creation-Date: 2020-03-22 16:30+0200\n"
"PO-Revision-Date: 2016-12-18 11:50+0100\n"
"Last-Translator: Christian Klein <chris@5711.org>\n"
"Language-Team: German\n"
Expand All @@ -19,246 +19,264 @@ msgstr ""
"Generated-By: Christian Klein\n"
"X-Generator: Sublime Text 3\n"

#: src/humanize/number.py:24
#: src/humanize/number.py:22
msgctxt "0"
msgid "th"
msgstr "."

#: src/humanize/number.py:25
#: src/humanize/number.py:23
msgctxt "1"
msgid "st"
msgstr "."

#: src/humanize/number.py:26
#: src/humanize/number.py:24
msgctxt "2"
msgid "nd"
msgstr "."

#: src/humanize/number.py:27
#: src/humanize/number.py:25
msgctxt "3"
msgid "rd"
msgstr "."

#: src/humanize/number.py:28
#: src/humanize/number.py:26
msgctxt "4"
msgid "th"
msgstr "."

#: src/humanize/number.py:29
#: src/humanize/number.py:27
msgctxt "5"
msgid "th"
msgstr "."

#: src/humanize/number.py:30
#: src/humanize/number.py:28
msgctxt "6"
msgid "th"
msgstr "."

#: src/humanize/number.py:31
#: src/humanize/number.py:29
msgctxt "7"
msgid "th"
msgstr "."

#: src/humanize/number.py:32
#: src/humanize/number.py:30
msgctxt "8"
msgid "th"
msgstr "."

#: src/humanize/number.py:33
#: src/humanize/number.py:31
msgctxt "9"
msgid "th"
msgstr "."

#: src/humanize/number.py:62
#: src/humanize/number.py:73
msgid "million"
msgstr "Million"

#: src/humanize/number.py:63
#: src/humanize/number.py:74
msgid "billion"
msgstr "Milliarde"

#: src/humanize/number.py:64
#: src/humanize/number.py:75
msgid "trillion"
msgstr "Billion"

#: src/humanize/number.py:65
#: src/humanize/number.py:76
msgid "quadrillion"
msgstr "Billiarde"

#: src/humanize/number.py:66
#: src/humanize/number.py:77
msgid "quintillion"
msgstr "Trillion"

#: src/humanize/number.py:67
#: src/humanize/number.py:78
msgid "sextillion"
msgstr "Trilliarde"

#: src/humanize/number.py:68
#: src/humanize/number.py:79
msgid "septillion"
msgstr "Quadrillion"

#: src/humanize/number.py:69
#: src/humanize/number.py:80
msgid "octillion"
msgstr "Quadrillarde"

#: src/humanize/number.py:70
#: src/humanize/number.py:81
msgid "nonillion"
msgstr "Quintillion"

#: src/humanize/number.py:71
#: src/humanize/number.py:82
msgid "decillion"
msgstr "Quintilliarde"

#: src/humanize/number.py:72
#: src/humanize/number.py:83
msgid "googol"
msgstr "Googol"

#: src/humanize/number.py:108
#: src/humanize/number.py:138
msgid "zero"
msgstr "null"

#: src/humanize/number.py:139
msgid "one"
msgstr "eins"

#: src/humanize/number.py:109
#: src/humanize/number.py:140
msgid "two"
msgstr "zwei"

#: src/humanize/number.py:110
#: src/humanize/number.py:141
msgid "three"
msgstr "drei"

#: src/humanize/number.py:111
#: src/humanize/number.py:142
msgid "four"
msgstr "vier"

#: src/humanize/number.py:112
#: src/humanize/number.py:143
msgid "five"
msgstr "fünf"

#: src/humanize/number.py:113
#: src/humanize/number.py:144
msgid "six"
msgstr "sechs"

#: src/humanize/number.py:114
#: src/humanize/number.py:145
msgid "seven"
msgstr "sieben"

#: src/humanize/number.py:115
#: src/humanize/number.py:146
msgid "eight"
msgstr "acht"

#: src/humanize/number.py:116
#: src/humanize/number.py:147
msgid "nine"
msgstr "neun"

#: src/humanize/time.py:68 src/humanize/time.py:131
#: src/humanize/time.py:87
#, fuzzy, python-format
msgid "%d microsecond"
msgid_plural "%d microseconds"
msgstr[0] "%d Mikrosekunde"
msgstr[1] "%d Mikrosekunden"

#: src/humanize/time.py:93
#, fuzzy, python-format
msgid "%d millisecond"
msgid_plural "%d milliseconds"
msgstr[0] "%d Millisekunde"
msgstr[1] "%d Millisekunden"

#: src/humanize/time.py:96 src/humanize/time.py:170
msgid "a moment"
msgstr "ein Moment"

#: src/humanize/time.py:70
#: src/humanize/time.py:98
msgid "a second"
msgstr "eine Sekunde"

#: src/humanize/time.py:72
#: src/humanize/time.py:100
#, python-format
msgid "%d second"
msgid_plural "%d seconds"
msgstr[0] "%d Sekunde"
msgstr[1] "%d Sekunden"

#: src/humanize/time.py:74
#: src/humanize/time.py:102
msgid "a minute"
msgstr "eine Minute"

#: src/humanize/time.py:77
#: src/humanize/time.py:105
#, python-format
msgid "%d minute"
msgid_plural "%d minutes"
msgstr[0] "%d Minute"
msgstr[1] "%d Minuten"

#: src/humanize/time.py:79
#: src/humanize/time.py:107
msgid "an hour"
msgstr "eine Stunde"

#: src/humanize/time.py:82
#: src/humanize/time.py:110
#, python-format
msgid "%d hour"
msgid_plural "%d hours"
msgstr[0] "%d Stunde"
msgstr[1] "%d Stunden"

#: src/humanize/time.py:85
#: src/humanize/time.py:113
msgid "a day"
msgstr "ein Tag"

#: src/humanize/time.py:87 src/humanize/time.py:90
#: src/humanize/time.py:115 src/humanize/time.py:118
#, python-format
msgid "%d day"
msgid_plural "%d days"
msgstr[0] "%d Tag"
msgstr[1] "%d Tage"

#: src/humanize/time.py:92
#: src/humanize/time.py:120
msgid "a month"
msgstr "ein Monat"

#: src/humanize/time.py:94
#: src/humanize/time.py:122
#, python-format
msgid "%d month"
msgid_plural "%d months"
msgstr[0] "%d Monat"
msgstr[1] "%d Monate"

#: src/humanize/time.py:97
#: src/humanize/time.py:125
msgid "a year"
msgstr "ein Jahr"

#: src/humanize/time.py:99 src/humanize/time.py:108
#: src/humanize/time.py:127 src/humanize/time.py:136
#, python-format
msgid "1 year, %d day"
msgid_plural "1 year, %d days"
msgstr[0] "ein Jahr und %d Tag"
msgstr[1] "ein Jahr und %d Tage"

#: src/humanize/time.py:102
#: src/humanize/time.py:130
msgid "1 year, 1 month"
msgstr "ein Monat"

#: src/humanize/time.py:105
#: src/humanize/time.py:133
#, python-format
msgid "1 year, %d month"
msgid_plural "1 year, %d months"
msgstr[0] "ein Jahr und %d Monat"
msgstr[1] "ein Jahr und %d Monate"

#: src/humanize/time.py:110
#: src/humanize/time.py:138
#, python-format
msgid "%d year"
msgid_plural "%d years"
msgstr[0] "%d Jahr"
msgstr[1] "%d Jahre"

#: src/humanize/time.py:128
#: src/humanize/time.py:167
#, python-format
msgid "%s from now"
msgstr "%s ab jetzt"

#: src/humanize/time.py:128
#: src/humanize/time.py:167
#, python-format
msgid "%s ago"
msgstr "vor %s"

#: src/humanize/time.py:132
#: src/humanize/time.py:171
msgid "now"
msgstr "jetzt"

#: src/humanize/time.py:151
#: src/humanize/time.py:190
msgid "today"
msgstr "heute"

#: src/humanize/time.py:153
#: src/humanize/time.py:192
msgid "tomorrow"
msgstr "morgen"

#: src/humanize/time.py:155
#: src/humanize/time.py:194
msgid "yesterday"
msgstr "gestern"
Binary file modified src/humanize/locale/fi_FI/LC_MESSAGES/humanize.mo
Binary file not shown.
Loading