Do not reload resources and send notification if locale is not changed.

This commit is contained in:
bruvzg 2023-12-05 16:17:22 +02:00
parent 654132cb9c
commit 829349d2ca
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38

View File

@ -518,8 +518,12 @@ String TranslationServer::get_country_name(const String &p_country) const {
}
void TranslationServer::set_locale(const String &p_locale) {
locale = standardize_locale(p_locale);
String new_locale = standardize_locale(p_locale);
if (locale == new_locale) {
return;
}
locale = new_locale;
ResourceLoader::reload_translation_remaps();
if (OS::get_singleton()->get_main_loop()) {