Skip to content

Add German, Dutch and Turkish languages - #7

Merged
ehcrea merged 1 commit into
mainfrom
claude/project-thread-4xbonr
Oct 28, 2026
Merged

ehcrea merged 1 commit into
mainfrom
claude/project-thread-4xbonr

Conversation

@ehcrea

@ehcrea ehcrea commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Requested by Eren · project thread

What changes

  • A language menu in the header (English, Deutsch, Nederlands, Türkçe; short codes on phones). The choice is saved in the browser, and English stays the default.
  • Everything is translated: interface, calculator names, input labels and options, result rows, warnings, formulas that contain words, sketch labels and animation captions, the theory "?" notes, the material table, the Saved dialog and the PDF report. Dates follow the language.
  • js/i18n.js adds PEC.t(englishText, vars). js/i18n/de.js, nl.js and tr.js map each English text to its translation (686 texts each). Untranslated text falls back to English.
  • A few sketch notes and captions were built by joining pieces of text. They are now whole sentences or templates, so they can be translated.

Tests

  • npm test now also checks that every text the app can show exists in each language and keeps its {placeholders}. It also renders every calculator, option and sketch phase in each language and fails if any text shows up untranslated. 726 tests pass.
  • I checked it in headless Chromium: switched all 17 pages in each language with no console errors, exported a PDF in each language (umlauts and Turkish letters render with the bundled DejaVu font), confirmed the choice survives a reload, and checked the phone layout.

Notes: numbers keep a decimal point in every language, to match the result values. The source-article link titles stay in English because they are the real JPE article names.


Generated by Claude Code

A language menu in the header switches the whole site between English,
German, Dutch and Turkish and remembers the choice. Labels, options,
results, warnings, formulas, sketch texts, theory notes and the PDF
report are translated. Texts stay in English in the code; js/i18n/*.js
map each English text to its translation, and the tests fail when a
text has no translation in a language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtSyM77K7oA3Y95W9AbJRE
@ehcrea ehcrea self-assigned this Oct 28, 2026
@ehcrea
ehcrea merged commit b064865 into main Oct 28, 2026
2 checks passed
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.

2 participants