forked from liftoff/GateOne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel_gateone.cfg
25 lines (19 loc) · 1.18 KB
/
babel_gateone.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Meant to be used with pybabel like so (this file is babel_gateone.cfg):
# Create a gateone.pot file by extracting _() strings from all the source files (*.py and templates)"
# $ pybabel extract -o gateone/i18n/gateone.pot -F ./babel_gateone.cfg gateone
# Then you can create a translation for, say, Portuguese (creates a fresh/empty .po file):
# $ pybabel init -D gateone -i gateone/i18n/gateone.pot -d gateone/i18n/ -l pt_PT
# Edit the resulting .po file (adding your translations) and lastly, compile it to .mo:
# $ pybabel compile -D gateone -d gateone/i18n/ -f --statistics
# Now Gate One will automatically use your translation, awesome!
# If gateone.pot changed, you'll need to update your translation with the new changes:
# $ pybabel update -d gateone/i18n -l pt_PT -i gateone/i18n/gateone.pot -D gateone
# That will update the line numbers, comment out any obsolete translations, and add any new untranslated text.
# Extraction from Python source files
[python: *.py]
# Extraction from Tornado templates
[tornado: gateone/templates/**.html]
input_encoding = utf-8
# Extraction from JavaScript files
[javascript: gateone/static/**.js]
input_encoding = utf-8