Repository navigation
Add catalog-based multilingual notifications and diagnostics - #130
Open
sergiobaiao wants to merge 26 commits into
Open
sergiobaiao wants to merge 26 commits into
sergiobaiao wants to merge 26 commits into
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: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, andar-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.rscto 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;
--localenow 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
makewas 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
mainatda3cbdb3into the PR branch. This sync adds the Signalgrid note incontrib/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.