-
-
Notifications
You must be signed in to change notification settings - Fork 15
Add support for regionalized locales and add further langs #350
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
Conversation
When we use the full locale, i18n does the fallback from e.g. de-DE-bavarian --> de-DE --> de, see https://vue-i18n.intlify.dev/guide/essentials/fallback#implicit-fallback-using-locales This also required to migrate the stored ISO 639‑1 two letter codes to the new full locales. Also added Latvian, Portuguese (Brazil), Russian, Ukrainian, Chinese (Taiwan)
WalkthroughThis change set updates the localization and internationalization infrastructure across the project. In the backend, a database migration modifies the "user_details" table to use region-specific locale codes (e.g., 'en-US') instead of generic two-letter codes. The frontend's i18n setup is refactored to use these full locale identifiers, with new translations added for Latvian, Brazilian Portuguese, Russian, Ukrainian, and Traditional Chinese (Taiwan). The changelog is updated to reflect these additions. Additionally, logic in the admin settings component is simplified by removing locale-based URL construction for subscription management. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–20 minutes Possibly related PRs
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
overheadhunter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the fallback mechanism yet. How does pt-BR know what resources to load when falling back to pt?
The magic is in the "fallback chain algorithm" defined in https://github.com/intlify/vue-i18n/blob/master/packages/core-base/src/fallbacker.ts together with https://github.com/intlify/vue-i18n/blob/master/packages/core-base/src/translate.ts If I understand the code correctly, if we have no in As we also have e.g. in https://github.com/intlify/vue-i18n/blob/master/packages/core-base/src/translate.ts#L818-L930 we iterate over each locale and do |
When we use the full locale, i18n does the fallback from e.g. de-DE-bavarian --> de-DE --> de, see https://vue-i18n.intlify.dev/guide/essentials/fallback#implicit-fallback-using-locales
This also required to migrate the stored ISO 639‑1 two letter codes to the new full locales.
Also added Latvian, Portuguese (Brazil), Russian, Ukrainian, Chinese (Taiwan)
I also removed
https://cryptomator.org/${languagePathComponent}hub/billing/*because imo this is getting to complicated and error prone with regionalized locales in comparison to the benefit we get from it.