Skip to content

feat(admin): add Italian (it) locale#2182

Open
micio86dev wants to merge 1 commit into
emdash-cms:mainfrom
micio86dev:feat/italian-locale
Open

feat(admin): add Italian (it) locale#2182
micio86dev wants to merge 1 commit into
emdash-cms:mainfrom
micio86dev:feat/italian-locale

Conversation

@micio86dev

Copy link
Copy Markdown

What does this PR do?

Adds Italian (it) as a supported admin UI language.

  • Registers it (Italiano) in packages/admin/src/locales/locales.ts, in alphabetical position between Indonesian and Japanese, with enabled: true.
  • Adds a fully translated catalog at packages/admin/src/locales/it/messages.poall 1932 strings translated (0 empty msgstr).

Translation notes:

  • A shared glossary was used for term consistency (Collezione, Campo, Bozza, Pubblica/Pubblicato, Firma for "byline", Impostazioni, etc.).
  • Established technical terms and brand/format names are kept as-is per Italian software convention (slug, tag, plugin, widget, media, dashboard, SQL/JSON/HTML, GitHub, etc.).
  • ICU plural branches use Italian one/other with correct gender/number agreement; #, {placeholders}, <0>…</0> inline tags and escapes are preserved verbatim.

No linked issue — per CONTRIBUTING.md, translations are opened directly.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable) — n/a, this is catalog data; the existing loadMessages test already covers every enabled locale
  • User-visible strings in the admin UI are wrapped for translation (if applicable) — n/a, no source strings changed; this only adds a locale catalog, which is exactly what a translation PR should include
  • I have added a changeset
  • New features link to an approved Discussion — n/a (translation)

Note on the unchecked build boxes: I was unable to run pnpm typecheck / pnpm lint / pnpm test / pnpm format locally — pnpm install fails on my machine with filesystem errors (ERR_PNPM_EINVAL / EILSEQ / ENOENT) while writing the store on this volume, so the workspace never links. I did validate the catalog offline instead: 1932/1932 entries parse with valid gettext escaping, 0 unbalanced braces, ICU plural shape matches the English source for every plural entry, and {placeholder}/tag parity holds against en/messages.po. The locales.ts change is a single line matching the 20+ sibling entries. Please let CI run the authoritative checks.

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Opus 4.8 (translation of the catalog and the locale registration)

Screenshots / test output

Offline catalog validation:

enEntries: 1932
itEntries: 1932
emptyMsgstr: 0
ICU/brace issues: 0
placeholder-parity problems: 0 (real)

Add a fully translated Italian admin UI catalog (1932 strings) and enable
the it locale in the source-of-truth locale list.
@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0b9a5ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@emdash-cms/admin Minor
emdash Minor
@emdash-cms/cloudflare Minor
@emdash-cms/sandbox-workerd Patch
@emdash-cms/plugin-mcp-smoke Major
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/auth Minor
@emdash-cms/blocks Minor
@emdash-cms/gutenberg-to-portable-text Minor
@emdash-cms/x402 Minor
create-emdash Minor
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added review/needs-review No maintainer or bot review yet area/admin size/XL labels Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 8,825 lines across 3 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@emdashbot emdashbot 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.

This is the right change at the right scope: it adds a fully translated Italian admin catalog and enables it in the canonical locale list. There is no architectural, security, or logged-out query-count concern, and the change is additive.

I checked:

  • packages/admin/src/locales/locales.tsit (Italiano) is inserted alphabetically between id and ja, with enabled: true and default LTR direction (correct).
  • .changeset/italian-locale.md — a minor changeset for @emdash-cms/admin, led with a present-tense verb, describing the user-facing effect.
  • packages/admin/src/locales/it/messages.po — 1932/1932 entries match the English msgid set exactly, zero empty msgstr, plural branch shapes (one/other) and # placeholders are preserved, and inline <0> tags are intact. The existing loadMessages loop over SUPPORTED_LOCALES will exercise the new locale once catalogs are compiled (pnpm locale:compile).
  • lingui.config.ts and lunaria.config.ts pick up it automatically via LOCALE_CODES/TARGET_LOCALES, and copy-locales.js copies the compiled it/messages.mjs without any hardcoded list.

The only issue is a data-quality nit in the PO header. Italian has plural messages, so the catalog should declare the Italian plural formula instead of leaving Plural-Forms blank.

"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Plural-Forms: \n"

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.

[suggestion] The Italian catalog header leaves Plural-Forms empty ("Plural-Forms: \n"). Lingui will infer the one/other rule from the it locale code at compile time, but a complete gettext catalog should declare the plural formula so other PO tooling doesn't have to guess. Sibling catalogs such as de and es-ES already set nplurals=2; plural=(n != 1);, which is exactly the correct formula for Italian.

Suggested change
"Plural-Forms: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

@github-actions github-actions Bot added review/awaiting-author Reviewed; waiting on the author to respond and removed review/needs-review No maintainer or bot review yet labels Jul 21, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@2182

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@2182

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@2182

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@2182

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@2182

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@2182

emdash

npm i https://pkg.pr.new/emdash@2182

create-emdash

npm i https://pkg.pr.new/create-emdash@2182

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@2182

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@2182

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@2182

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@2182

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@2182

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@2182

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@2182

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@2182

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@2182

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@2182

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@2182

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@2182

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@2182

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@2182

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@2182

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@2182

commit: 0b9a5ba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/admin cla: needed review/awaiting-author Reviewed; waiting on the author to respond size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant