on master help sign in
[fix] category name i18n - closes #221
e43f610Adam Tauber
searx/webapp.py+10
@@ -97,6 +97,16 @@ for indice, theme in enumerate(themes):
97
97
98cookie_max_age = 60 * 60 * 24 * 365 * 5 # 5 years
98cookie_max_age = 60 * 60 * 24 * 365 * 5 # 5 years
99
99
100+_category_names = (gettext('files'),
101+ gettext('general'),
102+ gettext('music'),
103+ gettext('social media'),
104+ gettext('images'),
105+ gettext('videos'),
106+ gettext('it'),
107+ gettext('news'),
108+ gettext('map'))
109+
100
110
101@babel.localeselector
111@babel.localeselector
102def get_locale():
112def get_locale():
utils/update-translations.sh−2
@@ -10,8 +10,6 @@ SEARX_DIR='searx'
10pybabel extract -F babel.cfg -o messages.pot $SEARX_DIR
10pybabel extract -F babel.cfg -o messages.pot $SEARX_DIR
11for f in `ls $SEARX_DIR'/translations/'`; do
11for f in `ls $SEARX_DIR'/translations/'`; do
12 pybabel update -N -i messages.pot -d $SEARX_DIR'/translations/' -l $f
12 pybabel update -N -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'
15done
13done
16
14
17echo '[!] update done, edit .po files if required and run pybabel compile -d searx/translations/'
15echo '[!] update done, edit .po files if required and run pybabel compile -d searx/translations/'