on master help sign in
[fix] category name i18n - closes #221
commite43f61069a05ca48750d3eb33e4421d5d2d62e7a authorAdam Tauber <asciimoo@gmail.com> dateTue 10 Feb 2015, 23:14 (12 years ago) parentf8a5f7d
2 files changed+10−2
searx/webapp.py+10 utils/update-translations.sh−2
searx/webapp.py+10
@@ -97,6 +97,16 @@ for indice, theme in enumerate(themes):
9797
9898cookie_max_age = 60 * 60 * 24 * 365 * 5 # 5 years
9999
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+
100110
101111@babel.localeselector
102112def get_locale():
utils/update-translations.sh−2
@@ -10,8 +10,6 @@ SEARX_DIR='searx'
1010pybabel extract -F babel.cfg -o messages.pot $SEARX_DIR
1111for f in `ls $SEARX_DIR'/translations/'`; do
1212 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'
1513done
1614
1715echo '[!] update done, edit .po files if required and run pybabel compile -d searx/translations/'