Browse Source

[fix] category name i18n - closes #221

Adam Tauber 10 years ago
parent
commit
e43f61069a
2 changed files with 10 additions and 2 deletions
  1. 10
    0
      searx/webapp.py
  2. 0
    2
      utils/update-translations.sh

+ 10
- 0
searx/webapp.py View File

@@ -97,6 +97,16 @@ for indice, theme in enumerate(themes):
97 97
 
98 98
 cookie_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 111
 @babel.localeselector
102 112
 def get_locale():

+ 0
- 2
utils/update-translations.sh View File

@@ -10,8 +10,6 @@ SEARX_DIR='searx'
10 10
 pybabel extract -F babel.cfg -o messages.pot $SEARX_DIR
11 11
 for f in `ls $SEARX_DIR'/translations/'`; do
12 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'
15 13
 done
16 14
 
17 15
 echo '[!] update done, edit .po files if required and run pybabel compile -d searx/translations/'