Skip to content

feat(i18n): add Italian language support#2590

Open
brayanjeshua wants to merge 2 commits into
evolution-foundation:mainfrom
brayanjeshua:feat/add-italian-language-support
Open

feat(i18n): add Italian language support#2590
brayanjeshua wants to merge 2 commits into
evolution-foundation:mainfrom
brayanjeshua:feat/add-italian-language-support

Conversation

@brayanjeshua

@brayanjeshua brayanjeshua commented Jun 16, 2026

Copy link
Copy Markdown

Summary

  • Add src/utils/translations/it.json with full Italian translations for QR code flows, Chatwoot inbox messages, message import, location/contact formatting, and error states
  • Register it in the languages array in src/utils/i18n.ts
  • Document it as a valid option for LANGUAGE in .env.example

Test plan

  • Set LANGUAGE=it in .env and start the server
  • Verify QR code and connection messages appear in Italian via Chatwoot inbox
  • Verify fallback to en still works when LANGUAGE is unset

Summary by Sourcery

Add Italian as a supported application language and wire it into the existing i18n system.

New Features:

  • Introduce Italian (it) locale to the i18n configuration and translations library.

Documentation:

  • Document Italian as a valid LANGUAGE option in the environment configuration example.

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.
@sourcery-ai

sourcery-ai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds 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 translations

flowchart 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
Loading

File-Level Changes

Change Details Files
Register Italian as a supported language in the i18n configuration so it can be selected via the LANGUAGE setting.
  • Extend the languages array to include the it locale code alongside existing languages.
  • Ensure that the i18n loader will look for an Italian translations file under the existing translations directory.
src/utils/i18n.ts
Provide the actual Italian translation resources used by the i18n system.
  • Add a new it.json translation bundle with Italian strings for QR code flows, Chatwoot inbox messages, message import, location/contact formatting, and error states.
  • Align the translation keys and structure with existing locales so runtime lookups behave consistently.
src/utils/translations/it.json
Document Italian as a valid LANGUAGE option for configuration.
  • Update the example environment configuration to list it as an accepted LANGUAGE value.
  • Clarify that setting LANGUAGE=it should enable Italian translations while preserving fallback to English when LANGUAGE is unset.
.env.example

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/utils/i18n.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant