Fix duplicated entries in TranslationServer::get_loaded_locales()
This commit is contained in:
parent
61accf0605
commit
f451997666
2 changed files with 24 additions and 11 deletions
|
|
@ -247,7 +247,10 @@ PackedStringArray TranslationDomain::get_loaded_locales() const {
|
|||
PackedStringArray locales;
|
||||
for (const Ref<Translation> &E : translations) {
|
||||
ERR_CONTINUE(E.is_null());
|
||||
locales.push_back(E->get_locale());
|
||||
const String &locale = E->get_locale();
|
||||
if (!locales.has(locale)) {
|
||||
locales.push_back(locale);
|
||||
}
|
||||
}
|
||||
return locales;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue