Added check to get_all_locales to avoid adding duplicate locales to array

(cherry picked from commit 82527df55c)
This commit is contained in:
raphaelazev 2021-12-10 17:05:42 -03:00 committed by Rémi Verschelde
parent 3f137fb3a9
commit 102f102f7d
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1011,9 +1011,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;
}