Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] sort RTL_LOCALES before written into locales.json

Markus Heiser894f16486964
diff --git a/Makefile b/Makefile
index a5fae5ab1..b9fd6b33b 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ test.shell:
# wrap ./manage script
MANAGE += weblate.translations.commit weblate.push.translations
-MANAGE += data.all data.traits data.useragents
+MANAGE += data.all data.traits data.useragents data.locales
MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
MANAGE += docker.build docker.push docker.buildx
MANAGE += gecko.driver
diff --git a/searx/data/locales.json b/searx/data/locales.json
index cb45b1601..1b3a69539 100644
--- a/searx/data/locales.json
+++ b/searx/data/locales.json
@@ -62,8 +62,8 @@
"zh-Hant-TW": "中文, 台灣 (Chinese, Taiwan)"
},
"RTL_LOCALES": [
- "fa-IR",
"ar",
+ "fa-IR",
"he"
]
}
\ No newline at end of file
diff --git a/searxng_extra/update/update_locales.py b/searxng_extra/update/update_locales.py
old mode 100644
new mode 100755
index e823ebaf1..d97a5dd88
--- a/searxng_extra/update/update_locales.py
+++ b/searxng_extra/update/update_locales.py
@@ -58,7 +58,7 @@ def main():
content = {
"LOCALE_NAMES": LOCALE_NAMES,
- "RTL_LOCALES": list(RTL_LOCALES),
+ "RTL_LOCALES": sorted(RTL_LOCALES),
}
with open(LOCALE_DATA_FILE, 'w', encoding='utf-8') as f: