Added check to get_all_locales to avoid adding duplicate locales to array
This commit is contained in:
parent
e69fa16eb3
commit
82527df55c
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue