Skip to content
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

Disallow usage of string.To{Upper,Lower}() without explicit culture #18834

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Jun 24, 2022

Same as ppy/osu-framework#5261. Vaguely related to #18729.

I have changes planned to address the issue linked by replacing humanizer methods with game-side fixed copies but I'm PRing this separately to reduce size since this touches a good few files.

Guidelines taken when replacing:

  • String is not user-facing (lookup string, filename) => convert as invariant
  • String is user-facing in a context where localisation doesn't matter (tourney client, visual tests) => convert as invariant
  • String is user-facing but localisation is not easy to support for whatever reason => convert as invariant for now
  • String is user-facing and can be easily localised => use LocalisableString (two cases of this here).

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.

2 participants