Add new localisations

Aperta
#647 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Leggi src/i18n/index.ts e confronta src/i18n/locales/en.json con i file delle locale esistenti; esamina .github/workflows/test.yml e le issue correlate #429, #270 e #538. Traccia l’impatto su supportedLngs e formatLanguageLabel(). Il lavoro è completato quando la registrazione delle locale, la validazione della completezza in CI, le indicazioni per contribuire alle traduzioni e la copertura delle locale esistenti soddisfano i criteri di accettazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Context

Derived from requirement RF-PCE-002

Scope

Widen the editor's UI localisation so that every country contributing to the European
software catalogue can use it in its own language. Five locales are missing — Spanish,
Portuguese, Swedish, Finnish and Greek — and each is tracked as a sub-issue of this one,
so they can be picked up independently by different translators.

This issue covers the work that is not per-language:

  • Make locale registration less manual. Each locale is currently wired in by hand,
    with both a JSON import and an entry in the resources map in src/i18n/index.ts.
    Doubling the number of locales is the moment to fix that, so adding a further language
    is a matter of dropping in a file.
  • Catch incomplete translations automatically. Locales drift out of sync with
    en.json and nothing detects it — #429 and #270 both exist for that reason. A missing
    key should fail CI, not reach production as an untranslated string.
  • State how translations are maintained. Ten locales cannot be kept current by
    ad-hoc effort; the project needs a documented path for contributing and reviewing a
    translation.
  • Bring the existing locales up to the same bar (de, fr, it, nl), or file
    their gaps separately.

The requirement is about UI string coverage, not about the language metadata the form
offers for publiccode.yml itself, which already comes from locale-codes.

Affected areas

  • src/i18n/index.ts — imports and the resources map; supportedLngs is derived from
    it, so the language picker and getSupportedLanguages() follow automatically.
  • src/i18n/locales/ — currently de, en, fr, it, nl; en.json (~23 KB) is the
    reference for the key structure.
  • .github/workflows/test.yml — where the completeness check should run.
  • formatLanguageLabel() uppercases the Intl.DisplayNames output, which interacts
    with #538 and deserves a look once a non-Latin script is in the list.

Non-functional constraints

  • RNF-PCE-006 — Long-term sustainability: this is the whole point of the
    infrastructure work above. Without a completeness check and a contribution policy,
    ten locales become ten sources of drift.

Acceptance criteria

  • Adding a locale no longer requires editing the resources map by hand
  • An automated check fails when a locale is missing keys present in en.json, and
    runs in CI
  • The way to contribute and review a translation is documented
  • Existing locales (de, fr, it, nl) pass the completeness check, or their
    gaps are filed separately
  • All five sub-issues closed

Related

  • #429 — missing French translations; the completeness check here would have caught it
  • #270 — Italian localisation quality review
  • #538 — language picker labels, same surface touched here
Lingua principale
TypeScript
Stelle
33
Fork
34
Merge medio
10h 50m
PR unite (30g)
13

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di italia/publiccode-editor

Tutte le issue di italia/publiccode-editor

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.