Skip to content

2026.03.18#52

Merged
trip5 merged 31 commits intoehradiofrom
dev
Mar 18, 2026
Merged

2026.03.18#52
trip5 merged 31 commits intoehradiofrom
dev

Conversation

@trip5
Copy link
Owner

@trip5 trip5 commented Mar 18, 2026

Languages! (mostly)

kasperaitis and others added 30 commits February 23, 2026 14:13
Audio: Add trimming and quick-ignore logic for common placeholder StreamTitle values (empty or "-") in both I2S_Audio and VS1053 implementations; strip surrounding quotes/whitespace, avoid logging/dispatching placeholders and keep hash to prevent repeated noise.

Main: Consolidate charging detection into is_charging_present (uses explicit or inferred flag), increase critical-battery deep-sleep grace period to ~5 minutes, skip deep-sleep and low-battery brightness forcing while charging/trend detected, and use the unified charging flag when restoring brightness/behavior. These changes reduce placeholder stream spam and prevent unwanted deep-sleep/brightness flicker during charging or charging trends.
Ignore placeholder stream titles; refine battery handling
…pipeline

Complete overhaul of the display localization system.

Language system:
- Replace EN/RU macros with full BCP-47 locale identifiers (en_US, ru_RU, be_BY,
  de_DE, etc.) covering 36 languages; default is en_US.
- Add IS_CYRILLIC_LANG(id) compile-time predicate; L10N_CODEPAGE is now
  auto-selected — no manual override needed for standard locales.
- l10n.h updated with complete #if/#elif ladder for all 36 locales.

Locale files:
- Rename displayL10n_en.h → displayL10n_en_US.h,
  displayL10n_ru.h → displayL10n_ru_RU.h.
- Added 34 new locale files: be_BY, bg_BG, bs_BA, cs_CZ, da_DK, de_DE, el_GR,
  es_ES, et_EE, fi_FI, fr_FR, hr_HR, hu_HU, is_IS, kk_KZ, ky_KG, lt_LT,
  lv_LV, me_ME, mk_MK, mn_MN, nl_NL, no_NO, pl_PL, pt_PT, ro_RO, sk_SK,
  sl_SI, sr_RS, sv_SE, tg_TJ, tr_TR, uk_UA, uz_UZ.
- Add l10n.md (language/weatherLang reference) and localization-guide.md.

UTF-8 pipeline (src/displays/tools/):
- Remove printFix.h, prepText.h, utf8Rus.h.
- Add utf8_common.cpp/h (shared tables + shouldPreserveChar/canRenderNative),
  utf8Latin.cpp/h (byte-pair→glyph mapper for accented Latin),
  utf8Cyrillic.cpp/h (Cyrillic codepoint→glyph + lowercase remapping),
  utf8To.cpp/h (entry point with native-render short-circuit).

Font system (src/locale/glcdfont/):
- Reorganize into glcdfont-lib.c (reference), glcdfont_Latin.c,
  glcdfont_Cyrillic.c, plus .md glyph map docs for each variant.
- Remove old glcdfont.c, glcdfont_EN.c, glcdfont-original.c.
- Update platformio_pre_replace_font.py to select variant from L10N_CODEPAGE.

Developer tools (scripts/):
- Add glyph_creator_gui.py and glyph_compare_gui.py (Python/Tkinter GUI tools).
- Add scripts/scripts.md usage guide.

Core / Config fixes:
- Remove all dynamic language-switching logic (compile-time only from now on).
- Add strip_whitespace() helper; apply in setTitle() and setStation().
- Fix bug: setStation() was calling u8fix on station.title instead of .name.
- VU meter now respects PLAYER_FORCE_MONO; calculation reordered so mono mix occurs before meter sampling.
- SPIFFS purge: skip /www/locale/ to protect locale JSON files.

WebUI runtime i18n:
- script.js: add i18n object, t(key) helper, applyI18n() DOM walker.
- All UI labels in options/player/search/curated/updform HTML annotated with
  data-i18n attributes; hard-coded English strings in JS replaced with t().
- Battery status parsed and re-labelled client-side (no firmware change needed).
- Locale JSON files in src/locale/webui/ (co-located with .h locale files);
  build script always deploys selected language JSON + en_US.json (English
  fallback) to data/www/locale/; max 2 JSON files on SPIFFS at a time;
  stale language files removed; SPIFFS purge skips /www/locale/.  The
  selection routine now respects optional `L10N_WEBUI_LANGUAGE`, falling
  back to `L10N_LANGUAGE` when the override is absent.

BREAKING CHANGE: L10N_LANGUAGE must use BCP-47 tokens (en_US/ru_RU etc.).
Update any myoptions.h using the old EN/RU defines.
@trip5 trip5 merged commit 1734553 into ehradio Mar 18, 2026
1 check 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