378d0b3e61
The firmware takes its texts from screen_manager/translations/<code>.json at build time (components/smart_display: one table in main.cpp, keys in screen_text_keys.h), and the fonts carry every letter European languages write with. The app keeps Settings -> Language & region (language, clock, numbers) for every screen, writes LANGUAGE into the screens' YAML and sends the clock and the number format in the layout message; the per-screen 24-hour clock goes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
22 lines
991 B
C++
22 lines
991 B
C++
#include "screen_text_en.h"
|
|
#include "../components/smart_display/chunk_transport.h"
|
|
#include <cassert>
|
|
int main() {
|
|
runtime_tiles::Chunks c;
|
|
assert(c.accept("a|0|0|YWJj", 100)); assert(!c.complete);
|
|
assert(c.accept("a|1|1|ZA==", 101)); assert(c.complete && c.data == "YWJjZA==");
|
|
assert(!c.accept("a|1|1|ZA==", 102)); // duplicate cannot reapply a command
|
|
assert(c.accept("b|0|0|YWJj", 200));
|
|
assert(!c.accept("b|2|1|ZA==", 201)); // dropped chunk
|
|
assert(c.accept("c|0|0|YWJj", 300));
|
|
assert(!c.accept("other|1|1|ZA==", 301)); // another automation interleaved
|
|
assert(c.accept("d|0|0|YWJj", 400));
|
|
assert(!c.accept("d|1|1|ZA==", 10401)); // expired transfer
|
|
assert(!c.accept("bad", 20000));
|
|
assert(!c.accept("x|-1|1|YWJj", 20000));
|
|
assert(!c.accept("x|0|1|not base64", 20000));
|
|
assert(!c.accept("x|0|1|" + std::string(201, 'A'), 20000));
|
|
assert(c.accept("e|0|0|YWJj", 20000));
|
|
assert(c.accept("f|0|1|ZA==", 20001)); assert(c.complete && c.data == "ZA==");
|
|
}
|