Skip to content

Ru - fractions and mixed numbers fixes#584

Merged
NSoiffer merged 38 commits into
daisy:rufrom
Kostenkov-2021:ru
May 31, 2026
Merged

Ru - fractions and mixed numbers fixes#584
NSoiffer merged 38 commits into
daisy:rufrom
Kostenkov-2021:ru

Conversation

@Kostenkov-2021
Copy link
Copy Markdown
Contributor

This PR adds fixes for speaking of fractions and mixed numbers.

NSoiffer and others added 29 commits May 28, 2026 10:39
Improved Russian translations in ClearSpeak_Rules.yaml for mathematical terms related to fractions and exponents, ensuring more accurate and natural phrasing. Updated unicode-full.yaml to refine translations for the Apple logo, arrow symbols, and unknown character descriptions.
Replaces several Russian translations for mathematical terms with more accurate or standard equivalents, such as changing 'реальные числа' to 'действительные числа' and 'негативных' to 'отрицательных'. Also updates the translation for 'imaginary part' to 'комплексная часть'.
Improved and corrected Russian translations for various Unicode symbols in unicode-full.yaml and unicode.yaml. Changes include more accurate mathematical and typographical terms, such as replacing 'dot dot dot' with 'точка точка точка', updating power-related terms to 'степени', and refining translations for punctuation and mathematical operators.
Update Russian ClearSpeak rules and shared language resources: adjust terminology, grammar and verbosity across multiple rule files. Key changes include: proper Russian translations for roots (e.g. "конец корня"), powers/exponents ("степень", "возведено в степень", "в" for '^' connectors), fractions ("дробь"), sets/interval wording ("множество", "включая"), navigation labels (use "строка"/"к началу строки"/"к концу строки", "лево"/"текущий"), Unicode symbol names (more natural bracket/brace/tilde/caret terms), log and calculus terms ("логарифм", "натуральный логарифм", "ротор"), intent mappings and function names localized, and fixes to ordinal/plural forms and other lexical corrections. Affected files: Rules/Languages/ru/ClearSpeak_Rules.yaml, Rules/Languages/ru/SharedRules/calculus.yaml, Rules/Languages/ru/SharedRules/default.yaml, Rules/Languages/ru/definitions.yaml, Rules/Languages/ru/navigate.yaml, Rules/Languages/ru/unicode.yaml.
This commitadds fixes at Russian translation of Unicode symbols list.
This commit includes fixed Russian translations of Unicode symbols at unicode-full.yaml file.
Add a Russian language test suite for ClearSpeak and SimpleSpeak. New test modules cover functions, large operators, menclose, fractions (mfrac), roots (mroot), superscripts (msup), multiline, sets, symbols/adornments, geometry, linear algebra, subscripts, and more (alphabets, chemistry, intent, mtable, shared, units). Update tests/languages.rs to include the new "ru" tests. These tests exercise many speech patterns (logs, trig, intervals, sums/products/unions/intersections, integrals, mixed/nested fractions, implied/explicit multiplication, parentheses handling, and menclose notations).
Revise and correct Russian phrases in Rules/Languages/ru/navigate.yaml for navigation, zoom, movement and index terminology. Replaces English transliterations and incorrect terms, fixes grammar/wording for verbose/terse messages, and improves consistency across related prompts.
Replace incorrect "над" with "на" in Rules/Languages/ru/ClearSpeak_Rules.yaml for fraction phrasing. Two occurrences updated (phrase and replace sections) to improve naturalness and accuracy when speaking fractions in Russian.
Adjust Russian SimpleSpeak rule strings and comments for clearer, more natural phrasing and better alignment with English references. Changes include removing redundant article tokens for terse verbosity, updating terms (e.g. 'корень', 'дробь', 'конец корня/дроби', 'в квадрате/в кубе', 'степень', 'в', 'на', 'множество', 'умножить'), switching pronunciation suffixes from '-th' to '-й', and converting many inline comments to concise English annotations.
Correct various Russian terms and wording in Rules/Languages/ru/overview.yaml: replace incorrect prepositions and nouns (e.g. 'над'→'на', 'фракция'→'дробь', 'куб корень'→'кубический корень', 'определяющий'→'определитель', 'стол'→'таблица'), adjust pronunciation for ordinal marker to Russian '-й' with IPA, and refine mtable count/selectors. These changes standardize terminology and improve readability of the Russian speech rules.
Update Rules/Languages/ru/definitions.yaml to improve Russian localization: translate SI prefixes and unit names from English to Russian, localize units-without-prefixes and (previously) EnglishUnits entries, change OperatorIntentRenaming for "dimension-product" to "на", and adjust limit/lim-sup/lim-inf phrasings. Also fix ordinal spellings and correct gender/number forms for large ordinals. These changes refine translations and orthography for better Russian support.
Refactor Russian ClearSpeak absolute-value rule to remove the WordToSay variable and use inline tests to choose between «мощность» (cardinality) and «модуль». Reordered elements to output «из» then the operand, and when AbsEnd is set emit «конец» followed by the chosen label; preserves pauses. Also fix malformed quoting in Rules/Languages/ru/navigate.yaml for MoveEnd/MoveLineEnd messages (remove stray extra quotes) so the Russian navigation phrases are emitted correctly and the YAML is valid.
Import crate::common::* and anyhow::Result at the top of tests/Languages/ru.rs and inside the ClearSpeak and SimpleSpeak modules so those test modules can use shared utilities and Result types. Also include minor whitespace/formatting adjustments.
Adjust Russian ClearSpeak rules: correct grammar and wording across many rules (negativity adjectives, root/fraction/interval/set wording), standardize exponent phrasing (use "в степени", explicit "во вторую/в третью степень" and "конец степени"), replace English pronunciation markers with Russian ("-й"), improve log/function wording (e.g. "натуральный логарифм", "от", "арка"), and change implied-times wording to "умножить на". Also tidy up various comments/whitespace and minor test/pause adjustments to make speech output more natural and consistent.
Update Rules/Languages/ru/unicode-full.yaml with a large set of new and corrected entries. Adds many diacritics, combining marks, phonetic modifiers, superscripts/subscripts, punctuation, currency symbols and enclosing marks; introduces handling (tests/audio/pitch) for Greek and Cyrillic capital letters and refines several translations and spell/replace rules. This expands coverage and clarifies vocalization rules for numerous Unicode characters.
Replace many occurrences of the lowercase 't' action key with uppercase 'T' in Rules/Languages/ru/ClearSpeak_Rules.yaml (and related case changes like ct -> CT) to align with the expected rule schema/consumer. Also apply minor Russian text corrections (e.g. "деленное на" → "делённое на"). No other logic changes.
* Update Russian ClearSpeak and unicode rules

