mirror of
https://github.com/bitbaum/solon.git
synced 2026-12-04 05:07:04 +01:00
* feat: one currency and one language for the reader; codes read from their Word files Money: every amount on the budget and comparison pages is in the currency the reader picks (?in=, CHF by default), converted at the budget year's average rate, and the page says from what and whose rate. Rates are data (data/money/rates.json, pnpm run money:rates): Eurostat's annual euro rates for 151 currencies and, for the rouble after 2021, the Bank of Russia's official rate averaged over the year. src/lib/money imports nothing from Solon, ready to become the fleet's package. Eurostat budgets are now also read in million euro beside the shares of GDP (generated from the same taxonomies); a budget knows its GDP, so both show. Language: a law in another language reads in the reader's, as a machine translation labelled as one with the authentic text a click away. The translations are a cache keyed by the sha256 of the words (text_translations, migration 0030), each answer checked before it is kept (one per passage, every number kept, no passage ballooned); titles in lists use it too, and pnpm run law:translate fills titles ahead of readers. Places are named in the reader's language when the data has the name (Tskhinval, not город Цхинвал), their own names still listed. Texts: a South Ossetian code printed as a page linking Word files is read from the file worded as its text (never the contents file), with word-extractor; --stubs reads again the acts held only as such a page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmuJdjaMYdbLjujoC3k * feat(i18n,money): every page in the reader's language and one currency - Money defaults to US dollars; the reader's choice is remembered site-wide in a cookie (/api/preferences/currency) and used by budgets, contested places and the structures comparison, which now adds the reader's equivalent beside an amount quoted in its own currency. - Configured words (statistics scales, tax forms, budget lines and their COFOG/ESA labels, source attributions, publishers) get their other languages from one catalog, data/i18n/config.json, keyed by the English. localized() and cite() read it; a test fails while any text a translated page shows lacks a language; pnpm run i18n:config reports gaps. - Citations rewritten in English instead of mixed Russian/English; source lists show the localized attribution; budget document captions read in the reader's language with the original quoted below. - The voting method lab and South Ossetia's legislative route translated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmuJdjaMYdbLjujoC3k --------- Co-authored-by: Claude <noreply@anthropic.com>