-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose TranslationServer::standardize_locale
add_default
param publicly
#98972
Expose TranslationServer::standardize_locale
add_default
param publicly
#98972
Conversation
TranslationServer::standardize_locale
add_default
param publicly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing it seems fine.
5e13843
to
a71dad5
Compare
a71dad5
to
02a776b
Compare
I rebased and fixed up the conflict from #98743. |
@@ -52,10 +52,14 @@ class TranslationServer : public Object { | |||
|
|||
static TranslationServer *singleton; | |||
bool _load_translations(const String &p_from); | |||
String _standardize_locale(const String &p_locale, bool p_add_defaults) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should actually have been part of #98743. I can split that out to a separate PR if that's preferred.
@bruvzg could I get another review? Thanks! |
95db239
to
6930f0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The remark about the new argument is completely fine
Comparing locales can have surprising outcomes since it standardizes locales with defaults. For example, zh and zh_CN result in an exact match since the defaults change them both to zh_Hans_CN. Expose the add_default parameter publicly with a default of false so the fully standardized locale can be inspected.
6930f0a
to
6f4fadf
Compare
Thanks! |
Comparing locales can have surprising outcomes since it standardizes locales with defaults. For example, zh and zh_CN result in an exact match since the defaults change them both to zh_Hans_CN. Expose the add_default parameter publicly with a default of false so the fully standardized locale can be inspected.
Closes: godotengine/godot-proposals#11119