Improved Russian translations in ClearSpeak_Rules.yaml for mathematical terms related to fractions and exponents, ensuring more accurate and natural phrasing. Updated unicode-full.yaml to refine translations for the Apple logo, arrow symbols, and unknown character descriptions.

* Update Russian math terminology translations

Replaces several Russian translations for mathematical terms with more accurate or standard equivalents, such as changing 'реальные числа' to 'действительные числа' and 'негативных' to 'отрицательных'. Also updates the translation for 'imaginary part' to 'комплексная часть'.

* Update Russian Unicode symbol translations

Improved and corrected Russian translations for various Unicode symbols in unicode-full.yaml and unicode.yaml. Changes include more accurate mathematical and typographical terms, such as replacing 'dot dot dot' with 'точка точка точка', updating power-related terms to 'степени', and refining translations for punctuation and mathematical operators.
re-fixes #485
Fixes #544

Added/fixed tests for these.
* Update Russian ClearSpeak and unicode rules

Improved Russian translations in ClearSpeak_Rules.yaml for mathematical terms related to fractions and exponents, ensuring more accurate and natural phrasing. Updated unicode-full.yaml to refine translations for the Apple logo, arrow symbols, and unknown character descriptions.

* Update Russian math terminology translations

Replaces several Russian translations for mathematical terms with more accurate or standard equivalents, such as changing 'реальные числа' to 'действительные числа' and 'негативных' to 'отрицательных'. Also updates the translation for 'imaginary part' to 'комплексная часть'.

* Update Russian Unicode symbol translations

