Skip to content

Enhance Russian docs and add Russian Braille support#609

Closed
Kostenkov-2021 wants to merge 56 commits into
daisy:rufrom
Kostenkov-2021:ru
Closed

Enhance Russian docs and add Russian Braille support#609
Kostenkov-2021 wants to merge 56 commits into
daisy:rufrom
Kostenkov-2021:ru

Conversation

@Kostenkov-2021

Copy link
Copy Markdown
Contributor

This PR adds Russian Braille support and Russian documentantion enhancements to MathCAT.

moritz-gross and others added 30 commits May 30, 2026 18:10
… update unit tests to include 2x3 and 3x4 augmented matrix scenarios. (daisy#555)
Fixes daisy#528.

Includes the tests in the PR.
I earlier added code to prevent a SSML injection attack by escaping HTML. It was done at the wrong point and escape legal SSML. I have moved the check and conversion down to the leaves.

I was very surprised there were no useful tests with SSML. All the main tests set `TTS=None`. I added a test that catches bad escaping. I also added some tests to check for leaf-based SSML attacks and also attribute-based ones.
…CE DIGITs as the match part of translate, so if one of the sans-serif digits were used, you ended up in a loop (no match, to it returned itself).
  Allow audit-translations to compare a target language against any source
  language via --source, defaulting to English for existing workflows. Update
  CLI output, docs, and tests for dynamic source/target labels, including
  Swedish/Norwegian comparison coverage.

  Normalize Rich ANSI output in tests so golden and string assertions remain
  stable when terminal color is forced.
… into audit-tool-compare-any-language

# Conflicts:
#	PythonScripts/audit_translations/renderer.py
* initial addition of core concept names

* defnitions and tests, with a few failing

* minus, plus, volume fixes. Other defined, not appearing in site
…-language

Add source language option to translation audit tool
…-version

use "ruamel.yaml>=0.19.1" in uv.lock and pyproject.toml
* copy english version of navigate.yaml from NVDA2026.1 and translate

* 更新 definitions.yaml 與 navigate.yaml

* update unicode-full.yaml

* 區分完全/已完全放大/縮小

* 移至->移到, 表->表格, 數學式->數學, 退出->離開, 不能->無法, 當前->目前。
overview line 47, SimpleSpeak_Rules.yaml line 39, "根號"->""。mroot.rs 對應修改

* 移到上一格 -> 往上一格,移到下一格 -> 往下一格, 佔位符 -> 書籤,設定佔位符 -> 設定書籤,已是最上層 -> 不在別的式子裡面,上一層是 -> 在後面式子裡面,字元模式 開n 次方根 的讀法,基底 -> 基、底

* 向量 -> 射線

* 基 -> 基底,底 -> 基底
NSoiffer and others added 20 commits June 14, 2026 13:37
Replace the four scattered string-match dispatch sites (cleanup,
get_braille_chars, NeedsToBeGrouped, and highlight knobs) with a single
get_braille_code() registry and a BrailleCode trait implemented per code.
Extract the duplicated UEB/Vietnam/Finnish/Swedish indicator-replacement
closures into one apply_indicator_replacements helper plus a UserTypeforms
struct. Behavior is unchanged (all tests/braille pass); adding a new code
now means one registry entry + one impl block.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit adds first druft version for Russian Braille.
This commit adds fixes to Russian Braille. Now the test with parentheses is passed. Also there are devision and multiplication signs have been modified according to the Russian braille specs.
This commit adds a layer of Latin and Greek alphabets for Russian mathematical Braille.
* In unicode.yaml Latin and Greek letters now go through the internal markers of the alphabetic mode.
• In braille.rs russian_cleanup turns these markers into real signs:
◦ Latin lowercase: ⠠
◦ Latin uppercase: ⠨
◦ Greek lowercase: ⠰
◦ Greek uppercase: ⠸
Added tests to russian.rs to x+A+y+B, the Latin letter after the number.
This commit adds Roots, powers and scripts according to the Russian math Braille specs.
Fix YAML replace syntax and extend Russian braille rules: add chemical-formula-operator-bond and prefix-geometry-ops rules, broaden function-name matching (include tg/ctg variants) and add separator markers. Update unicode mappings (degree sign, invisible characters, conditional ∪ mapping, parallel/arrow glyphs) and adjust several function/operator braille outputs. Add/expand tests to cover functions, geometry, matrices and chemical formulas to validate the changes.
Add Russian (ru) to the list of supported speech languages and update Russian documentation and translation guidance.

- docs/User_guide_for_MathCAT_en.md, docs/index.md: add Russian (ru) to supported languages lists.
- docs/ru/User_guide_for_MathCAT_ru.md: include Russian in language options, reorder entries and apply minor wording fixes.
- docs/ru/helpers.md: clarify wording, update examples and test instructions to reference ru instead of fr, and improve translation guidance and examples (including test and cargo commands).
- docs/ru/index.md: reorder supported languages and polish phrasing.

These edits enable and document Russian support and improve clarity for translators and developers working on the Russian localization.
Replace hardcoded function-name branches in Russian_Rules.yaml with a DefinitionValue lookup that pulls from a new RussianFunctionBraille mapping. Add RussianFunctionBraille entries to definitions.yaml (private-use codepoints U+E100–U+E10E) and map those codepoints to braille strings in unicode.yaml. Add a test covering tan/cot rendering. This centralizes function braille representations and simplifies the rule logic.
Clarify and naturalize Russian phrasing in the translators guide: add explicit "на русском языке" to SimpleSpeak examples; change exponent wording to "в квадрате" with example "икс в квадрате"; make fraction wording more natural ("числитель разделить на знаменатель" and example "метр за секунду"); fix "английском" → "английском языке"; and update Braille tooling phrasing to "просмотрщиком Брайля" and "дисплее Брайля" for consistency.
Insert a preprocessing step that injects braille alphabet indicators before running REPLACE_INDICATORS. A new helper add_russian_alphabet_indicators scans the raw braille and emits specific indicators for 'l' (Latin lowercase), 'u' (Latin uppercase), 'g' (Greek lowercase) and 'v' (Greek uppercase), avoiding repeated indicators by tracking the current alphabet mode. The helper also resets the mode on 'C', 'N', and '#'. This keeps the existing indicator replacement and space-collapsing logic intact while preventing redundant alphabet indicators.
Add GOST-style number and symbol support for Russian braille: introduce a decimal-comma rule that emits BrailleChars for integer and fractional parts with a decimal indicator, using PUA digit placeholders. Extend unicode mappings with bracket/brace/slash/backslash/pipe characters, Celsius, context-sensitive prime (′/″) handling, PUA digit-to-braille mappings, and a few arrow/connective symbols. Update tests to cover decimal numbers, fractions, set notation, Celsius, and logical arrows, and adjust expected output for geometry primes to reflect the new context-aware prime handling.
Introduce three new mover rules in Rules/Braille/Russian/Russian_Rules.yaml: vector-arrow, vector-bar, and geometry-arc. Each rule detects specific accent characters (arrows: → ⟶ ⇀ ⃗; bars: ¯ ‾ _  ̄; arcs: ⌒ ⏜ ︵) and emits the appropriate braille indicators, using a different form when the base has more than one character. Add corresponding tests in tests/braille/Russian/russian.rs to cover single- and multi-character movers and combined expressions.
Extend Russian braille rules to support additional math functions and large operator limits. Added new rules for large-op-limits, operator/functions (including special handling for div), and div-specific replacements in Rules/Braille/Russian/*. Updated Russian definitions and unicode mappings to include sinh/cosh/tanh/coth, arg/sgn/det/rank/rg, Re/Im, grad/rot/div, gcd/lcm and related braille codes. Updated global Rules/definitions.yaml to recognize new function names. Fixed braille cleanup in src/braille.rs to normalize div encoding. Added unit tests exercising the new function mappings and large operator limits.
Introduce handling for system left-brace matrices in the Russian braille rules: add InSystemLeftBrace variable, a system-left-brace-opener rule and a system-left-brace-table rule to detect brace-enclosed mtable as a system. Update row-start logic to emit appropriate braille tokens when InSystemLeftBrace is set. Add tests exercising curly-brace matrices, piecewise function (brace with conditions), and vertical-bar matrices to verify the new behavior.
Extend Russian braille rules to handle chemical notation: add rules for equilibrium-arrow, reaction operators, repeated charges, charges, and charge-with-subscript mappings (chemical-reaction-operator, chemistry-mhchem-equilibrium-arrow, chemistry-repeated-charge, chemistry-charge, chemistry-charge-with-subscript). Update Rules/Braille/Russian/Russian_Rules.yaml to map arrows, +/-, superscripts/subscripts and reaction operators to appropriate braille sequences. Add tests in tests/braille/Russian/russian.rs (source_chemical_reactions_and_charges) covering reaction arrows, charges, subscripts/superscripts and combined examples.
@github-project-automation github-project-automation Bot moved this from Triage to Done in MathCAT Project Board Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants