File tree Expand file tree Collapse file tree 2 files changed +14
-21
lines changed Expand file tree Collapse file tree 2 files changed +14
-21
lines changed Original file line number Diff line number Diff line change @@ -322,28 +322,25 @@ Updating translations from Transifex
322
322
Anytime translations on Transifex have been updated, someone should update
323
323
our translation files as follows:
324
324
325
- 1. Review the translations in Transifex and add to the space-delimited
326
- ``LANGUAGES `` list in ``update-translations.sh ``, any new languages that have
327
- reached 100% translation.
328
-
329
- 2. Pull the updated translation files::
325
+ 1. Pull the updated translation files::
330
326
331
327
./update-translations.sh
332
328
333
- 3 . Use ``git diff `` to see if any translations have actually changed. If not,
329
+ 2 . Use ``git diff `` to see if any translations have actually changed. If not,
334
330
you can just revert the .po file changes and stop here.
335
331
336
- 4 . Compile the messages::
332
+ 3 . Compile the messages::
337
333
338
334
python -m manage compilemessages
339
335
340
- 5 . Run the test suite one more time::
336
+ 4 . Run the test suite one more time::
341
337
342
338
python -m manage test
343
339
344
- 6 . Commit and push the changes to GitHub::
340
+ 5 . Commit and push the changes to GitHub::
345
341
346
- git commit -m "Updated translations" locale/*/LC_MESSAGES/*
342
+ git add dashboard/locale/ docs/locale/ locale/
343
+ git commit -m "Updated translations"
347
344
git push
348
345
349
346
Running Locally with Docker
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- # Update translations from Transifex for the supported languages, and remove
4
- # the source location references (to help keep the diff noise down). Adapted from:
3
+ # Script to update translations and remove the source location references (to help keep the
4
+ # diff noise down). Adapted from:
5
5
# https://github.com/django/django-docs-translations/blob/stable/2.1.x/manage_translations.py
6
6
7
7
set -ex
8
8
9
- LANGUAGES=" el es fr id it ja ko pl pt_BR zh_Hans"
10
-
11
9
LOCALE_DIRS=" dashboard/locale/ docs/locale/ locale/"
12
10
13
- for LANG in $LANGUAGES ; do
14
- tx pull -f -l $LANG --minimum-perc=70
15
- for DIR in $LOCALE_DIRS ; do
16
- PO_FILE=" $DIR$LANG /LC_MESSAGES/django.po"
17
- if [ -f " $PO_FILE " ]; then
18
- msgcat --no-location -o $PO_FILE $PO_FILE
19
- fi
11
+ tx pull -a -f --minimum-perc=70
12
+
13
+ for DIR in $LOCALE_DIRS ; do
14
+ for PO_FILE in $( find $DIR -name django.po -not -path en/) ; do
15
+ msgcat --no-location -o $PO_FILE $PO_FILE
20
16
done
21
17
done
You can’t perform that action at this time.
0 commit comments