Improved and corrected Russian translations for various Unicode symbols in unicode-full.yaml and unicode.yaml. Changes include more accurate mathematical and typographical terms, such as replacing 'dot dot dot' with 'точка точка точка', updating power-related terms to 'степени', and refining translations for punctuation and mathematical operators.

* Improve Russian ClearSpeak translations

Update Russian ClearSpeak rules and shared language resources: adjust terminology, grammar and verbosity across multiple rule files. Key changes include: proper Russian translations for roots (e.g. "конец корня"), powers/exponents ("степень", "возведено в степень", "в" for '^' connectors), fractions ("дробь"), sets/interval wording ("множество", "включая"), navigation labels (use "строка"/"к началу строки"/"к концу строки", "лево"/"текущий"), Unicode symbol names (more natural bracket/brace/tilde/caret terms), log and calculus terms ("логарифм", "натуральный логарифм", "ротор"), intent mappings and function names localized, and fixes to ordinal/plural forms and other lexical corrections. Affected files: Rules/Languages/ru/ClearSpeak_Rules.yaml, Rules/Languages/ru/SharedRules/calculus.yaml, Rules/Languages/ru/SharedRules/default.yaml, Rules/Languages/ru/definitions.yaml, Rules/Languages/ru/navigate.yaml, Rules/Languages/ru/unicode.yaml.

* Fixed unicode.yaml file

This commitadds fixes at Russian translation of Unicode symbols list.

* Update of unicode-full

This commit includes fixed Russian translations of Unicode symbols at unicode-full.yaml file.

* Add Russian ClearSpeak/SimpleSpeak tests

Add a Russian language test suite for ClearSpeak and SimpleSpeak. New test modules cover functions, large operators, menclose, fractions (mfrac), roots (mroot), superscripts (msup), multiline, sets, symbols/adornments, geometry, linear algebra, subscripts, and more (alphabets, chemistry, intent, mtable, shared, units). Update tests/languages.rs to include the new "ru" tests. These tests exercise many speech patterns (logs, trig, intervals, sums/products/unions/intersections, integrals, mixed/nested fractions, implied/explicit multiplication, parentheses handling, and menclose notations).

* Update Russian navigation translations

Revise and correct Russian phrases in Rules/Languages/ru/navigate.yaml for navigation, zoom, movement and index terminology. Replaces English transliterations and incorrect terms, fixes grammar/wording for verbose/terse messages, and improves consistency across related prompts.

* Use correct Russian preposition for fractions

Replace incorrect "над" with "на" in Rules/Languages/ru/ClearSpeak_Rules.yaml for fraction phrasing. Two occurrences updated (phrase and replace sections) to improve naturalness and accuracy when speaking fractions in Russian.

* Refine ru SimpleSpeak translations

Adjust Russian SimpleSpeak rule strings and comments for clearer, more natural phrasing and better alignment with English references. Changes include removing redundant article tokens for terse verbosity, updating terms (e.g. 'корень', 'дробь', 'конец корня/дроби', 'в квадрате/в кубе', 'степень', 'в', 'на', 'множество', 'умножить'), switching pronunciation suffixes from '-th' to '-й', and converting many inline comments to concise English annotations.

* Update Russian overview translations

Correct various Russian terms and wording in Rules/Languages/ru/overview.yaml: replace incorrect prepositions and nouns (e.g. 'над'→'на', 'фракция'→'дробь', 'куб корень'→'кубический корень', 'определяющий'→'определитель', 'стол'→'таблица'), adjust pronunciation for ordinal marker to Russian '-й' with IPA, and refine mtable count/selectors. These changes standardize terminology and improve readability of the Russian speech rules.

* Localize Russian unit/prefix names and fix ordinals

Update Rules/Languages/ru/definitions.yaml to improve Russian localization: translate SI prefixes and unit names from English to Russian, localize units-without-prefixes and (previously) EnglishUnits entries, change OperatorIntentRenaming for "dimension-product" to "на", and adjust limit/lim-sup/lim-inf phrasings. Also fix ordinal spellings and correct gender/number forms for large ordinals. These changes refine translations and orthography for better Russian support.

* Fix RU ClearSpeak absolute-value and navigate

