Skip to content

Add Finnish (fi) translations - #142

Open
methodofaction wants to merge 1 commit into
mainfrom
claude/finnish-language-translations-608db0
Open

Add Finnish (fi) translations#142
methodofaction wants to merge 1 commit into
mainfrom
claude/finnish-language-translations-608db0

Conversation

@methodofaction

Copy link
Copy Markdown
Contributor

Adds Finnish as a supported language.

What changed

New locale in locales/fi/, mirroring the structure of the existing non-English locales (da/de/nl/no), with exact key parity verified against them:

File Keys
app.yml 514 — reuses the YAML anchors so invoice translations merge into the payment, delivery and order documents
countries.yml 249 country names
currencies.yml 166 currency names
units.yml 57 symbol-less units

Plus the wiring needed for it to actually ship and be covered:

  • locales/locales.go — added fi to the //go:embed directive. Without this the files are silently excluded from the binary.
  • components/t/units_test.go — added "fi" to both locale lists, so the unit-coverage tests apply to it.

Notes for reviewers

  • Units use the partitive plural, since they render directly after a quantity: "20 tuntia", "5 kappaletta", "2 laatikkoa".
  • Regime-specific titles fall back to English. The regimes.* keys (PT document codes, GR/CO/IT/SG titles, PL KSeF) are not translated, so e.g. a PT delivery note still renders "Delivery note". This matches every non-English locale except es, but it's worth a conscious call on whether Finnish should be different.
  • org.party.labels.default is "ALV-tunnus" (VAT number) rather than a literal rendering of English "TIN", following what da/de/nl do.
  • No LocaleForExample case was added in internal/gallery/gallery.go — there's no fi- prefixed example, so it would be dead code. Worth adding when a Finnish example lands.

Testing

go vet ./... and the full test suite pass. I also rendered invoice, credit note, purchase order, delivery note, and multi-method payment receipt examples with WithLocale("fi") and read through the output — headings, summary, lines, totals, taxes, payment instructions and payment terms all come out in Finnish.

🤖 Generated with Claude Code

Adds a complete Finnish locale following the structure of the existing
non-English locales (da/de/nl/no), with exact key parity against them:

- app.yml: 514 keys, reusing the YAML anchors so invoice translations
  merge into the payment, delivery and order documents
- countries.yml: 249 country names
- currencies.yml: 166 currency names
- units.yml: 57 symbol-less units in partitive plural, so they read
  correctly after a quantity ("20 tuntia", "5 kappaletta")

Also registers the locale so it actually ships and is covered:

- locales.go: add fi to the //go:embed directive, without which the
  files are silently excluded from the binary
- units_test.go: add "fi" to both locale lists so the unit coverage
  tests apply to it

Like the other non-English locales apart from es, the regime-specific
titles (regimes.*) are left untranslated and fall back to English.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@methodofaction
methodofaction requested a review from rilla August 17, 2026 08:22
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.

1 participant