docs(i18n): add Finnish translation - #18
Merged
Merged
Conversation
English moves under docs/en/ and mkdocs-static-i18n serves Finnish from docs/fi/ in folder mode, the structure HALPI2 settled on: suffix mode interleaves markdown with assets once there is more than one language. print-site is removed. It has no i18n support, so it would either bundle every language into one PDF or point Finnish pages at an English one. That also removes the print button from the English site — a visible change. edit_uri pointed at halmet-docs/docs/, a path this repository does not have, so every 'edit this page' pencil led nowhere. Verified against the GitHub API before changing it. The glossary is HALPI2's, kept deliberately so the two products do not describe the same part with two Finnish words, plus a HALMET section for the input-circuit vocabulary HALPI2 never needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All eight pages, plus the anchor pass: the GPIO Reference heading becomes GPIO-taulukko, so the one cross-page fragment pointing at it needed mapping. Anchors break only once the target page is translated, which is why it was invisible before this commit. The typography checker read a table's alignment row — | ---: | — as a space before a colon. HALPI2 has no right-aligned columns, so the blind spot never showed there; the same fix is owed to that repository. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Translation statusfi — 8 current Every translation of the pages in scope is current. |
Collaborator
Author
|
print-site removal is tracked in #19. |
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 second language, and the machinery that keeps a translation honest once the English moves on.
Why
HALMET's readers are largely the same people as HALPI2's, and that documentation now ships in ten languages. Finnish first, on the same footing.
Structure
English moves under
docs/en/and Finnish lives at the mirrored path underdocs/fi/, served bymkdocs-static-i18nin folder mode. That is the structure HALPI2 settled on after starting with suffix mode: suffix interleaves markdown with assets in shared directories, which stops scaling as soon as there is more than one translation. Only markdown lives underdocs/fi/; images stay with the English source and are shared.The glossary is HALPI2's, deliberately
solutions/translation/finnish-glossary.mdbegan as a copy of HALPI2's. Keeping it means two Hat Labs products do not describe the same part with two different Finnish words —carrier board→emolevyis Matti's call there and stands here too. A HALMET section adds the ~70 terms this product needs and HALPI2 never did:digitaalitulo,vakiovirtalähde,juotossilta,ylös-/alasvetovastus,alipäästösuodin,galvaaninen erotus,porrasterä.The file records that a shared row must change in both repositories or in neither.
One decision worth a second opinion: the shared glossary renders both
connectorandheaderasliitin. HALMET puts the two side by side more often than HALPI2 does — 1-Wire header connector, analog input connectors — and the glossary now says to let the qualifier carry the distinction rather than invent a second word. If that reads wrong to a Finnish reader, the glossary is where to change it.Verification
mkdocs build --strictcheck_anchors.pycheck_typography.pycheck_glossary.pytranslation_status.pyfi: current=8The numeric check matters most here: these pages carry input voltage limits, fuse ratings, threshold voltages and cutoff frequencies. A drifted digit is a hardware problem, not a typo.
Two things fixed along the way
edit_uriwas broken before this branch. It pointed atedit/main/halmet-docs/docs/, a path this repository does not contain, so every "edit this page" pencil led nowhere. Verified against the GitHub API rather than assumed:halmet-docs/docs/index.mdreturns 404,docs/index.mdreturns 200. Nowedit/main/docs/, which the i18n plugin completes with the language folder — English pencils point atdocs/en/, Finnish ones atdocs/fi/.check_typography.pyhad a blind spot. It read a table's alignment row —| ---: |— as a space before a colon. HALPI2 has no right-aligned columns, so this never surfaced there. Fixed here; the same fix is owed to HALPI2, whose copy still has it.print-site is removed
mkdocs-print-site-pluginhas no i18n support: it builds one print page for the default language, so every Finnish page would have linked to an English PDF under an English tooltip. Removing it also removes the printer button from the English site — a visible change, tracked in the accompanying issue rather than left to be noticed.What this needs from a reader
The Finnish is unreviewed by anyone other than its author. The mechanical checks above cover structure, anchors, numbers, typography and terminology; none of them can tell whether a sentence about pull-up resistors says the right thing about pull-up resistors.
Corrections belong in
solutions/translation/finnish-glossary.mdas well as in the pages, so the next translator inherits them.🤖 Generated with Claude Code