Refactor Russian ClearSpeak absolute-value rule to remove the WordToSay variable and use inline tests to choose between «мощность» (cardinality) and «модуль». Reordered elements to output «из» then the operand, and when AbsEnd is set emit «конец» followed by the chosen label; preserves pauses. Also fix malformed quoting in Rules/Languages/ru/navigate.yaml for MoveEnd/MoveLineEnd messages (remove stray extra quotes) so the Russian navigation phrases are emitted correctly and the YAML is valid.

* Add common and anyhow::Result imports to ru.rs

Import crate::common::* and anyhow::Result at the top of tests/Languages/ru.rs and inside the ClearSpeak and SimpleSpeak modules so those test modules can use shared utilities and Result types. Also include minor whitespace/formatting adjustments.

* Update Russian ClearSpeak phrasing and fixes

Adjust Russian ClearSpeak rules: correct grammar and wording across many rules (negativity adjectives, root/fraction/interval/set wording), standardize exponent phrasing (use "в степени", explicit "во вторую/в третью степень" and "конец степени"), replace English pronunciation markers with Russian ("-й"), improve log/function wording (e.g. "натуральный логарифм", "от", "арка"), and change implied-times wording to "умножить на". Also tidy up various comments/whitespace and minor test/pause adjustments to make speech output more natural and consistent.
Refine and expand Russian entries in unicode-full.yaml: many symbol translations were updated for clarity.
* Correct image tag in README.md

Fix HTML entities in the README file.

* Fix some problems with bad mmultiscripts.
re-fixes #485
Fixes #544

Added/fixed tests for these.

* fix typos in comments

* Some fixes that I thought were part of 40b8631

Small cleanup for dealing with U+2212 -> '-': something was fixed but code was left and commented out. Removing that simplifes the check.

* Fix #545 -- data-split not getting removed

* comment out some debug statements

* Fix some problems with bad mmultiscripts.
re-fixes #485
Fixes #544

Added/fixed tests for these.

* fix up grammar issue and also Orca mention

* change the debugger

* update the Kurzweil description

* tweak the wording

* User guides in English & Swedish + Swedish settings dialogue

I went over the English user guide for MathCAT and created a new version to replace the current one. I aimed to make it less technical and easier to read. See the file User_guide_for_MathCAT_en.md. Note that it was written a while ago, so it needs revising to account for
- MathCAT now being native to NVDA,
- an up-to-date means of contact, and
- possibly new navigation features? (I decided it caused confusion to mention features not developed yet so I removed them at the time of writing).
Please feel free to edit or add to it in any way.

Anvandarguide_till_MathCAT_sv.md is a Swedish translation of the new, easy-to-read English user guide. Please notify me of changes to the English one and I can keep the Swedish one updated accordingly.

nvda.mo is a Swedish translation of the NVDA settings dialogue.

