mirror of
https://github.com/godotengine/godot.git
synced 2025-02-16 07:40:36 +00:00
Merge pull request #96462 from RandomShaper/opt_comp_loc
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
TranslationServer: Add fast path for comparison of equal locales
This commit is contained in:
commit
88197d4a51
@ -284,6 +284,11 @@ String TranslationServer::_standardize_locale(const String &p_locale, bool p_add
|
||||
}
|
||||
|
||||
int TranslationServer::compare_locales(const String &p_locale_a, const String &p_locale_b) const {
|
||||
if (p_locale_a == p_locale_b) {
|
||||
// Exact match.
|
||||
return 10;
|
||||
}
|
||||
|
||||
String locale_a = _standardize_locale(p_locale_a, true);
|
||||
String locale_b = _standardize_locale(p_locale_b, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user