Skip to content

Add European Portuguese (pt-PT) language - #802

Merged
GLinnik21 merged 5 commits into
plxnative:mainfrom
tiper:locale-pt-PT
Oct 16, 2026
Merged

GLinnik21 merged 5 commits into
plxnative:mainfrom
tiper:locale-pt-PT

Conversation

@tiper

@tiper tiper commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Adds Português (Portugal) as a language, alongside English, Spanish, French, Belarusian and Italian.

What changes

  • The four catalogs under locales/pt-PT/ (core, browse, settings, widgets), translating every source key. Placeholders, plural forms and shared vocabulary follow docs/localization.md.
  • Wiring: the catalog compiler's locale list and plural requirements, the Preference and Language enums, the saved-preference slot, the Language page, and docs/localization.md.
  • A television set to pt, pt-PT or another non-Brazilian Portuguese region resolves to it. pt-BR keeps the English fallback instead of reading Portugal's Portuguese as its own, because the two differ in spelling and vocabulary. The language list shows "Português", like "Español", since Brazilian Portuguese is not offered beside it.
  • Plurals use pt-PT's CLDR rules (one, many, other): zero takes the plural form ("0 episódios"), unlike Brazilian Portuguese.
  • Every per-language text-fit and formatting test now covers pt-PT. Strings that overflowed their slots on the TV's glyph widths are reworded shorter with their meaning kept. The diagnostics row keys use "Transf." and "Plano vídeo" to fit their gutter.

The translation was drafted with Claude (Anthropic's AI assistant) and reviewed by me, a native European Portuguese speaker

Adds Português (Portugal) as a UI language: the four catalogs under
locales/pt-PT, translated with Portugal's spelling and vocabulary (ecrã,
ficheiro, utilizador, reprodução), wired into the catalog compiler, the
Preference/Language enums, the saved-preference slot and the Language page.
The language list shows Português, like Español, since Brazilian
Portuguese is not offered beside it.

A television set to pt, pt-PT or another non-Brazilian Portuguese region
resolves to it; pt-BR keeps the English fallback rather than reading
Portugal's Portuguese as its own. Plurals follow pt-PT's CLDR rules, so
zero takes the plural form ("0 episódios"), unlike Brazilian Portuguese.

Every per-language text-fit and formatting test now covers pt-PT; strings
that overflowed their slots on the TV's glyph widths are reworded shorter
with their meaning kept. The translation guide names the new catalog.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Tiago Pereira <[email protected]>
@tiper tiper changed the title Add European Portuguese (pt-PT) UI language Add European Portuguese (pt-PT) language Oct 15, 2026
@GLinnik21

Copy link
Copy Markdown
Collaborator

Thanks for the translation! Since you opened this, main gained a language registry: a language is now just locales/<tag>/ plus one line in locales/languages.json, with no Rust changes. We've reworked the PR onto that and want to push it to your branch, keeping your authorship. Could you tick "Allow edits by maintainers" on this PR?

GLinnik21 and others added 2 commits October 16, 2026 15:51
Adds locales/pt (the contributor's pt-PT catalogs, reconciled with the current English source:
English-only diagnostics keys dropped, the HDR overlay brightness strings added) and one registry
row. A new optional registry field, excluded_regions, keeps pt-BR on the English fallback; the
build validates it and the generated matcher honors it. Plural rules now come from the language's
regional locale so pt-PT counts 0 as plural.

Lands plxnative#802 by @tiper.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: Tiago Pereira <[email protected]>
main gained a data-driven language registry (plxnative#801) and English-only
technical strings (plxnative#806), so the language needs no Rust wiring now: the
catalogs move to locales/pt/ with one locales/languages.json row (region
pt-PT, excluded_regions ["BR"] so pt-BR keeps the English fallback), and
the hand-wired Rust changes from this branch are superseded by main's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tiper

tiper commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the translation! Since you opened this, main gained a language registry: a language is now just locales/<tag>/ plus one line in locales/languages.json, with no Rust changes. We've reworked the PR onto that and want to push it to your branch, keeping your authorship. Could you tick "Allow edits by maintainers" on this PR?

😅 Apologies, unsure why it got ticket in the first place.

@GLinnik21
GLinnik21 merged commit 635b51a into plxnative:main Oct 16, 2026
13 checks passed
@tiper
tiper deleted the locale-pt-PT branch October 17, 2026 23:15
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.

2 participants