Skip to content

Add catalog-based multilingual notifications and diagnostics - #130

Open
sergiobaiao wants to merge 26 commits into
eworm-de:mainfrom
sergiobaiao:codex/multilanguage
Open

sergiobaiao wants to merge 26 commits into
eworm-de:mainfrom
sergiobaiao:codex/multilanguage

Conversation

@sergiobaiao

@sergiobaiao sergiobaiao commented Oct 9, 2026 •

Copy link
Copy Markdown

Notifications and diagnostics currently have fixed English text. This adds JSON language catalogs and a shared renderer so users can select another language in global-config-overlay:


:global ScriptLanguage "pt-BR";

/system/script/run global-config;

English remains the offline default. The catalogs cover the same 693 messages in 15 locales across feature scripts, modules (including Signalgrid), shared helpers, configuration loading, and historical change notifications. Locales: en, zh-CN, hi, es, ar, fr, bn, pt-BR, id, ur, ru, de, ja, pcm, and ar-EG. The 13 new locales are initial assisted translations; Nigerian Pidgin and Egyptian Arabic include manual drafting and dialect adaptation. Native speakers still need to review linguistic accuracy and terminology. Machine-readable values, API fields, native RouterOS error patterns, received commands, and migration code keep their original behavior.

  • Download only applicable catalogs over HTTPS with certificate verification. Validate two- or three-letter locale codes (with optional region), schema, group keys, size, and placeholder compatibility; use compatible cache or English on failure. JSON text is never executed.

  • Embed English defaults and local renderers for entry points that run before shared functions. Refresh catalogs after configuration reloads and script updates; support both RouterOS function types.

  • Split six helpers into required global-functions.d/core-extra.rsc to keep the main script below Fetch's size budget. Initial setup includes it; older installations bootstrap it with validation before optional modules and reuse installed source offline.

  • Add catalog generation/checks and isolated RouterOS fixtures. Python is development tooling only. Regenerate platform variants before distribution checksums. Configuration version 147 announces the feature.

Validation on RouterOS 7.24.5 stable, x86_64 VMware, routeros + wireless:

  • 72 supported sources parsed during migration; the updated shared runtime also parsed. All 10,395 locale rendering checks and 10,395 native parameter checks passed across the 15 locales, with one locale per import.

  • Behavioral fixtures cover notifications, email loop filtering, Netwatch, messaging authorization, firewall/bridge guards, utilities, standalone/deferred renderers, reload hooks, required-module bootstrap, and conditional change notices.

  • Real verified HTTPS downloads matched published required-module bytes; health catalog downloads/rendering passed for all 14 non-English locales; offline caches, English reset, malformed JSON, stale schemas, and invalid locales passed. Temporary test state was removed.

  • Twelve Python checks (including complete locale coverage and preserved interactive answer keys), generated-artifact checks, and whitespace checks passed. Upstream notification headers, including silent behavior, were preserved.

A single all-locale fixture is approximately 9 MB. The test VM restarted during that import, and the SSH session timed out. Per-locale bundles passed afterwards; --locale now supports smaller, repeatable imports. Production catalogs are below 17 KB.

Remaining integration coverage: RouterOS 7.22, WiFi-package variants, actual reboot persistence, hardware-specific paths, and real notification delivery. Fixtures do not upgrade packages, execute migration/chat commands, or change network settings. Full make was unavailable locally because GNU Make and HTML prerequisites are absent.

Usage, translation workflow, architecture, and validation details are in doc/languages.md.

Upstream synchronization: merged fork main at da3cbdb3 into the PR branch. This sync adds the Signalgrid note in contrib/telegram.md. All 12 catalog checks, generated-artifact checks, and whitespace checks passed after the merge. RouterOS tests were not repeated for this documentation-only upstream change.

@sergiobaiao sergiobaiao mentioned this pull request Oct 13, 2026
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