Skip to content

Expose TranslationServer::standardize_locale add_default param publicly#98972

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
dbnicholson:standardize-add-defaults
Nov 22, 2024
Merged

Expose TranslationServer::standardize_locale add_default param publicly#98972
Repiteo merged 1 commit intogodotengine:masterfrom
dbnicholson:standardize-add-defaults

Conversation

@dbnicholson
Copy link
Copy Markdown
Contributor

@dbnicholson dbnicholson commented Nov 8, 2024

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

@dbnicholson dbnicholson requested review from a team as code owners November 8, 2024 17:52
@AThousandShips AThousandShips added this to the 4.x milestone Nov 8, 2024
@adamscott adamscott changed the title Expose standardize_locale add_default param publicly Expose TranslationServer::standardize_locale add_default param publicly Nov 8, 2024
Copy link
Copy Markdown
Member

@bruvzg bruvzg left a 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.

@dbnicholson dbnicholson force-pushed the standardize-add-defaults branch from 5e13843 to a71dad5 Compare November 12, 2024 13:00
@dbnicholson dbnicholson requested review from a team as code owners November 12, 2024 13:00
@dbnicholson dbnicholson force-pushed the standardize-add-defaults branch from a71dad5 to 02a776b Compare November 12, 2024 16:17
@dbnicholson
Copy link
Copy Markdown
Contributor Author

I rebased and fixed up the conflict from #98743.

Copy link
Copy Markdown
Contributor Author

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.

@dbnicholson
Copy link
Copy Markdown
Contributor Author

@bruvzg could I get another review? Thanks!

@dbnicholson dbnicholson force-pushed the standardize-add-defaults branch 2 times, most recently from 95db239 to 6930f0a Compare November 19, 2024 19:14
Copy link
Copy Markdown
Member

@Mickeon Mickeon left a 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

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Nov 21, 2024
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.
@dbnicholson dbnicholson force-pushed the standardize-add-defaults branch from 6930f0a to 6f4fadf Compare November 21, 2024 23:50
@Repiteo Repiteo merged commit f952bfe into godotengine:master Nov 22, 2024
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented Nov 22, 2024

Thanks!

@dbnicholson dbnicholson deleted the standardize-add-defaults branch November 22, 2024 18:09
@astratgeovendi01

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose standardized locales with added defaults

8 participants