summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-12-11 00:19:51 +0100
committerGitHub <noreply@github.com>2021-12-11 00:19:51 +0100
commit7608e0cdca9a7801f5f7dd575d1a203d4af17389 (patch)
tree5d0f178d2017204501db7acb687675a8ac922424
parente69fa16eb3cd4cf4a591eb4c533b9eff45f79850 (diff)
parent82527df55c02ba6a7ee653a47386758017564f10 (diff)
Merge pull request #55801 from RaphaelAzev/issue-55746
-rw-r--r--core/string/translation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/string/translation.cpp b/core/string/translation.cpp
index 73f789b041..865937e9ce 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -1092,9 +1092,12 @@ Array TranslationServer::get_loaded_locales() const {
ERR_FAIL_COND_V(t.is_null(), Array());
String l = t->get_locale();
- locales.push_back(l);
+ if (!locales.has(l)) {
+ locales.push_back(l);
+ }
}
+ locales.sort();
return locales;
}