[enh] utils - translation updater script added
commit474f6a861d1be5a874deefd5d60dd45b40db0a03
authorasciimoo <asciimoo@gmail.com>
dateSun 2 Feb 2014, 22:23 (13 years ago)
parent881c2cb
utils/update-translations.shnew file+17
@@ -0,0 +1,17 @@
1+#!/bin/sh
2+
3+# script to easily update translation language files
4+
5+# add new language:
6+# pybabel init -i messages.pot -d searx/translations -l en
7+
8+SEARX_DIR='searx'
9+
10+pybabel extract -F babel.cfg -o messages.pot $SEARX_DIR
11+for f in `ls $SEARX_DIR'/translations/'`; do
12+ pybabel update -i messages.pot -d $SEARX_DIR'/translations/' -l $f
13+ # TODO - need to fix category translations
14+ sed -i 's/#~ //' $SEARX_DIR'/translations/'$f'/LC_MESSAGES/messages.po'
15+done
16+
17+echo '[!] update done, edit .po files if required and run pybabel compile -d searx/translations/'