mirror of
https://github.com/godotengine/godot.git
synced 2025-02-08 11:50:41 +00:00
Merge pull request #56951 from bruvzg/fix_locale
This commit is contained in:
commit
249c60e9d1
@ -820,7 +820,7 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem
|
|||||||
}
|
}
|
||||||
String l = res_remaps[i].substr(split + 1).strip_edges();
|
String l = res_remaps[i].substr(split + 1).strip_edges();
|
||||||
int score = TranslationServer::get_singleton()->compare_locales(locale, l);
|
int score = TranslationServer::get_singleton()->compare_locales(locale, l);
|
||||||
if (score >= best_score) {
|
if (score > best_score) {
|
||||||
new_path = res_remaps[i].left(split);
|
new_path = res_remaps[i].left(split);
|
||||||
best_score = score;
|
best_score = score;
|
||||||
if (score == 10) {
|
if (score == 10) {
|
||||||
|
@ -544,7 +544,7 @@ Ref<Translation> TranslationServer::get_translation_object(const String &p_local
|
|||||||
String l = t->get_locale();
|
String l = t->get_locale();
|
||||||
|
|
||||||
int score = compare_locales(p_locale, l);
|
int score = compare_locales(p_locale, l);
|
||||||
if (score >= best_score) {
|
if (score > best_score) {
|
||||||
res = t;
|
res = t;
|
||||||
best_score = score;
|
best_score = score;
|
||||||
if (score == 10) {
|
if (score == 10) {
|
||||||
@ -617,7 +617,7 @@ StringName TranslationServer::_get_message_from_translations(const StringName &p
|
|||||||
String l = t->get_locale();
|
String l = t->get_locale();
|
||||||
|
|
||||||
int score = compare_locales(p_locale, l);
|
int score = compare_locales(p_locale, l);
|
||||||
if (score >= best_score) {
|
if (score > best_score) {
|
||||||
StringName r;
|
StringName r;
|
||||||
if (!plural) {
|
if (!plural) {
|
||||||
res = t->get_message(p_message, p_context);
|
res = t->get_message(p_message, p_context);
|
||||||
|
@ -377,7 +377,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||||||
lang_hint += locale;
|
lang_hint += locale;
|
||||||
|
|
||||||
int score = TranslationServer::get_singleton()->compare_locales(host_lang, locale);
|
int score = TranslationServer::get_singleton()->compare_locales(host_lang, locale);
|
||||||
if (score >= best_score) {
|
if (score > best_score) {
|
||||||
best = locale;
|
best = locale;
|
||||||
best_score = score;
|
best_score = score;
|
||||||
if (score == 10) {
|
if (score == 10) {
|
||||||
|
Loading…
Reference in New Issue
Block a user