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 some vaild lang_result that get incorrectly fallbacked #42

Merged
merged 3 commits into from
Apr 7, 2024

Conversation

libenc
Copy link
Contributor

@libenc libenc commented Feb 16, 2024

Fix #41

@opsdisk
Copy link
Owner

opsdisk commented Apr 4, 2024

Good point about the breaking changes @libenc. The source of truth is the case-sensitive languages in the result_languages.txt file (which is from Google (#41 (comment)) . I like your original code in the PR to make the lang_result match what is exactly in result_languages.txt file.

I played around with just lowercasing everything, but when using the Chrome browser, Google only respected the lang_result when the case was exactly correct ("lang_zh-CN" worked and "lang_zh-cn" didn't).

Bump the version to "1.10.0" and then I'll update the README with your contribution.

@libenc libenc requested a review from opsdisk April 7, 2024 00:29
@opsdisk
Copy link
Owner

opsdisk commented Apr 7, 2024

Thank you @libenc! I also added you to the contributors section of the README.

@opsdisk opsdisk merged commit fb50cf8 into opsdisk:master Apr 7, 2024
2 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.

Some valid lang_result with capitalized parts will be incorrectly fallback to the lang_en
2 participants