Skip to content

feat(i18n): add Italian (it) locale#30719

Open
bedirhancode wants to merge 1 commit into
anomalyco:devfrom
bedirhancode:i18n/italian-locale
Open

feat(i18n): add Italian (it) locale#30719
bedirhancode wants to merge 1 commit into
anomalyco:devfrom
bedirhancode:i18n/italian-locale

Conversation

@bedirhancode
Copy link
Copy Markdown

Issue for this PR

Closes #28641

Type of change

  • New feature

What does this PR do?

Adds Italian (it) as a selectable language in the Desktop / Web UI. The translation dictionary is the one the original reporter pasted in the issue — I used their work as the source and didn't invent any new translations.

Two small adjustments I made to that source before committing:

  1. The submission had the diacritics stripped from everything — words like più, può, sarà, attività, già, così were all written without their accents, and the other-language labels in the dict were "Espanol", "Francais", "Turkce", "Portugues (Brasil)". I restored the diacritics on the obvious Italian words and put the language labels back into their native scripts so they match en.ts ("Español", "Français", "Türkçe", "Português (Brasil)"). I did not do a full linguistic review — a native Italian speaker should follow up if any phrasing reads off.

  2. I wrote packages/ui/src/i18n/it.ts as an empty placeholder (export const dict: Record<string, string> = {}) so the loader's dynamic import in language.tsx doesn't fail. UI keys fall through to the English base dict via the existing merge logic. I didn't want to invent translations for the UI strings either — leaving that for a native speaker.

Other changes:

  • Wired it into packages/app/src/context/language.tsx: type union, LOCALES, INTL, LABEL_KEY, loaders, localeMatchers. New entries appended at the end, matching the tr precedent.
  • Added "language.it": "Italiano" to every existing locale file (18 files, one line each).
  • Registered it in packages/app/src/i18n/parity.test.ts.

How did you verify your code works?

  • bun run typecheck — clean, 22/22 tasks successful.
  • bun run lint — 0 errors (the 3486 pre-existing warnings are untouched).
  • bun test packages/app/src/i18n/parity.test.ts — passes including the new it locale.
  • Read through en.ts and it.ts side-by-side to confirm the dict has at least the required command.session.previous.unseen / command.session.next.unseen keys and they differ from English.
  • Pre-push husky hook ran the full root bun typecheck before the push and passed.

Screenshots / recordings

No UI rendering change — strings only. The language picker will now list Italian as an option; selecting it switches the visible labels to the Italian dict.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Adds Italian as a selectable language. Translation dict comes from the
submission in anomalyco#28641. Restored the diacritics that were stripped from
the original submission (più, può, sarà, attività, etc.) and the native
scripts on the other-language labels in the dict (Español, Français,
Türkçe, Português (Brasil)) to match en.ts.

Wired it through the loader in packages/app/src/context/language.tsx
(type union, LOCALES, INTL, LABEL_KEY, loaders, localeMatchers), added
language.it: Italiano to every existing locale file, and registered the
new locale in the parity test.

packages/ui/src/i18n/it.ts is an empty placeholder so the loader's
dynamic import succeeds; UI keys fall through to the English dict via
the merge. Happy to leave that for a native speaker to fill in.

Closes anomalyco#28641
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found:

This appears to be a duplicate of the current PR #30719. Both are adding the Italian (it) locale to the i18n system. You should check the status of PR #28232 to see if it's already been merged or closed, and whether the current PR #30719 should be closed in favor of it or vice versa.

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.

[FEATURE]:Full Italian translation for Opencode Desktop

1 participant