Skip to content

Add 15 new apps and localize 15 existing apps (i18n) - #57

Open
avandeputte wants to merge 3 commits into
csader:mainfrom
avandeputte:feat/i18n-apps
Open

Add 15 new apps and localize 15 existing apps (i18n)#57
avandeputte wants to merge 3 commits into
csader:mainfrom
avandeputte:feat/i18n-apps

Conversation

@avandeputte

Copy link
Copy Markdown
Contributor

Summary

Adds 15 new apps and localizes 15 existing ones, building on the i18n foundation in #56.

Important

Depends on #56 — please merge that first. These apps receive i18n / get_weather / get_location through the runtime injection added there. This branch is stacked on #56, so GitHub will show its commits in the diff until #56 merges; this PR's own changes are confined to apps/.

New apps (15)

advice · aurora · cat-facts · earthquakes · exchange-rates · formula1 · holidays · metals · quote · rocket-launch · sarcastic-fortune-cookies · sun-times · tides · useless-fact · wiki-today

Localized / enhanced in place (15)

bitcoin-fear-greed · countdown · crypto · dashboard · date · iss · moon-phase · sports · stocks · time · time-since · weather · word-clock · word-of-the-day · world_clock

These are replaced in place because they're genuine feature upgrades rather than pure translation — e.g. weather gains AQI/UV/pollen, word-clock is a multilingual rewrite, dashboard now pulls the shared get_weather helper.

Notes

  • Graceful degradation. i18n, get_weather and get_location are optional parameters defaulting to None, so every app still runs (in English) on a server without the foundation.
  • Currency handling. crypto, metals and stocks show the local currency when i18n is on, and fall back to ASCII currency codes when it's off — the basic charset can't render € £ ¥, so emitting them would just produce garbage flaps.
  • Foreign exchanges. stocks resolves per-ticker currency from yfinance, including London's GBp/pence quoting.

Testing

Full suite green (52 tests). Deterministic apps verified in both EN and FR, and run end-to-end on real hardware.

🤖 Generated with Claude Code

avandeputte and others added 3 commits July 11, 2026 18:03
…ers)

Adds an opt-in internationalization foundation that apps can adopt without
breaking the existing app contract:

- server/i18n.py + server/i18n_data.json: logic/data split. Translations are
  grouped by semantic topic domain (gettext msgctxt model) so homographs stay
  distinct (weather HIGH vs tides HIGH). ~34 languages, incl. regional variants
  that inherit their base language. Each key carries a translator 'context' note.
- server/location.py + server/weather.py: one shared geocoder, babel-backed
  currency/country (no hardcoded tables), 10-minute TTL-cached weather.
- Runtime injection: get_plugin_pages inspects fetch()'s signature and passes
  i18n / get_weather / get_location only when the app declares them. Classic
  4-arg apps are completely untouched.
- Settings: an 'Enable internationalization' master toggle (DEFAULT OFF) gates
  the Language selector and the app badge. With it off the UI and behaviour are
  identical to today -- the toggle carries a disclaimer that it needs modules on
  Universal Firmware with configurable character maps.
- babel is a soft dependency; i18n.py falls back to English without it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The gateway receive path decoded/re-encoded frames as UTF-8 with
errors=ignore, which silently dropped lone high bytes (0x80-0xFF). That
corrupted a module's A-command character-map sync for any reel set with
extended (international) glyphs. Decode and re-encode with latin-1 instead
-- a transparent byte<->code-point codec -- so the raw cp1252 bytes survive
to the downstream .decode('cp1252'). Adds a regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New apps: advice, aurora, cat-facts, earthquakes, exchange-rates, formula1,
holidays, metals, quote, rocket-launch, sarcastic-fortune-cookies, sun-times,
tides, useless-fact, wiki-today.

Localized/enhanced in place: bitcoin-fear-greed, countdown, crypto, dashboard,
date, iss, moon-phase, sports, stocks, time, time-since, weather, word-clock,
word-of-the-day, world_clock.

Every app keeps the classic contract and degrades gracefully: i18n, get_weather
and get_location are optional parameters defaulting to None, so each app still
runs in English. Currency-bearing apps (crypto, metals, stocks) show the local
currency when i18n is on and fall back to ASCII currency codes when it is off,
since the basic charset cannot render the EUR/GBP/JPY symbols.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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