Skip to content

Commit ce85147

Browse files
committed
Update translation information and provide build_mo.sh
1 parent 085526c commit ce85147

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

README.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,34 @@ brew install gettext
6666
The workflow itself
6767
```
6868
# create .tx config
69-
tx init
70-
# or when just want to update a ressource
71-
tx set --source -r <project_slug.resource_slug> -l <lang> <file>
69+
$ tx init
7270
73-
make clean
71+
# ensure clean enviroment
72+
$ make clean
7473
75-
# this will generate the strings from the *.rst files
76-
make gettext
74+
# generate the strings from the *.rst files
75+
$ make gettext
7776
78-
# this will generate the locales (DE|EN)
79-
sphinx-intl update -p _build/locale/ -l de -l en
77+
# OPTIONAL: if you have to adapt a new locale, run
78+
sphinx-intl update -p _build/locale/ -l de
8079
81-
# this will update the ressource files from the pot dir
82-
sphinx-intl update-txconfig-resources --pot-dir _build/locale --transifex-project-name zammad-admin-documentation
80+
# update the resource files from the pot dir
81+
$ sphinx-intl update-txconfig-resources --pot-dir _build/locale --transifex-project-name zammad-admin-documentation
8382
8483
# push to transifex (if configured)
85-
tx push -s
84+
$ tx push -s
8685
86+
# Below pull options by default ignore unreviewed (see https://docs.transifex.com/client/pull#getting-different-file-variants )
8787
# after translation pull needed languages from transifex
88-
tx pull -l en
88+
$ tx pull -l en
8989
90-
# manual build based upon the language (_build/html/)
91-
make -e SPHINXOPTS="-D language='de'" html
92-
make -e SPHINXOPTS="-D language='en'" html
90+
# build the .MO files for use with readthedocs
91+
# (After a successful build, push to this repo and readthedocs will update itself.)
92+
$ sh build_mo.sh
9393
94+
# manual language-based build (`_build/html/`) (for testing)
95+
$ make -e SPHINXOPTS="-D language='de'" html
96+
$ make -e SPHINXOPTS="-D language='en'" html
9497
```
9598

9699
If you have a problem, please create an issue. Thanks.

build_mo.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
for langfile in `find locale -name "*.po"`
3+
do
4+
subdir=`dirname $langfile`
5+
filename=`basename $langfile .po`
6+
echo "Compiling $langfile..."
7+
msgfmt -o "${subdir}/${filename}.mo" "$langfile"
8+
done

0 commit comments

Comments
 (0)