mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Added check to get_all_locales to avoid adding duplicate locales to array
(cherry picked from commit 82527df55c)
This commit is contained in:
committed by
Rémi Verschelde
parent
1230169ad1
commit
37a8a615e5
@@ -1011,9 +1011,12 @@ Array TranslationServer::get_loaded_locales() const {
|
||||
ERR_FAIL_COND_V(t.is_null(), Array());
|
||||
String l = t->get_locale();
|
||||
|
||||
if (!locales.has(l)) {
|
||||
locales.push_back(l);
|
||||
}
|
||||
}
|
||||
|
||||
locales.sort();
|
||||
return locales;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user