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

add two letter language code fallback #213

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

Ruby-Dragon
Copy link
Contributor

If a language is not found in the languages list due to the country code not matching, activate-linux used to fallback to English. This change matches the first two letters of the language code to allow for the closest language found to be used instead.

For example, if someone was using activate-linux in Mexico, their code would be es_MX. Since we do not have an es_MX translation, they would get English instead of Spanish, even though we have an es_ES translation. With this change, somebody with an es_MX code will get the es_ES translation by default. If this behavior is undesired, they can override it using the LANG environment variable.

This solves issue #202

@MrGlockenspiel MrGlockenspiel merged commit 633b280 into MrGlockenspiel:main Sep 5, 2024
5 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