on master help sign in
Merge pull request #1978 from kvch/fix-rtl-in-oscar

Fix Farsi language in Oscar && adjust tables with RTL

commit19e32dc686e40f5e7ec1653f4a05aaa75cb17d80 authorAdam Tauber <asciimoo@gmail.com> dateSun 31 May 2020, 23:45 (6 years ago) parentda02e0ba3e15a3
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
@@ -182,14 +182,14 @@
182182 <th>{{ _("Avg. time") }}</th>
183183 <th>{{ _("Max time") }}</th>
184184 {% else %}
185− <th>{{ _("Max time") }}</th>
186− <th>{{ _("Avg. time") }}</th>
187− <th>{{ _("Time range") }}</th>
188− <th>{{ _("SafeSearch") }}</th>
189− <th>{{ _("Selected language") }}</th>
190− <th>{{ _("Shortcut") }}</th>
191− <th>{{ _("Engine name") }}</th>
192− <th>{{ _("Allow") }}</th>
185+ <th class="text-right">{{ _("Max time") }}</th>
186+ <th class="text-right">{{ _("Avg. time") }}</th>
187+ <th class="text-right">{{ _("Time range") }}</th>
188+ <th class="text-right">{{ _("SafeSearch") }}</th>
189+ <th class="text-right">{{ _("Selected language") }}</th>
190+ <th class="text-right">{{ _("Shortcut") }}</th>
191+ <th class="text-right">{{ _("Engine name") }}</th>
192+ <th class="text-right">{{ _("Allow") }}</th>
193193 {% endif %}
194194 </tr>
195195 {% for search_engine in engines_by_category[categ] %}
@@ -264,10 +264,10 @@
264264 </p>
265265 <table class="table table-striped">
266266 <tr>
267− <th class="text-muted">{{ _('Name') }}</th>
268− <th class="text-muted">{{ _('Keywords') }}</th>
269− <th class="text-muted">{{ _('Description') }}</th>
270− <th class="text-muted">{{ _('Examples') }}</th>
267+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Name') }}</th>
268+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Keywords') }}</th>
269+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Description') }}</th>
270+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Examples') }}</th>
271271 </tr>
272272
273273 {% for answerer in answerers %}
@@ -293,8 +293,8 @@
293293 {% if cookies %}
294294 <table class="table table-striped">
295295 <tr>
296− <th class="text-muted" style="padding-right:40px;">{{ _('Cookie name') }}</th>
297− <th class="text-muted">{{ _('Value') }}</th>
296+ <th class="text-muted{% if rtl %} text-right{% endif %}" style="padding-right:40px;">{{ _('Cookie name') }}</th>
297+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Value') }}</th>
298298 </tr>
299299
300300 {% 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