|
@@ -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/'
|