Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Electron i18n language setup #2961

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

rique223
Copy link
Collaborator

Added a safety check at the end of the getLng function. This check verifies if translations exist for the language portion of a locale (e.g., 'en' from 'en-US') when the full locale isn't found in the resources object. This prevents errors when translations exist for a base language but not for a specific regional variant.

Demo gif:
electron_language

Closes #2960

Added a safety check at the end of the getLng function. This check verifies if translations exist for the language portion of a locale (e.g., 'en' from 'en-US') when the full locale isn't found in the resources object. This prevents errors when translations exist for a base language but not for a specific regional variant.
@rique223 rique223 changed the title fix: Add fallback for full locales fix: Electron i18n language setup Oct 23, 2024
@rique223 rique223 requested a review from jeanfbrito October 25, 2024 19:56
@rique223 rique223 merged commit 4b4640a into master Nov 12, 2024
7 checks passed
@rique223 rique223 deleted the fix/i18n-translation-fallback branch November 12, 2024 17:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Russian translation i18n is not applied (4.0.2 and above)
2 participants