feat(i18n): add Italian language support#2590
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds Italian (it) as a supported UI language, wiring it into the i18n configuration, adding the corresponding translation file, and documenting it as a valid LANGUAGE option in the environment example. Flow diagram for LANGUAGE selection and new Italian translationsflowchart LR
Env["ENV VARIABLE
LANGUAGE"] --> ConfigService
ConfigService -->|get LANGUAGE| i18nModule[i18n_ts]
i18nModule -->|"languages array ['en','pt-BR','es','it']"| Check["[LANGUAGE in languages]"]
Check -->|yes| LoadFile["fs reads
translations/it.json"]
LoadFile --> I18next[i18next.init]
Check -->|no| Fallback["use 'en'"]
Fallback --> LoadEn["fs reads
translations/en.json"]
LoadEn --> I18next
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/utils/i18n.ts" line_range="6" />
<code_context>
import path from 'path';
-const languages = ['en', 'pt-BR', 'es'];
+const languages = ['en', 'pt-BR', 'es', 'it'];
const translationsPath = path.join(__dirname, 'translations');
const configService: ConfigService = new ConfigService();
</code_context>
<issue_to_address>
**suggestion:** Consider deriving the supported languages from the filesystem instead of a hardcoded list.
With `it` added, this might be a good point to infer `languages` from the files in `translationsPath` instead of hardcoding them, so new/removed translation files don’t get out of sync with this array.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
🔴 👎 O suporte ao idioma italiano é aditivo e bem-vindo, mas o PR aponta para |
Add Italian (it) translations covering QR code, Chatwoot inbox, message import, location/contact messages, and error states. Register the new locale in i18n.ts and document it in .env.example.
62f36aa to
b20b947
Compare
|
Já corrigi o PR e reabri direcionando para a branch develop. |
|
Hi team 👋 Just wanted to follow up on this PR. I've addressed both points raised in the review:
The Italian translation file is complete and covers QR code flows, Chatwoot inbox messages, message import, location/contact formatting, and error states — all aligned with the existing locale structure. Would love to get a review when you have a moment. Thanks! 🙏 |
Summary
src/utils/translations/it.jsonwith full Italian translations for QR code flows, Chatwoot inbox messages, message import, location/contact formatting, and error statesitin the languages array insrc/utils/i18n.tsitas a valid option forLANGUAGEin.env.exampleTest plan
LANGUAGE=itin.envand start the serverenstill works whenLANGUAGEis unsetSummary by Sourcery
Add Italian as a supported application language and wire it into the existing i18n system.
New Features:
Documentation: