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

Fix language code not recognizable due to inconsistent case #178

Merged
merged 3 commits into from
Mar 1, 2024
Merged

Fix language code not recognizable due to inconsistent case #178

merged 3 commits into from
Mar 1, 2024

Conversation

JLChnToZ
Copy link
Contributor

This PR fixes language code not recognizable due to inconsistent case, discovered when we (Traditional Chinese community) working on Traditional Chinese translations.

This was not a problem when there is only Simplified Chinese as there was only one language starts with zh-, but since we have another variant now, it requires to matches the whole language code, letter by letter, not forgiving the cases.

I have let the dictionary ignores the letter cases by explicit tell it to use another comparer for indexing (StringComparer.OrdinalIgnoreCase)

@bdunderscore
Copy link
Owner

bdunderscore commented Feb 29, 2024

Packages/nadena.dev.ndmf/Editor/UI/Localization/LanguagePrefs.cs(133,34): warning CS0168: The variable 'e' is declared but never used
Packages/nadena.dev.ndmf/Editor/UI/Localization/Localizer.cs(140,34): error CS0136: A local or parameter named 'lookup' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter

@bdunderscore bdunderscore merged commit eaf5137 into bdunderscore:main Mar 1, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants