on master help sign in
Fix Farsi language in Oscar && adjust tables with RTL
commita3e15a3df6f5502c58f82f18e09d80a2fdf7a957 authorNoémi Ványi <sitbackandwait@gmail.com> dateSun 31 May 2020, 20:02 (6 years ago) parentd38952c
4 files changed+16−16
searx/templates/oscar/preferences.html+14−14 searx/translations/fa_IR/LC_MESSAGES/messages.mo searx/translations/fa_IR/LC_MESSAGES/messages.po+1−1 searx/webapp.py+1−1
searx/templates/oscar/preferences.html+14−14
@@ -174,14 +174,14 @@
174174 <th>{{ _("Avg. time") }}</th>
175175 <th>{{ _("Max time") }}</th>
176176 {% else %}
177− <th>{{ _("Max time") }}</th>
178− <th>{{ _("Avg. time") }}</th>
179− <th>{{ _("Time range") }}</th>
180− <th>{{ _("SafeSearch") }}</th>
181− <th>{{ _("Selected language") }}</th>
182− <th>{{ _("Shortcut") }}</th>
183− <th>{{ _("Engine name") }}</th>
184− <th>{{ _("Allow") }}</th>
177+ <th class="text-right">{{ _("Max time") }}</th>
178+ <th class="text-right">{{ _("Avg. time") }}</th>
179+ <th class="text-right">{{ _("Time range") }}</th>
180+ <th class="text-right">{{ _("SafeSearch") }}</th>
181+ <th class="text-right">{{ _("Selected language") }}</th>
182+ <th class="text-right">{{ _("Shortcut") }}</th>
183+ <th class="text-right">{{ _("Engine name") }}</th>
184+ <th class="text-right">{{ _("Allow") }}</th>
185185 {% endif %}
186186 </tr>
187187 {% for search_engine in engines_by_category[categ] %}
@@ -256,10 +256,10 @@
256256 </p>
257257 <table class="table table-striped">
258258 <tr>
259− <th class="text-muted">{{ _('Name') }}</th>
260− <th class="text-muted">{{ _('Keywords') }}</th>
261− <th class="text-muted">{{ _('Description') }}</th>
262− <th class="text-muted">{{ _('Examples') }}</th>
259+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Name') }}</th>
260+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Keywords') }}</th>
261+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Description') }}</th>
262+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Examples') }}</th>
263263 </tr>
264264
265265 {% for answerer in answerers %}
@@ -285,8 +285,8 @@
285285 {% if cookies %}
286286 <table class="table table-striped">
287287 <tr>
288− <th class="text-muted" style="padding-right:40px;">{{ _('Cookie name') }}</th>
289− <th class="text-muted">{{ _('Value') }}</th>
288+ <th class="text-muted{% if rtl %} text-right{% endif %}" style="padding-right:40px;">{{ _('Cookie name') }}</th>
289+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Value') }}</th>
290290 </tr>
291291
292292 {% for cookie in cookies %}
searx/translations/fa_IR/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/fa_IR/LC_MESSAGES/messages.po+1−1
@@ -109,7 +109,7 @@ msgstr "توابع آماری"
109109
110110#: searx/answerers/statistics/answerer.py:54
111111msgid "Compute {functions} of the arguments"
112−msgstr "پردازش {عملکرد های} نشانوند ها<br>"
112+msgstr "پردازش {functions} نشانوند ها<br>"
113113
114114#: searx/engines/__init__.py:194
115115msgid "Engine time (sec)"
searx/webapp.py+1−1
@@ -144,7 +144,7 @@ if not searx_debug \
144144
145145babel = Babel(app)
146146
147−rtl_locales = ['ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he',
147+rtl_locales = ['ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'fa_IR', 'glk', 'he',
148148 'ku', 'mzn', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']
149149
150150# used when translating category names