Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/interplane-forge/blob/main/server/tests/translate_check.py # interplane-forge INTERPLANE Forge Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `interplane-forge / server / tests / translate_check.py` 204 lines ยท 7330 bytes Raw Blame History 1 #!/usr/bin/env python3 2 """server/tests/translate_check.py: independent oracle for the translation hints (server/tr.om). 3 4 Read-only checker for server/tests/translate.sh. It parses one HTML page with the standard library 5 parser (not the Omega code under test) and reports, one line each: 6 7 FAIL : the page would let a translator change something that must stay exact 8 OK ... otherwise, with the counts it looked at 9 10 Commands (argv[1]): 11 check FILE... the rules below; exit 1 when any file fails 12 hostile FILE OUT rewrite every text node a translator may change (outside translate="no", 13 outside title/script/style/textarea) with hostile text, write OUT, then 14 compare what a reader copies: the text of every translate="no" element, 15 every href and every hash or id. Exit 1 when any of them changed. 16 strip FILE OUT the page minus the hints (translate="no" attributes and the spans that 17 wrap a bare hash or id), for the byte comparison with the base build 18 Rules of check: 19 1. . 20 2. every pre, code, kbd and samp element is inside translate="no". 21 3. no translatable text node holds a hex hash (7+ of 0-9a-f with a digit and a letter) or a 22 Radicle id (z then 28+ base58 with a digit and a capital). 23 4. no