-
Notifications
You must be signed in to change notification settings - Fork 2.6k
I18n #1584
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
|
|
This pull request is quite large, with 54 files changed and over 2000 lines added. To improve reviewability and focus, it might be beneficial to split this into smaller pull requests. Here are some suggestions on how to split the changes:
This separation will help reviewers focus on specific areas and ensure a more thorough review process. Thank you! |
|
Hi, @mrubens, in the Chinese locale, renaming the language translation folder from zh-cn to zh-CN still works correctly. This is likely because the i18n mechanism follows the UTS language identifier specification. |
Yes, I was surprised/frustrated that zh-cn (the format used by vscode) did not work in i18next! Took way too long to figure out why. How does this PR look to you? Basically trying to set us up to have the webview translations in sync with the extension translations. |
This looks awesome! 🎉 I really like the direction you’re taking with syncing the webview translations with the extension translations. It’s a great step towards consistency and improving the overall user experience. |
cb62b07 to
a641329
Compare
cte
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.
👏
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.
The pattern for extracting values from events (casting to CustomEvent or HTML input) is repeated across multiple onChange handlers. Consider extracting a helper function to reduce duplication and enhance readability.
Context
This is another take on #1538 to lay the foundation for internationalization. Thanks @feifei325 for getting the ball rolling!
Basically this PR:
Once this stabilizes we should come up with a plan for internationalizing and then translating the rest of the extension, including the extension backend.
Important
Integrates i18next for internationalization, removes 'preferred language' setting, and updates UI components for translation support in
webview-ui.i18nextfor language support inwebview-ui.TranslationProviderinApp.tsxfor context-based translations.__mocks__/i18nfor testing.jest.config.cjsto include i18n mocks.ChatView.tsxto usetfunction for translations.PromptsView.tsxto reflect language changes..gitkeepfiles for locale directories.package.jsonwith i18n dependencies.This description was created by
for 37e0648695091bc44c52588409de7767f2665430. It will automatically update as commits are pushed.