-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Templates modal pt-BR translation #1120
Templates modal pt-BR translation #1120
Conversation
@gabrielgpavao is attempting to deploy a commit to the Typebot Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe recent update involves internationalization enhancements in the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to filter (2)
- apps/builder/public/locales/en.json
- apps/builder/public/locales/pt-BR.json
Files selected for processing (2)
- apps/builder/src/features/templates/components/TemplatesModal.tsx (5 hunks)
- apps/builder/src/features/templates/data.ts (3 hunks)
Files skipped from review due to trivial changes (1)
- apps/builder/src/features/templates/data.ts
Additional comments: 4
apps/builder/src/features/templates/components/TemplatesModal.tsx (4)
115-122: Ensure that the translation keys generated by
createTranslationKey
are correctly mapped in the translation files. Missing or incorrect keys could lead to display issues for the end-users.159-166: The translation function is used here similarly to the previous hunk. It's important to verify that the translations for these keys are provided for all supported languages to maintain a consistent user experience.
203-210: As with the previous instances, verify that the translation keys generated here are present in the translation files. Additionally, ensure that the fallback text (
template.name
) is appropriate and that it should not be translated or formatted differently.252-270: The translation keys for the selected template's name and description are generated here. It's crucial to ensure that the keys correspond to actual entries in the translation files and that the fallbacks are suitable for display in case translations are missing.
apps/builder/src/features/templates/components/TemplatesModal.tsx
Outdated
Show resolved
Hide resolved
…feat/templates-pt_BR-translation
…feat/templates-pt_BR-translation
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.
It's preferable to avoid getting translations by creating a key dynamically like you did.
Feel free to review this modification :)
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (3)
- apps/builder/src/i18n/en.json
- apps/builder/src/i18n/fr.json
- apps/builder/src/i18n/pt-BR.json
Files selected for processing (3)
- .vscode/settings.json (1 hunks)
- apps/builder/src/features/templates/components/TemplatesModal.tsx (3 hunks)
- apps/builder/src/features/templates/hooks/useTemplates.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- .vscode/settings.json
Additional comments: 5
apps/builder/src/features/templates/hooks/useTemplates.ts (1)
- 4-127: The
useTemplates
hook uses theuseTranslate
hook to provide translations for template properties. Ensure that the translation keys are correctly named and that they correspond to actual translations in the localization files. Additionally, consider adding error handling for translation failures to improve robustness.apps/builder/src/features/templates/components/TemplatesModal.tsx (4)
18-18: The import statement for
useTemplates
has been added correctly. Ensure that theuseTemplates
hook is being used in accordance with the expected behavior and that thetypebot
state management aligns with the application's state management strategy.40-43: Initialization of the
templates
variable using theuseTemplates
hook is correct. However, ensure that the default state forselectedTemplate
is handled correctly in case thetemplates
array is empty.54-54: The modification to the
setTypebot
function to include thename
property from the template is a good addition for maintaining the context of the selected template. Ensure that this change is reflected wherever thetypebot
state is utilized.60-62: The addition of a condition in the
useEffect
hook to prevent refetching the template iftypebot
is already set is a good practice to avoid unnecessary network requests. Verify that this change does not introduce any unintended side effects, especially in scenarios where thetypebot
might need to be refreshed.
Summary by CodeRabbit
New Features
Enhancements