italia / italia/publiccode-editor
add Portuguese localisation
- Dominant language
- TypeScript
- Stars
- 32
- Forks
- 33
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 16
Description
## Context
Derived from requirement **RF-PCE-002**. Part of #647.
## Scope
Add the Portuguese (`pt`) UI localisation: translate every string the editor exposes,
using `en.json` as the reference for the key structure.
Use the generic `pt` tag rather than a country-specific one. The i18n setup has
`nonExplicitSupportedLngs: true`, so a browser reporting `pt-PT` or `pt-BR` resolves to
`pt` with no extra configuration. Where the two variants diverge, prefer European
Portuguese, since the requirement targets contributors to the European catalogue.
## Affected areas
- `src/i18n/locales/pt.json` — new file, mirroring the keys of `en.json` (~23 KB)
- `src/i18n/index.ts` — register the locale so it appears in the language picker
## Non-functional constraints
- **RNF-PCE-006 — Long-term sustainability**: the translation has to stay complete after
merge, so it must pass the completeness check introduced in #647.
## Acceptance criteria
- [ ] `pt.json` covers every key present in `en.json`
- [ ] The locale is selectable in the language picker
- [ ] The translation is reviewed by a Portuguese speaker
- [ ] Terminology is consistent with the `publiccode.yml` specification: field names and
standard terms keep their meaning rather than being translated ad hoc
Contributor guide
Research direction
Start by comparing the keys in src/i18n/locales/en.json with the new src/i18n/locales/pt.json, then inspect src/i18n/index.ts to see how locales are registered and exposed in the language picker. Translate every editor string into European Portuguese, preserving publiccode.yml field names and standard terminology. Run the completeness check introduced in #647 and confirm Portuguese appears in the picker; a Portuguese speaker must review the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- localization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100