Add Finnish (fi) translations - #142
Open
methodofaction wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:app.ymlcountries.ymlcurrencies.ymlunits.ymlPlus the wiring needed for it to actually ship and be covered:
locales/locales.go— addedfito the//go:embeddirective. 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
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 exceptes, but it's worth a conscious call on whether Finnish should be different.org.party.labels.defaultis "ALV-tunnus" (VAT number) rather than a literal rendering of English "TIN", following whatda/de/nldo.LocaleForExamplecase was added ininternal/gallery/gallery.go— there's nofi-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 withWithLocale("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