* Change `isize` to `i32`  (#550)

* Change `isize` to `i32` for better consistency and alignment with expected use cases.

* fix clippy

* fix assertions in chemistry.rs (#552)

* clippy fixes

* allow more whitespace before audit-ignore comment

* clippy fixes

* New translator's guide

A revised translator's guide to replace the old one. Written by me, @MartheGjelstad and @AndersEkl. Proofread and verified by @NSoiffer.

* Fix #532.
Fix extra "the" in expression by converting many `t:`s to `ot:`s.
However, I still needed to fix up the handling of them in speech.rs by allowing for an optional `ot` marker. I took this opportunity to clean up the function a little now that I know Rust better (it was over 5 years old).

* Add test for #532

* remove extraneous blank line

* Minor cleanup that removed a call that was in two places and could be cleaned up to be in just one

* fix potential security problem where somehow a person puts in a path for Language, BrailleCode, or SpeechStyle. I limited those to letters and '-' and '_' ( e.g., en-us ). Added tests.

* add Russian translator

* Initial seeding for Russian

* Update Russian ClearSpeak and unicode rules

Improved Russian translations in ClearSpeak_Rules.yaml for mathematical terms related to fractions and exponents, ensuring more accurate and natural phrasing. Updated unicode-full.yaml to refine translations for the Apple logo, arrow symbols, and unknown character descriptions.

* Update Russian math terminology translations

Replaces several Russian translations for mathematical terms with more accurate or standard equivalents, such as changing 'реальные числа' to 'действительные числа' and 'негативных' to 'отрицательных'. Also updates the translation for 'imaginary part' to 'комплексная часть'.

* Update Russian Unicode symbol translations

Improved and corrected Russian translations for various Unicode symbols in unicode-full.yaml and unicode.yaml. Changes include more accurate mathematical and typographical terms, such as replacing 'dot dot dot' with 'точка точка точка', updating power-related terms to 'степени', and refining translations for punctuation and mathematical operators.

* Improve Russian ClearSpeak translations

Update Russian ClearSpeak rules and shared language resources: adjust terminology, grammar and verbosity across multiple rule files. Key changes include: proper Russian translations for roots (e.g. "конец корня"), powers/exponents ("степень", "возведено в степень", "в" for '^' connectors), fractions ("дробь"), sets/interval wording ("множество", "включая"), navigation labels (use "строка"/"к началу строки"/"к концу строки", "лево"/"текущий"), Unicode symbol names (more natural bracket/brace/tilde/caret terms), log and calculus terms ("логарифм", "натуральный логарифм", "ротор"), intent mappings and function names localized, and fixes to ordinal/plural forms and other lexical corrections. Affected files: Rules/Languages/ru/ClearSpeak_Rules.yaml, Rules/Languages/ru/SharedRules/calculus.yaml, Rules/Languages/ru/SharedRules/default.yaml, Rules/Languages/ru/definitions.yaml, Rules/Languages/ru/navigate.yaml, Rules/Languages/ru/unicode.yaml.

* Fixed unicode.yaml file

This commitadds fixes at Russian translation of Unicode symbols list.

* Update of unicode-full

This commit includes fixed Russian translations of Unicode symbols at unicode-full.yaml file.

* Add Russian ClearSpeak/SimpleSpeak tests

Add a Russian language test suite for ClearSpeak and SimpleSpeak. New test modules cover functions, large operators, menclose, fractions (mfrac), roots (mroot), superscripts (msup), multiline, sets, symbols/adornments, geometry, linear algebra, subscripts, and more (alphabets, chemistry, intent, mtable, shared, units). Update tests/languages.rs to include the new "ru" tests. These tests exercise many speech patterns (logs, trig, intervals, sums/products/unions/intersections, integrals, mixed/nested fractions, implied/explicit multiplication, parentheses handling, and menclose notations).

* Update Russian navigation translations

Revise and correct Russian phrases in Rules/Languages/ru/navigate.yaml for navigation, zoom, movement and index terminology. Replaces English transliterations and incorrect terms, fixes grammar/wording for verbose/terse messages, and improves consistency across related prompts.

* Use correct Russian preposition for fractions

Replace incorrect "над" with "на" in Rules/Languages/ru/ClearSpeak_Rules.yaml for fraction phrasing. Two occurrences updated (phrase and replace sections) to improve naturalness and accuracy when speaking fractions in Russian.

* Refine ru SimpleSpeak translations

Adjust Russian SimpleSpeak rule strings and comments for clearer, more natural phrasing and better alignment with English references. Changes include removing redundant article tokens for terse verbosity, updating terms (e.g. 'корень', 'дробь', 'конец корня/дроби', 'в квадрате/в кубе', 'степень', 'в', 'на', 'множество', 'умножить'), switching pronunciation suffixes from '-th' to '-й', and converting many inline comments to concise English annotations.

* Update Russian overview translations

Correct various Russian terms and wording in Rules/Languages/ru/overview.yaml: replace incorrect prepositions and nouns (e.g. 'над'→'на', 'фракция'→'дробь', 'куб корень'→'кубический корень', 'определяющий'→'определитель', 'стол'→'таблица'), adjust pronunciation for ordinal marker to Russian '-й' with IPA, and refine mtable count/selectors. These changes standardize terminology and improve readability of the Russian speech rules.

* Localize Russian unit/prefix names and fix ordinals

Update Rules/Languages/ru/definitions.yaml to improve Russian localization: translate SI prefixes and unit names from English to Russian, localize units-without-prefixes and (previously) EnglishUnits entries, change OperatorIntentRenaming for "dimension-product" to "на", and adjust limit/lim-sup/lim-inf phrasings. Also fix ordinal spellings and correct gender/number forms for large ordinals. These changes refine translations and orthography for better Russian support.

* Fix RU ClearSpeak absolute-value and navigate

Refactor Russian ClearSpeak absolute-value rule to remove the WordToSay variable and use inline tests to choose between «мощность» (cardinality) and «модуль». Reordered elements to output «из» then the operand, and when AbsEnd is set emit «конец» followed by the chosen label; preserves pauses. Also fix malformed quoting in Rules/Languages/ru/navigate.yaml for MoveEnd/MoveLineEnd messages (remove stray extra quotes) so the Russian navigation phrases are emitted correctly and the YAML is valid.

* Add common and anyhow::Result imports to ru.rs

Import crate::common::* and anyhow::Result at the top of tests/Languages/ru.rs and inside the ClearSpeak and SimpleSpeak modules so those test modules can use shared utilities and Result types. Also include minor whitespace/formatting adjustments.

* Update Russian ClearSpeak phrasing and fixes

Adjust Russian ClearSpeak rules: correct grammar and wording across many rules (negativity adjectives, root/fraction/interval/set wording), standardize exponent phrasing (use "в степени", explicit "во вторую/в третью степень" and "конец степени"), replace English pronunciation markers with Russian ("-й"), improve log/function wording (e.g. "натуральный логарифм", "от", "арка"), and change implied-times wording to "умножить на". Also tidy up various comments/whitespace and minor test/pause adjustments to make speech output more natural and consistent.

* Expand Russian Unicode mappings

Update Rules/Languages/ru/unicode-full.yaml with a large set of new and corrected entries. Adds many diacritics, combining marks, phonetic modifiers, superscripts/subscripts, punctuation, currency symbols and enclosing marks; introduces handling (tests/audio/pitch) for Greek and Cyrillic capital letters and refines several translations and spell/replace rules. This expands coverage and clarifies vocalization rules for numerous Unicode characters.

* Use uppercase 'T' keys and fix text in ru rules

Replace many occurrences of the lowercase 't' action key with uppercase 'T' in Rules/Languages/ru/ClearSpeak_Rules.yaml (and related case changes like ct -> CT) to align with the expected rule schema/consumer. Also apply minor Russian text corrections (e.g. "деленное на" → "делённое на"). No other logic changes.

* Update Russian Unicode speech rules

Refine and expand Russian entries in unicode-full.yaml: many symbol translations were updated for clarity.

---------

Co-authored-by: Moritz Groß <hi@mgross.dev>
Co-authored-by: nsoiffer <soiffer@alum.mit.edu>
Co-authored-by: Tim Arborealis Lötberg <143188129+TimArborealis@users.noreply.github.com>
Co-authored-by: NSoiffer <NSoiffer@users.noreply.github.com>
Fixed some syntax errors in them.

Updated the default prefix/infix/... rules.

Most tests fail. Either they need fixing or the Rules need fixing or both.
Update Russian SimpleSpeak and ClearSpeak fraction rules to handle mixed numbers, unit fractions, nested fraction pauses, text terms, and function-over-function speech to passing tests.
This commit adds corrections in pronunciation of parentheses to the Russian language tests.
Update Russian speech rules for ClearSpeak and SimpleSpeak to fix symbols, set-builder expressions, and function speech regressions.

- Fix Russian function speech for trig names, powers, implied multiplication, MoreImpliedTimes parentheses, and square-root products.
- Normalize Russian letter and ordinal output for affected cases.
This commit adds essential changes at default.yaml file to fix large_ops section of MathCAT Russian language rules.
This commit adds localization fixes for rules and tests.
This commit adds fixes to Russian test phrases for fractions.
This commit adds  russian localization fixes for fractions and mixed numbers.
This commit add fixed localization for navigation in math content and overview and literal speak modes.
@NSoiffer
Copy link
Copy Markdown
Collaborator

Assuming the tests all succeed, I'll pull this into main.

Thanks for all your work!

@NSoiffer NSoiffer merged commit fada3f1 into daisy:ru May 31, 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.

2 participants