diff --git a/Rules/Languages/ru/ClearSpeak_Rules.yaml b/Rules/Languages/ru/ClearSpeak_Rules.yaml index f6d4871e..e4754c95 100644 --- a/Rules/Languages/ru/ClearSpeak_Rules.yaml +++ b/Rules/Languages/ru/ClearSpeak_Rules.yaml @@ -17,15 +17,13 @@ - name: intent-literal-silent tag: [mi, mo, mn] match: "contains(@data-intent-property, ':silent:')" - # say nothing replace: [] -# handling of negative numbers that come from 'intent' is hard -- we do something that is close to right here - name: intent-literal-negative-number tag: mn match: "starts-with(text(), '-')" replace: - - t: "минус" # phrase(10 'minus' 4 equals 6) + - t: "минус" - x: "translate(text(), '-_', '')" - name: default @@ -34,26 +32,26 @@ replace: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' square root of 25) + then: [t: ""] - test: if: $ClearSpeak_Roots = 'PosNegSqRoot' or $ClearSpeak_Roots = 'PosNegSqRootEnd' then: - bookmark: "*[1]/@id" - test: if: parent::*[self::m:minus and count(*)=1] - then: [t: "отрицательное"] # phrase(minus 4 is a 'negative' number) - else: [t: "положительное"] # phrase(10 is a 'positive' number) - - t: "квадратный корень" # phrase(8 is the 'square root' of 64) + then: [t: "отрицательный"] + else: [t: "положительный"] + - t: "квадратный корень" - test: if: "$Verbosity!='Terse'" - then: [t: "из"] # phrase(the square root 'of' 5) + then: [t: "из"] else: [pause: short] - x: "*[1]" - test: - if: "$ClearSpeak_Roots = 'RootEnd' or $ClearSpeak_Roots = 'PosNegSqRootEnd'" then: - pause: short - - t: "end root" # phrase(the square root of x 'end root') + - t: "конец корня" - pause: medium - else_if: "IsNode(*[1], 'simple')" then: [pause: short] @@ -65,7 +63,7 @@ replace: - test: if: "$Verbosity!='Terse'" - then: [t: "квадратный корень 36"] # phrase(6 is 'the' square root of 36) + then: [t: ""] - test: if: $ClearSpeak_Roots = 'PosNegSqRoot' or $ClearSpeak_Roots = 'PosNegSqRootEnd' then: @@ -74,40 +72,39 @@ then: [bookmark: "parent/@id"] - test: if: parent::m:minus - then: [t: "отрицательное"] # phrase(minus 6 is a 'negative' number) - else: [t: "положительное"] # phrase(10 is a 'positive' number) + then: [t: "отрицательный"] + else: [t: "положительный"] - test: if: "*[2][self::m:mn and not(contains(., '.'))]" then_test: - if: "*[2][.='2']" - then: [t: "квадратный корень"] # phrase(5 is the 'square root' of 25) + then: [t: "квадратный корень"] - else_if: "*[2][.='3']" - then: [t: "корень куба"] # phrase(5 is the 'cube root' of 625) - - else: [x: "ToOrdinal(*[2])", t: "корень"] # phrase(the square 'root' of 25) + then: [t: "кубический корень"] + - else: [x: "ToOrdinal(*[2])", t: "степени"] else: - test: if: "*[2][self::m:mi][string-length(.)=1]" then: - x: "*[2]" - - pronounce: [{text: "-th"}, {ipa: "θ"}, {sapi5: "th"}, {eloquence: "T"}] + - pronounce: [{text: "-й"}, {ipa: "j"}, {sapi5: "y"}, {eloquence: "Y"}] else: {x: "*[2]"} - - t: "корень" # phrase(the square 'root' of 36) + - t: "корень" - test: if: "$Verbosity!='Terse'" - then: [t: "из"] # phrase(the square root 'of' 36) + then: [t: "из"] - x: "*[1]" - test: if: $ClearSpeak_Roots = 'RootEnd' or $ClearSpeak_Roots = 'PosNegSqRootEnd' then: - pause: short - - t: "end root" # phrase(start the fifth root of x 'end root') + - t: "конец корня" - pause: medium else_test: if: IsNode(*[1], 'simple') then: [pause: short] else: [pause: long] -# The 'negative' rule interacts with the msqrt/mroot rules as those might pick off this case ("the negative square root of x") - name: negative_and_positive tag: [plus, minus] match: "count(*)=1 and contains(@data-intent-property, ':prefix:')" @@ -121,14 +118,10 @@ - bookmark: "@id" - test: if: "self::m:minus" - then: [t: "отрицательное"] # phrase(minus 5 is a 'negative' number) - else: [t: "положительное"] # phrase(7 is a 'positive' number) + then: [t: "отрицательный"] + else: [t: "положительный"] - x: "*[1]" -# Fraction rules -# Mixed numbers mostly "just work" because the invisible char reads as "and" and other parts read properly on their own - -# Units (e.g., meters per second) - name: per-fraction tag: fraction match: "$ClearSpeak_Fractions='Per' or @@ -136,7 +129,7 @@ BaseNode(*[1])[contains(@data-intent-property, ':unit') or (self::m:mrow and self::*[3][contains(@data-intent-property, ':unit')])]" replace: - x: "*[1]" - - t: "перемещение" # phrase('5 meters 'per' second) + - t: "в" - x: "*[2]" - name: common-fraction @@ -148,159 +141,153 @@ variables: [IsPlural: "*[1]!=1"] replace: - x: "*[1]" - - x: "ToOrdinal(*[2], true(), $IsPlural)" # extra args specify fractional ordinal and whether it is plural + - x: "ToOrdinal(*[2], true(), $IsPlural)" - name: common-fraction-mixed-number tag: fraction match: - - "preceding-sibling::*[1][self::m:mo][.='⁤'] and" # preceding element is invisible plus + - "preceding-sibling::*[1][self::m:mo][.='⁤'] and" - "($ClearSpeak_Fractions='Auto' or $ClearSpeak_Fractions='Ordinal' or $ClearSpeak_Fractions='EndFrac') and" - "*[1][self::m:mn][not(contains(., '.')) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and" - "*[2][self::m:mn][not(contains(., '.')) and ($ClearSpeak_Fractions='Ordinal' or (2<= text() and text()<=10))]" variables: [IsPlural: "*[1]!=1"] replace: - x: "*[1]" - - x: "ToOrdinal(*[2], true(), $IsPlural)" # extra args specify fractional ordinal and whether it is plural - + - x: "ToOrdinal(*[2], true(), $IsPlural)" - name: fraction-over-simple tag: fraction match: - "($ClearSpeak_Fractions='Over' or $ClearSpeak_Fractions='FracOver' or $ClearSpeak_Fractions='OverEndFrac') or" - "( not($ClearSpeak_Fractions='General' or $ClearSpeak_Fractions='GeneralEndFrac') and" - - " (IsNode(*[1],'simple') and IsNode(*[2],'simple')) )" # simple fraction in ClearSpeak spec + - " (IsNode(*[1],'simple') and IsNode(*[2],'simple')) )" replace: - test: if: "$ClearSpeak_Fractions='FracOver'" then: - test: if: "$Verbosity!='Terse'" - then: [ot: "а"] - - t: "дробь" # phrase(the 'fraction' with 3 over 4) + then: [ot: ""] + - t: "дробь" - x: "*[1]" - - t: "над" # phrase(the fraction 3 'over' 4) + - t: "деленное на" - x: "*[2]" - test: - # very ugly!!! -- replicate nested ordinal fraction as they are an exception if: "$ClearSpeak_Fractions='OverEndFrac' or ($ClearSpeak_Fractions='EndFrac' and not( ($ClearSpeak_Fractions='Auto' or $ClearSpeak_Fractions='Ordinal' or $ClearSpeak_Fractions='EndFrac') and *[1][*[1][self::m:mn][not(contains(., '.')) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and *[2][self::m:mn][not(contains(., '.')) and ($ClearSpeak_Fractions='Ordinal' or (2<= text() and text()<=10))] ] and *[2][*[1][self::m:mn][not(contains(., '.')) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and *[2][self::m:mn][not(contains(., '.')) and ($ClearSpeak_Fractions='Ordinal' or (2<= text() and text()<=10))] ] ) )" then: - pause: short - - t: "конец дроби" # phrase(7 over 8 'end fraction') + - t: "конец дроби" - pause: short -- # fraction with text or numbers followed by text in both numerator and denominator - name: fraction-over-text +- name: fraction-over-text tag: fraction match: - "not($ClearSpeak_Fractions='General' or $ClearSpeak_Fractions='GeneralEndFrac') and" - "( " - - " ((*[1][self::m:mi or self::m:mtext][string-length(.)>1]) or " # fractions with text + - " ((*[1][self::m:mi or self::m:mtext][string-length(.)>1]) or " - " (*[1][self::m:mrow][count(*)=3][ " - " *[1][self::m:mn] and " - - " *[2][self::m:mo][.='⁢'] and " # invisible times + - " *[2][self::m:mo][.='⁢'] and " - " *[3][self::m:mi or self::m:mtext][string-length(.)>1] ]) ) and" - - " ((*[2][self::m:mi or self::m:mtext][string-length(.)>1]) or " # fractions with text + - " ((*[2][self::m:mi or self::m:mtext][string-length(.)>1]) or " - " (*[2][self::m:mrow][count(*)=3][ " - " *[1][self::m:mn] and " - - " *[2][self::m:mo][.='⁢'] and " # invisible times + - " *[2][self::m:mo][.='⁢'] and " - " *[3][self::m:mi or self::m:mtext][string-length(.)>1] ]) )" - ")" replace: - x: "*[1]" - - t: "над" # phrase(the fraction 3 'over' 4) + - t: "деленное на" - x: "*[2]" - test: if: "$ClearSpeak_Fractions='EndFrac' or $ClearSpeak_Fractions='OverEndFrac'" then: - pause: short - - t: "конец дроби" # phrase(7 over 8 'end fraction') + - t: "конец дроби" - pause: short - name: default tag: fraction match: "." replace: - - ot: "квадратный корень из 25" # phrase(5 is 'the' square root of 25) - - t: "дробь с числителем" # phrase(the 'fraction with numerator' 6) + - ot: "" + - t: "дробь: числитель" - test: if: not(IsNode(*[1], 'simple')) then: [pause: medium] - x: "*[1]" - pause: medium - - t: "и знаменателем" # phrase(the fraction with numerator 5 'and denominator' 8) + - t: "знаменатель" - x: "*[2]" - pause: long - test: if: "$ClearSpeak_Fractions='EndFrac' or $ClearSpeak_Fractions='GeneralEndFrac'" then: - pause: short - - t: "конец дроби" # phrase(the fraction with 3 over 4 'end fraction') + - t: "конец дроби" - pause: short -# rules for functions raised to a power -# these could have been written on 'mrow' but putting them on msup seems more specific -# to see if it is a function, we look right to see if the following sibling is apply-function - name: ClearSpeak-function-inverse tag: inverse-function match: "." replace: - test: if: $ClearSpeak_Trig = 'TrigInverse' - then: [{x: "*[1]"}, {bookmark: "*[2]/@id"}, t: "обратное"] # phrase(8 over 5 is the 'inverse' of 5 over 8) + then: [{x: "*[1]"}, {bookmark: "*[2]/@id"}, t: "обратное"] else_test: if: $ClearSpeak_Trig = 'ArcTrig' - then: [bookmark: "*[2]/@id", t: "дуга", x: "*[1]"] # phrase(the 'arc' of a circle) - else: [bookmark: "*[2]/@id", t: "обратное", x: "*[1]"] # default/Auto # phrase(8 over 5 is the 'inverse' of 5 over 8) + then: [bookmark: "*[2]/@id", t: "арка", x: "*[1]"] + else: [bookmark: "*[2]/@id", t: "обратное", x: "*[1]"] - name: function-squared-or-cubed tag: power match: - "*[2][self::m:mn][.='2' or .='3'] and" - - "following-sibling::*[1][self::m:mo][.='⁡']" #invisible function apply + - "following-sibling::*[1][self::m:mo][.='⁡']" replace: - x: "*[1]" - bookmark: "*[2]/@id" - test: if: "*[2][.='2']" - then: [t: "квадрат"] # phrase(25 equals 5 'squared') - else: [t: "куб"] # phrase(625 equals 5 'cubed') + then: [t: "в квадрате"] + else: [t: "в кубе"] - name: function-power tag: power match: - - "following-sibling::*[1][self::m:mo][.='⁡']" #invisible function apply + - "following-sibling::*[1][self::m:mo][.='⁡']" replace: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' third power of 2) + then: [t: ""] - bookmark: "*[2]/@id" - test: if: "*[2][self::m:mn][not(contains(., '.'))]" then: [x: "ToOrdinal(*[2])"] else: [x: "*[2]"] - - t: "сила" # phrase(the third 'power of' 6) + - t: "степени" - pause: short - x: "*[1]" - name: AfterPower-nested tag: power - match: # directly a superscript or an mrow that contains a superscript + match: - "$ClearSpeak_Exponents = 'AfterPower' and" - "*[2][self::m:power or self::m:power or self::m:mrow[m:power]]" replace: - x: "*[1]" - - t: "возведено в степень" # phrase(5 'raised to the exponent' x plus 1) + - t: "возведено в степень" - pause: short - x: "*[2]" - - pause: short - - t: "конечный показатель" # phrase(5 raised to the exponent x plus 1 'end exponent') + - pause: medium + - t: "конец степени" - name: AfterPower-default tag: power match: "$ClearSpeak_Exponents = 'AfterPower'" replace: - x: "*[1]" - - t: "поднялся на власть" # phrase(x is 'raised to the power' 4) + - t: "возведено в степень" - x: "*[2]" - pause: short @@ -310,7 +297,7 @@ replace: - x: "*[1]" - bookmark: "*[2]/@id" - - t: "квадрат" # phrase(7 'squared' equals 49) + - t: "в квадрате" - name: cubed tag: power @@ -318,21 +305,25 @@ replace: - x: "*[1]" - bookmark: "*[2]/@id" - - t: "куб" # phrase(5 'cubed' equals 125) + - t: "в кубе" - name: simple-integer tag: power match: "*[2][self::m:mn][not(contains(., '.'))]" replace: - x: "*[1]" - - t: "до" # phrase(2 raised 'to the' power 7) - test: if: "*[2][.>0]" - then: {x: "ToOrdinal(*[2])"} - else: {x: "*[2]"} + then: + - t: "в" + - x: "ToOrdinal(*[2])" + - t: "степени" + else: + - t: "в степени" + - x: "*[2]" - test: - if: "$ClearSpeak_Exponents != 'Ordinal'" - then: [t: "степени"] # phrase(2 raised to the 'power' 7) + if: "$ClearSpeak_Exponents != 'Ordinal' and *[2][.>0]" + then: [t: ""] - name: simple-negative-integer tag: power @@ -342,40 +333,24 @@ - " ]" replace: - x: "*[1]" - - t: "до" # phrase(2 raised 'to the' power 7) + - t: "в степени" - x: "*[2]" - - test: - if: "$ClearSpeak_Exponents != 'Ordinal'" - then: [t: "степени"] # phrase(2 raised to the 'power' 7) - name: simple-var tag: power match: "*[2][self::m:mi][string-length(.)=1]" replace: - x: "*[1]" - - t: "до" # phrase(3 raised 'to the' power 7) + - t: "в степени" - x: "*[2]" - - pronounce: [{text: "-th"}, {ipa: "θ"}, {sapi5: "th"}, {eloquence: "T"}] - - test: - if: "$ClearSpeak_Exponents != 'Ordinal'" - then: [t: "степени"] # phrase(2 raised to the 'power' 7) - -# match nested exponent, where the nested exponent is has the power 2 or 3 (n below) -# [xxx]^n, - [xxx]^n, [xxx] var^n, -[xxx] var^n -# where xxx is a number or common fraction (or a var in the first two forms) -# short of creating a specialized built-in function, I don't see a way to eliminate a lot of repetition in the matches -# also really bad is that the test of a common fraction is replicated here (four times!) -# Note: the ClearSpeak doc doesn't say these only apply when the pref is "Auto", -# but the test cases all fall back to "raised to the exponent" when not "Auto" -# If these are allowed for non-Auto values, then you end up with "...power power...". -- # [xxx]^n - name: nested-squared-or-cubed + - pronounce: [{text: "-й"}, {ipa: "j"}, {sapi5: "y"}, {eloquence: "Y"}] + +- name: nested-squared-or-cubed tag: power match: - "$ClearSpeak_Exponents = 'Auto' and" - "*[2][self::m:power][" - - " *[2][self::m:mn][.='2' or .='3'] and " # exp is 2 or 3 - # base is mn, mi, common fraction ([xxx] case) + - " *[2][self::m:mn][.='2' or .='3'] and " - " *[1][self::m:mn or self::m:mi or " - " self::m:fraction[*[1][self::m:mn][not(contains(., '.')) and text()<20] and" - " *[2][self::m:mn][not(contains(., '.')) and 2<= text() and text()<=10]]" @@ -383,19 +358,18 @@ - " ]" replace: - x: "*[1]" - - t: "возведено в" # phrase(x 'raised to the' second power) - - x: "*[2]" - - t: "степень" # phrase(x raised to the second 'power') + - test: + if: "*[2]/*[2][.='2']" + then: [t: "во вторую степень"] + else: [t: "в третью степень"] -- # - [xxx]^n - name: nested-negative-squared-or-cubed +- name: nested-negative-squared-or-cubed tag: power match: - "$ClearSpeak_Exponents = 'Auto' and" - " *[2][self::m:minus and count(*)=1 and " - " *[1]/*[1][self::m:power][" - - " *[2][self::m:mn][.='2' or .='3'] and " # exp is 2 or 3" - # base is mn, mi, common fraction ([xxx] case) + - " *[2][self::m:mn][.='2' or .='3'] and " - " *[1][self::m:mn or self::m:mi or " - " self::m:fraction[*[1][self::m:mn][not(contains(., '.')) and text()<20] and" - " *[2][self::m:mn][not(contains(., '.')) and 2<= text() and text()<=10]]" @@ -404,22 +378,21 @@ - " ]" replace: - x: "*[1]" - - t: "возведено в" # phrase(x 'raised to the' second power) - - x: "*[2]" - - t: "степень" # phrase(x raised to the second 'power') + - test: + if: "*[2]/*[1]/*[2][.='2']" + then: [t: "во вторую степень"] + else: [t: "в третью степень"] -- # [xxx] var^n - name: nested-var-squared-or-cubed +- name: nested-var-squared-or-cubed tag: power match: - "$ClearSpeak_Exponents = 'Auto' and" - " *[2][self::m:mrow][count(*)=3][ " - " *[3][self::m:power][" - - " *[2][self::m:mn][.='2' or .='3'] and " # exp is 2 or 3 + - " *[2][self::m:mn][.='2' or .='3'] and " - " *[1][self::m:mi]" - " ] and " - - " *[2][self::m:mo][.='⁢'] and " # invisible times - # base is mn, or common fraction ([xxx] case) + - " *[2][self::m:mo][.='⁢'] and " - " *[1][self::m:mn or " - " self::m:fraction[*[1][self::m:mn][not(contains(., '.')) and text()<20] and" - " *[2][self::m:mn][not(contains(., '.')) and 2<= text() and text()<=10]]" @@ -427,23 +400,22 @@ - " ]" replace: - x: "*[1]" - - t: "поднят до" # phrase(x 'raised to the' second power) - - x: "*[2]" - - t: "сила" # phrase(x raised to the second 'power') + - test: + if: "*[2]/*[3]/*[2][.='2']" + then: [t: "во вторую степень"] + else: [t: "в третью степень"] -- # -[xxx] var^n - name: nested-negative-var-squared-or-cubed +- name: nested-negative-var-squared-or-cubed tag: power match: - "$ClearSpeak_Exponents = 'Auto' and" - " *[2][self::m:mrow][count(*)=3][ " - " *[3][self::m:power][" - - " *[2][self::m:mn][.='2' or .='3'] and " # exp is 2 or 3 + - " *[2][self::m:mn][.='2' or .='3'] and " - " *[1][self::m:mi]" - " ] and " - - " *[2][self::m:mo][.='⁢'] and " # invisible times + - " *[2][self::m:mo][.='⁢'] and " - " *[1][self::m:minus and count(*)=1 and " - # base is mn, or common fraction ([xxx] case) - " *[1][self::m:mn or " - " self::m:fraction[*[1][self::m:mn][not(contains(., '.')) and text()<20] and" - " *[2][self::m:mn][not(contains(., '.')) and 2<= text() and text()<=10]]" @@ -452,53 +424,54 @@ - " ]" replace: - x: "*[1]" - - t: "поднят до" # phrase(x 'raised to the' second power) - - x: "*[2]" - - t: "сила" # phrase(x raised to the second 'power') + - test: + if: "*[2]/*[3]/*[2][.='2']" + then: [t: "во вторую степень"] + else: [t: "в третью степень"] - name: default-exponent-power tag: power - match: # directly a superscript or an mrow that contains a superscript + match: - "*[2][self::m:power or self::m:power or self::m:mrow[m:power]]" replace: - x: "*[1]" - - t: "поднят до экспонента" # phrase(x is 'raised to the exponent') + - t: "возведено в степень" - pause: short - x: "*[2]" - pause: short - - t: "конечный показатель" # phrase(and now 'end exponent' has been reached) + - t: "конец степени" - name: default tag: power match: "." replace: - x: "*[1]" - - t: "поднят до" # phrase(x 'raised to the' second power) + - t: "в степени" - x: "*[2]" - - t: "сила" # phrase(x raised to the second 'power') -# -# Some rules on mrows -# -- # the inference rules lump absolute value and cardinality together, so those rules are implemented here - name: ClearSpeak-absolute-value +- name: ClearSpeak-absolute-value tag: absolute-value match: "." - variables: [WordToSay: "IfThenElse($ClearSpeak_AbsoluteValue = 'Cardinality', 'cardinality', 'absolute value')"] replace: - - test: - if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' absolute value of 25) - - x: "$WordToSay" - - t: "из" # phrase(the absolute value 'of' 25) - - x: "*[1]" - - test: - if: "$ClearSpeak_AbsoluteValue = 'AbsEnd'" - then: - - pause: short - - t: "конец" # phrase('end' absolute value) - - x: "$WordToSay" - - pause: short + - test: + if: "$Verbosity!='Terse'" + then: [t: ""] + - test: + if: "$ClearSpeak_AbsoluteValue = 'Cardinality'" + then: [t: "мощность множества"] + else: [t: "модуль"] + - t: "из" + - x: "*[1]" + - test: + if: "$ClearSpeak_AbsoluteValue = 'AbsEnd'" + then: + - pause: short + - t: "конец" + - test: + if: "$ClearSpeak_AbsoluteValue = 'Cardinality'" + then: [t: "мощности множества"] + else: [t: "модуля"] + - pause: short - name: set tag: set @@ -506,24 +479,24 @@ replace: - test: - if: "count(*)=0" - then: [t: "пустой набор"] # phrase('the empty set') + then: [t: "пустое множество"] - else_if: "count(*)=2" then: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' empty set) - - t: "пустой набор" # phrase(the 'empty set') + then: [t: ""] + - t: "пустое множество" - else_if: "count(*[1]/*)=3 and *[1]/*[2][self::m:mo][.=':' or .='|' or .='∣']" then: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' set of all integers) - - t: "набор чисел" # phrase(this is a 'set of' numbers) + then: [t: ""] + - t: "множество" - test: if: $ClearSpeak_Sets != 'woAll' - then: [t: "всех"] # phrase(the set of 'all' integers) + then: [t: "всех"] - x: "*[1]/*[1]" - - t: "так что" # phrase(the set S 'such that' x is less than y) + - t: "таких, что" - x: "*[1]/*[3]" else: - test: @@ -531,24 +504,20 @@ then: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' set of integers) - - t: "набор" # phrase(this is a 'set' of integers) + then: [t: ""] + - t: "множество" - x: "*[1]" -- # intervals are controlled by a ClearSpeak Preference -- parens/brackets don't have to match, so we avoid IsBracketed - # alternatively, we could have four (or ten) rules, but there is a lot of duplication if we do that - # this one rule handles all ten cases listed as part $ClearSpeak_Paren = 'Interval' - # note that *[2] is an mrow with X, ",", Y, so getting X or Y is a double index - name: ClearSpeak-intervals # avoid overriding with default "intervals" name +- name: ClearSpeak-intervals variables: - is_intervals_start_infinity: "*[1][self::m:minus and count(*)=1 and *[1][.='∞']]" - is_intervals_end_infinity: "*[2][.='∞'or (self::m:plus and count(*)=1 and *[1][.='∞'])]" tag: [open-interval, open-closed-interval, closed-interval, closed-open-interval] match: "." replace: - - t: "интервал от " # phrase('the interval from' a to b) + - t: "интервал от" - x: "*[1]" - - t: "до" # phrase(the interval from a 'to' b) + - t: "до" - x: "*[2]" - pause: short - test: @@ -556,41 +525,38 @@ then: - test: if: "starts-with(name(.), 'open')" - then: [t: "не"] # phrase(the interval from a to b 'not' including b) - - t: "в том числе " # phrase(the interval from a to b not 'including' b) + then: [t: "исключая"] + else: [t: "включая"] - x: "*[1]" - # logic to deal with [not] arg #1 - test: if: "not($is_intervals_start_infinity or $is_intervals_end_infinity)" then_test: - if: "name(.)='open-interval'" - then: [t: "или"] # phrase(the interval including a 'or' b ) + then: [t: "и"] - else_if: "name(.)='closed-interval'" - then: [t: "и"] # phrase(the interval including a 'and' b) - else: [t: "но"] # phrase(the interval including a 'but' not b) - # some ugly logic dealing with connectives: or, but, but, and (cleaner to be part of next clause?) + then: [t: "и"] + else: [t: "но"] - test: if: not($is_intervals_end_infinity) then: - test: - # there is some asymmetry to the test because of the and/or/but logic above if: not( name(.)='open-interval' or name(.)='closed-interval' ) or $is_intervals_start_infinity then: - test: if: "name(.) = 'open-interval' or name(.) = 'closed-open-interval'" - then: [t: "не"] # phrase(the interval 'not' including a) - - t: "включая" # phrase(the interval not 'including' a) + then: [t: "исключая"] + else: [t: "включая"] - x: "*[2]" - # onto the [not] [including]... part - name: binomial-frac-vector tag: matrix match: - "$ClearSpeak_Matrix = 'Combinatorics' and " - "count(*[1]/*)=1 and count(*)=2" replace: - - x: "*[1]/*[1]/*" # mtable/mtr/mtd - - t: "выберите" # phrase(the binomial coefficient n 'choose' m) + - t: "число сочетаний из" + - x: "*[1]/*[1]/*" + - t: "по" - x: "*[2]/*[1]/*" - name: ClearSpeak-default @@ -599,12 +565,12 @@ variables: [NextLineIsContinuedRow: "following-sibling::*[1][contains(@data-intent-property, ':continued-row:')]"] replace: - pause: medium - - t: "ряд" # phrase(the first 'row' of a matrix) + - t: "строка" - x: "count(preceding-sibling::*)+1" - test: if: .[self::m:mlabeledtr] then: - - t: "с меткой" # phrase(the line 'with label' first equation) + - t: "с меткой" - x: "*[1]/*" - pause: short - pause: medium @@ -613,8 +579,7 @@ then: [x: "*[position()>1]"] else: {x: "*"} -- # handle both log and ln - name: ClearSpeak-log +- name: ClearSpeak-log tag: mrow variables: [{log_is_simple: "IsNode(*[3],'simple')"}] match: @@ -626,31 +591,30 @@ if: "$log_is_simple" then_test: - if: "*[1][.='log']" - then: [t: "log"] # phrase(the 'log' of x) + then: [t: "логарифм"] - else_if: $ClearSpeak_Log = 'LnAsNaturalLog' - then: [t: "натуральный журнал"] # phrase(the 'natural log' of the product of 2 numbers) - else: [spell: "'ln'"] + then: [t: "натуральный логарифм"] + else: [t: "натуральный логарифм"] else: - test: if: "$Verbosity!='Terse' and not(log_is_simple)" - then: [t: "а"] # phrase('the' square root of 25) + then: [t: ""] - test: - if: "*[1][.='log']" - then: [t: "бревно"] + then: [t: "логарифм"] - else_if: $ClearSpeak_Log = 'LnAsNaturalLog' - then: [t: "естественный журнал"] # phrase(the 'natural log' of x) - else: [spell: "'ln'"] - - t: "из" # phrase(the natural log 'of' x) + then: [t: "натуральный логарифм"] + else: [t: "натуральный логарифм"] + - t: "от" - pause: short - x: "*[3]" - name: ClearSpeak-multi-line - tag: [piecewise, system-of-equations, lines] # these are ignored in favor of the ClearSpeak prefs + tag: [piecewise, system-of-equations, lines] match: "." variables: - # Wikipedia has some tables where all the entire first column is empty (e.g., https://en.wikipedia.org/wiki/List_of_trigonometric_identities) - LineCount: "count(*[not(contains(@data-intent-property, ':continued-row:'))])" - - NextLineIsContinuedRow: "false()" # default value + - NextLineIsContinuedRow: "false()" - IsColumnSilent: true() replace: - test: @@ -659,21 +623,20 @@ - x: "$LineCount" - test: - if: "($ClearSpeak_MultiLineLabel = 'Auto' and self::m:piecewise) or $ClearSpeak_MultiLineLabel = 'Case'" - then: [t: "случай"] # phrase(this is the first 'case' of three cases) - - else_if: "$ClearSpeak_MultiLineLabel = 'Auto' or $ClearSpeak_MultiLineLabel = 'Line' or $ClearSpeak_MultiLineLabel = 'None'" # already dealt with Auto/Case - then: [t: "линия"] # phrase(this is the first 'line' of three lines) + then: [t: "случай"] + - else_if: "$ClearSpeak_MultiLineLabel = 'Auto' or $ClearSpeak_MultiLineLabel = 'Line' or $ClearSpeak_MultiLineLabel = 'None'" + then: [t: "строка"] - else_if: "$ClearSpeak_MultiLineLabel = 'Constraint'" - then: [t: "ограничение"] # phrase(this is the first 'constraint' of three constraints) + then: [t: "ограничение"] - else_if: "$ClearSpeak_MultiLineLabel = 'Equation'" - then: [t: "уравнение"] # phrase(this is the first 'equation' of three equations) + then: [t: "уравнение"] - else_if: "$ClearSpeak_MultiLineLabel = 'Row'" - then: [t: "ряд"] # phrase(this is the first 'row' of three rows) + then: [t: "строка"] - else_if: "$ClearSpeak_MultiLineLabel = 'Step'" - then: [t: "шаг"] # phrase(this is the first 'step' of three steps) - # else 'None -- don't say anything' + then: [t: "шаг"] - test: - if: "$LineCount != 1" - then: [ct: "s"] # plural # phrase(shown by the letter 's') + then: [ct: "ов"] - pause: short - x: "*" - pause: long @@ -689,27 +652,26 @@ - pause: medium - test: - if: "($ClearSpeak_MultiLineLabel = 'Auto' and parent::m:piecewise) or $ClearSpeak_MultiLineLabel = 'Case'" - then: [t: "случае"] # phrase(in this 'case' x is not equal to y) - - else_if: "$ClearSpeak_MultiLineLabel = 'Auto' or $ClearSpeak_MultiLineLabel = 'Line'" # already dealt with Auto/Case - then: [t: "линия"] # phrase(the straight 'line' between x and y) + then: [t: "случае"] + - else_if: "$ClearSpeak_MultiLineLabel = 'Auto' or $ClearSpeak_MultiLineLabel = 'Line'" + then: [t: "строке"] - else_if: "$ClearSpeak_MultiLineLabel = 'Constraint'" - then: [t: "ограничение"] # phrase(there is a 'constraint' on possible values) + then: [t: "ограничении"] - else_if: "$ClearSpeak_MultiLineLabel = 'Equation'" - then: [t: "уравнение"] # phrase(the 'equation' pi r squared gives the area of a circle) + then: [t: "уравнении"] - else_if: "$ClearSpeak_MultiLineLabel = 'Row'" - then: [t: "строке"] # phrase(the values on the top 'row' are relevant) + then: [t: "строке"] - else_if: "$ClearSpeak_MultiLineLabel = 'Step'" - then: [t: "шаг"] # phrase(this is a 'step' by step process) - # else 'None -- don't say anything' + then: [t: "шаге"] - x: "count(preceding-sibling::*[not(contains(@data-intent-property, ':continued-row:'))]) + 1" - test: if: "self::m:mlabeledtr" then: - - t: "с меткой" # phrase(the diagram is complete 'with label') + - t: "с меткой" - x: "*[1]/*" - test: - if: "$ClearSpeak_MultiLineLabel='None'" - then: [pause: xlong] # need a very long pause with no line labels + then: [pause: long] - else_if: "not(contains(@data-intent-property, ':continued-row:'))" then: [pause: medium] - test: @@ -721,17 +683,16 @@ tag: mo match: - ".='⁡' and $ClearSpeak_Functions = 'None' and" - - "not(preceding-sibling::*[1][IsInDefinition(., 'TrigFunctionNames')])" # Functions=None does not apply to "trig" functions + - "not(preceding-sibling::*[1][IsInDefinition(., 'TrigFunctionNames')])" replace: test: if: "$ClearSpeak_ImpliedTimes = 'None'" then: [t: ""] - else: [t: "раз"] # phrase(5 'times' 3 equals 15) + else: [t: "умножить на"] - name: no-times tag: mo match: - # Note: this rule is also part of the paren rule so that the parens speak - ".='⁢' and $ClearSpeak_ImpliedTimes = 'None'" replace: - t: "" @@ -739,39 +700,34 @@ - name: ClearSpeak-times tag: mo match: - # say "times" when invisible times is followed by parens or a superscript that has a base with parens or "|"s - # if we aren't sure if it is times or not, don't say anything - ".='⁢' and (not(@data-function-guess) or $ClearSpeak_Functions = 'None') and" - "not(ancestor-or-self::*[contains(@data-intent-property, ':literal:')]) and (" - " $ClearSpeak_ImpliedTimes = 'MoreImpliedTimes'" - " or " - " following-sibling::*[1][" - " IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|') or " - # most of these aren't mentioned in ClearSpeak spec, but are (I think) expected uses of "times" - - " self::m:matrix or self::m:determinant or self::m:binomial or" # followed by parens + - " self::m:matrix or self::m:determinant or self::m:binomial or" - " self::m:square-root or self::m:msqrt or self::m:root or self::m:mroot or" - " (self::m:msub or self::m:msubsup or" - - " ((self::m:msup or self::m:power) and not(IsNode(*[1], 'leaf') and *[2][self::m:mn and (.=2 or '.=3')]))) and " # followed by msup, etc. + - " ((self::m:msup or self::m:power) and not(IsNode(*[1], 'leaf') and *[2][self::m:mn and (.=2 or '.=3')]))) and " - " (*[1][self::m:mrow[IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|')] or " - - " self::m:matrix or self::m:determinant] or" # base has parens + - " self::m:matrix or self::m:determinant] or" - " not(IsNode(*[2], 'simple')) or " - " (self::m:msubsup and not(IsNode(*[3], 'simple')))" - " )" - " ]" - # other possibility is the preceding element has parens (but not the following) - # this is not mentioned in the ClearSpeak rules or examples but seems like it should say "times". E.g, |x| y - " or " - " preceding-sibling::*[1][" - - " IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|')]" # followed by parens + - " IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|')]" - " )" replace: - - t: "раз" # phrase(5 'times' 3 equals 15) + - t: "умножить на" - name: no-say-parens tag: mrow match: - "parent::*[not(self::m:msup) and not(self::m:msub) and not(self::m:msubsup) and not(self::m:power) and" - - " not(self::m:math) ] and " # rule out [x] standing alone + - " not(self::m:math) ] and " - "( IsBracketed(., '(', ')') or IsBracketed(., '[', ']') ) and " - "not( $ClearSpeak_Functions = 'None' and " - " (preceding-sibling::*[1][.='⁡'] or following-sibling::*[1][.='⁡']) ) and " @@ -780,8 +736,6 @@ - "IsNode(*[2], 'simple') and" - "not(preceding-sibling::*[1][.='\u2062' and @data-function-guess]) and" - "not(ancestor-or-self::*[contains(@data-intent-property, ':literal:')])" - # missing clause: 'a positive fraction that is spoken as an ordinal - # (either by the Ordinal preference or by the default rules)' replace: - x: "*[2]" diff --git a/Rules/Languages/ru/SharedRules/calculus.yaml b/Rules/Languages/ru/SharedRules/calculus.yaml index a5ad70a0..07e06205 100644 --- a/Rules/Languages/ru/SharedRules/calculus.yaml +++ b/Rules/Languages/ru/SharedRules/calculus.yaml @@ -10,7 +10,7 @@ then: - test: if: "$Verbosity!='Terse'" - then: [t: "из"] # phrase(function 'of' one variable) -- note OneCore voices spell out "div" + then: [t: "от"] # phrase(function 'of' one variable) -- note OneCore voices spell out "div" - test: if: "not(IsNode(*[1], 'leaf'))" then: [pause: short] @@ -33,7 +33,7 @@ tag: curl match: "count(*) = 1" replace: - - t: "керл" # phrase(the 'curl of' a field) + - t: "ротор" # phrase(the 'curl of' a field) - test: if: "$Verbosity!='Terse'" then: [t: "из"] # phrase(function 'of' one variable) -- note OneCore voices spell out "div" diff --git a/Rules/Languages/ru/SharedRules/default.yaml b/Rules/Languages/ru/SharedRules/default.yaml index fa8293ab..eb3dda3c 100644 --- a/Rules/Languages/ru/SharedRules/default.yaml +++ b/Rules/Languages/ru/SharedRules/default.yaml @@ -87,7 +87,7 @@ - "not(ancestor::*[name() != 'mrow'][1]/self::m:fraction)" # FIX: can't test for mrow -- what should be used??? replace: - x: "*[1]" - - t: "фракция x " # phrase("the fraction x 'over' y") + - t: "дробь x " # phrase("the fraction x 'over' y") - x: "*[2]" - pause: short @@ -101,7 +101,7 @@ - test: if: "not(IsNode(*[1],'leaf'))" then: [pause: short] - - t: "фракция x " # phrase("the fraction x 'over' y") + - t: "дробь x " # phrase("the fraction x 'over' y") - test: if: "not(IsNode(*[2],'leaf'))" then: [pause: short] @@ -109,7 +109,7 @@ - pause: short - test: if: "$Impairment = 'Blindness'" - then: [t: "начало фракции x над y "] # phrase("start of fraction x over y 'end over'") + then: [t: "начало дроби x над y "] # phrase("start of fraction x over y 'end over'") - pause: medium @@ -419,7 +419,7 @@ - test: if: count(*)=1 then: [t: "строкой"] # phrase(the table with 1 'row') - else: [t: "рядами"] # phrase(the table with 3 'rows') + else: [t: "строками"] # phrase(the table with 3 'rows') - t: "и " # phrase(the table with 3 rows 'and' 4 columns) - x: "count(*[1]/*)" - test: @@ -436,7 +436,7 @@ match: "." replace: - pause: medium - - t: "ряд" # phrase(the first 'row' of a matrix) + - t: "строка" # phrase(the first 'row' of a matrix) - x: "count(preceding-sibling::*)+1" - test: if: .[self::m:mlabeledtr] diff --git a/Rules/Languages/ru/SimpleSpeak_Rules.yaml b/Rules/Languages/ru/SimpleSpeak_Rules.yaml index 19980f05..402ef73a 100644 --- a/Rules/Languages/ru/SimpleSpeak_Rules.yaml +++ b/Rules/Languages/ru/SimpleSpeak_Rules.yaml @@ -25,7 +25,7 @@ tag: mn match: "starts-with(text(), '-')" replace: - - t: "минус" # phrase(x 'minus' y) + - t: "минус" # (en: 'minus') - x: "translate(text(), '-_', '')" - name: default @@ -34,17 +34,17 @@ replace: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' square root of x) - - t: "квадратный корень" # phrase(the 'square root' of x) + then: [t: ""] + - t: "квадратный корень" # (en: 'square root') - test: if: "$Verbosity!='Terse'" - then: [t: "из"] # phrase(the square root 'of' x) + then: [t: "из"] # (en: 'of') else: [pause: short] - x: "*[1]" - test: if: "IsNode(*[1], 'leaf') or $Impairment != 'Blindness'" then: [pause: short] - else: [t: "end of root", pause: short] # phrase(start the square root of x 'end of root') + else: [t: "конец корня", pause: short] # (en: 'end of root') - name: default tag: root @@ -52,31 +52,31 @@ replace: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] + then: [t: ""] - test: if: "*[2][self::m:mn and not(contains(., '.'))]" then_test: - if: "*[2][.='2']" - then: [t: "квадратный корень"] # phrase(the 'square root' of x) + then: [t: "квадратный корень"] # (en: 'square root') - else_if: "*[2][.='3']" - then: [t: "корень куба"] # phrase(the 'cube root' of x) - - else: [x: "ToOrdinal(*[2])", t: "корень"] # phrase(the square 'root' of 25) + then: [t: "кубический корень"] # (en: 'cube root') + - else: [x: "ToOrdinal(*[2])", t: "корень"] # (en: 'root') else: - test: if: "*[2][self::m:mi][string-length(.)=1]" then: - x: "*[2]" - - pronounce: [{text: "-th"}, {ipa: "θ"}, {sapi5: "th"}, {eloquence: "T"}] + - pronounce: [{text: "-й"}, {ipa: "j"}, {sapi5: "th"}, {eloquence: "T"}] else: [x: "*[2]"] - - t: "корень" # phrase(the square 'root' of) + - t: "корень" # (en: 'root') - test: if: "$Verbosity!='Terse'" - then: [t: "из"] # phrase(the square root 'of' x) + then: [t: "из"] # (en: 'of') - x: "*[1]" - test: if: "IsNode(*[1], 'leaf') or $Impairment != 'Blindness'" then: [pause: short] - else: [t: "end of root", pause: short] # phrase(start the fifth root of x 'end of root') + else: [t: "конец корня", pause: short] # (en: 'end of root') # Fraction rules # Mixed numbers mostly "just work" because the invisible char reads as "and" and other parts read properly on their own @@ -109,7 +109,7 @@ BaseNode(*[1])[contains(@data-intent-property, ':unit') or (self::m:mrow and self::*[3][contains(@data-intent-property, ':unit')])]" replace: - x: "*[1]" - - t: "перемещение" # phrase('5 meters 'per' second) + - t: "в" # (en: 'per') — например, "метров в секунду" - x: "*[2]" - name: simple @@ -122,7 +122,7 @@ - "not(ancestor::*[name() != 'mrow'][1]/self::m:fraction)" # FIX: can't test for mrow -- what should be used??? replace: - x: "*[1]" - - t: "над" # phrase(the fraction 3 'over' 4) + - t: "на" # (en: 'over') - x: "*[2]" - pause: short @@ -132,13 +132,13 @@ replace: - test: if: "$Impairment = 'Blindness'" - then: [t: "фракция"] # phrase(the 'fraction' 3 over 4) + then: [t: "дробь"] # (en: 'fraction') - pause: short - x: "*[1]" - test: if: "not(IsNode(*[1],'leaf'))" then: [pause: short] - - t: "над" # phrase(the fraction 3 'over' 4) + - t: "на" # (en: 'over') - test: if: "not(IsNode(*[2],'leaf'))" then: [pause: short] @@ -146,7 +146,7 @@ - pause: short - test: if: "$Impairment = 'Blindness'" - then: [t: "конец фракции"] # phrase(start 7 over 8 'end of fraction') + then: [t: "конец дроби"] # (en: 'end of fraction') - pause: medium # rules for functions raised to a power @@ -156,7 +156,7 @@ tag: inverse-function match: "." replace: - - t: "обратный" # phrase(the 'inverse' of f) + - t: "обратная" # (en: 'inverse') - x: "*[1]" - name: function-squared-or-cubed @@ -169,8 +169,8 @@ - bookmark: "*[2]/@id" - test: if: "*[2][.=2]" - then: [t: "квадрат"] # phrase(5 'squared' equals 25) - else: [t: "кубик"] # phrase(5 'cubed' equals 125) + then: [t: "в квадрате"] # (en: 'squared') + else: [t: "в кубе"] # (en: 'cubed') - name: function-power tag: power match: @@ -178,13 +178,13 @@ replace: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # # phrase('the' fourth power of 10) + then: [t: ""] - bookmark: "*[2]/@id" - test: if: "*[2][self::m:mn][not(contains(., '.'))]" then: [x: "ToOrdinal(*[2])"] else: [x: "*[2]"] - - t: "сила" # phrase(the fourth 'power of' 2) + - t: "степень" # (en: 'power') - pause: short - x: "*[1]" @@ -197,15 +197,15 @@ - bookmark: "*[2]/@id" - test: if: "*[2][.=2]" - then: [t: "квадрат"] # phrase(5 'squared' equals 25) - else: [t: "кубик"] # phrase(5 'cubed' equals 125) + then: [t: "в квадрате"] # (en: 'squared') + else: [t: "в кубе"] # (en: 'cubed') - name: simple-integer tag: power match: "*[2][self::m:mn][not(contains(., '.'))]" replace: - x: "*[1]" - - t: "в" # phrase(15 raised 'to the' second power equals 225) + - t: "в" # (en: 'to the') - test: if: "*[2][.>0]" then: {x: "ToOrdinal(*[2])"} @@ -217,23 +217,23 @@ - " *[1][self::m:mn][not(contains(., '.'))]]" replace: - x: "*[1]" - - t: "в" # phrase(15 raised 'to the' second power equals 225) + - t: "в" # (en: 'to the') - x: "*[2]" - name: simple-var tag: power match: "*[2][self::m:mi][string-length(.)=1]" replace: - x: "*[1]" - - t: "в" # phrase(15 raised 'to the' second power equals 225) + - t: "в" # (en: 'to the') - x: "*[2]" - - pronounce: [{text: "-th"}, {ipa: "θ"}, {sapi5: "th"}, {eloquence: "T"}] + - pronounce: [{text: "-й"}, {ipa: "j"}, {sapi5: "th"}, {eloquence: "T"}] - name: simple tag: power match: "IsNode(*[2], 'leaf')" replace: - x: "*[1]" - - t: "в" # phrase(15 raised 'to the' second power equals 225) + - t: "в" # (en: 'to the') - x: "*[2]" - name: nested @@ -248,13 +248,13 @@ - " ]" replace: - x: "*[1]" - - t: "поднято до" # phrase(15 'raised to the' second power equals 225) + - t: "в степени" # (en: 'raised to the') - x: "*[2]" - pause: short - test: if: "$Impairment = 'Blindness'" then: - - t: "конец показателя" # phrase(start 2 raised to the exponent 4 'end of exponent') + - t: "конец степени" # (en: 'end of exponent') - pause: short else: - pause: medium @@ -264,9 +264,9 @@ match: "." replace: - x: "*[1]" - - t: "поднято до" # phrase(15 'raised to the' second power equals 225) + - t: "в степени" # (en: 'raised to the') - x: "*[2]" - - t: "власти" # phrase(15 raised to the second 'power' equals 225) + - t: "" - pause: short # @@ -281,22 +281,22 @@ then: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' empty set) - - t: "пустым набором" # phrase(when a set contains no value it is called an 'empty set' and this is valid) + then: [t: ""] + - t: "пустое множество" # (en: 'empty set') - else_if: "count(*[1]/*)=3 and *[1]/*[2][self::m:mo][.=':' or .='|' or .='∣']" then: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' set of all integers) - - t: "набор всех" # phrase(the 'set of all' positive integers less than 10) + then: [t: ""] + - t: "множество всех" # (en: 'set of all') - x: "*[1]/*[1]" - - t: "так что" # phrase(x 'such that' x is less than y) + - t: "таких, что" # (en: 'such that') - x: "*[1]/*[3]" else: - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # phrase('the' set of integers) - - t: "набор" # phrase(here is a 'set' of numbers) + then: [t: ""] + - t: "множество" # (en: 'set') - x: "*[1]" - name: times @@ -325,7 +325,7 @@ - " IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|')]" # followed by parens - " )" replace: - - t: "раз" # phrase(7 'times' 5 equals 35) + - t: "умножить" # (en: 'times') - name: no-say-parens tag: mrow diff --git a/Rules/Languages/ru/definitions.yaml b/Rules/Languages/ru/definitions.yaml index 5da10e97..dc627194 100644 --- a/Rules/Languages/ru/definitions.yaml +++ b/Rules/Languages/ru/definitions.yaml @@ -10,44 +10,44 @@ # for readability, spaces can be used around any of the delimiter characters # Note: if there are multiple fixities, the first one is used if the fixity is not given in the intent - IntentMappings: { - "indexed-by": "infix= ; sub; end sub: end sub: end subscript", + "indexed-by": "infix= ; индекс; конец индекса: конец индекса: конец индекса", "modified-variable": "silent= ", - "say-super": "infix=super: superscript: superscript", # used with 'mo' for superscripts (e.g, "<") + "say-super": "infix=верхний индекс: верхний индекс: верхний индекс", # used with 'mo' for superscripts (e.g, "<") "skip-super": "silent=", # used with 'mo' for superscripts (e.g, "*") - "absolute-value": "function= ; absolute value: the absolute value: the absolute value; end absolute value", - "binomial": "infix=binomial; choose; end binomial", - # "closed-interval": "other=closed-interval; from,to; end closed-interval", - "greatest-common-divisor": "function=gcd: the gcd: the greatest common divisor", - "imaginary-part": "function=imaginary part, the imaginary part, the imaginary part", - "least-common-multiple": "function=lcm:the lcm:the least common multiple", - # "large-op": "infix=over || other=from,to", - "limit": "prefix=limit as: the limit as: the limit as", - "lim-sup": "prefix=lim sup as: the limit superior as: the limit superior as", - "lim-inf": "prefix=lim inf as: the limit inferior as : the limit inferior as", - "logarithm-with-base": "prefix=log base: the log base: the log base", - "natural-logarithm": "function=l n: natural log: natural log", - "minus": "infix=minus || prefix=negative", - "plus": "infix=plus || prefix=positive", + "absolute-value": "function= ; модуль: модуль: модуль; конец модуля", + "binomial": "infix=бином; по; конец бинома", + # "closed-interval": "other=closed-interval; от,до; end closed-interval", + "greatest-common-divisor": "function=нод: нод: наибольший общий делитель", + "imaginary-part": "function=мнимая часть, мнимая часть, мнимая часть", + "least-common-multiple": "function=нок:нок:наименьшее общее кратное", + # "large-op": "infix=над || other=от,до", + "limit": "prefix=придел при: придел при: придел при", + "lim-sup": "prefix=верхний придел при: верхний придел при: верхний придел при", + "lim-inf": "prefix=нижний придел при: нижний придел при: нижний придел при", + "logarithm-with-base": "prefix=логарифм по основанию: логарифм по основанию: логарифм по основанию", + "natural-logarithm": "function=l n: натуральный логарифм: натуральный логарифм", + "minus": "infix=минус || prefix=отрицательное", + "plus": "infix=плюс || prefix=положительное", # "pochhammer": "infix=permutations of", # arguments are in reverse order, so can't work here - "real-part": "function=the real part", - - "transpose": "postfix=transpose || function=transpose", - "norm": "function=; norm: norm: norm; end norm", - "trace": "function=;trace : trace: the trace; end trace", - "dimension": "function=; dimension : dimension: the dimension; end dimension", - "homomorphism": "function= ; homomorphism : homomorphism: the homomorphism; end homomorphism", - "kernel": "function= ; kernel : kernel: the kernel; end kernel", - "vector": "function= ; vector || prefix=vector", - "cross-product": "infix=cross: cross product: cross product", - "dot-product": "infix=dot: dot product: dot:dot product", - - "divergence": "function= ; dihv: divergence: divergence; end divergence", - "curl": "function= ; curl; end curl", - "gradient": "function= ; del: gradient: gradient; end gradient", - "laplacian": "function=lahplahsian", # speech engines don't do a good job with "laplacian" - - "chemistry-concentration": "function= ; concentration: concentration of: the concentration of; end concentration", + "real-part": "function=действительная часть", + + "transpose": "postfix=транспонирование || function=транспонированная", + "norm": "function=; норма: норма: норма; конец нормы", + "trace": "function=;след : след: след; конец следа", + "dimension": "function=; размерность : размерность: размерность; конец размерности", + "homomorphism": "function= ; гомоморфизм : гомоморфизм: гомоморфизм; конец гомоморфизма", + "kernel": "function= ; ядро : ядро: ядро; конец ядра", + "vector": "function= ; вектор || prefix=вектор", + "cross-product": "infix=векторное произведение: векторное произведение: векторное произведение", + "dot-product": "infix=скалярное произведение: скалярное произведение: скалярное произведение", + + "divergence": "function= ; дивергенция: дивергенция: дивергенция; конец дивергенции", + "curl": "function= ; ротор; конец ротора", + "gradient": "function= ; градиент: градиент: градиент; конец градиента", + "laplacian": "function=лапласиан", # speech engines don't do a good job with "laplacian" + + "chemistry-concentration": "function= ; концентрация: концентрация: концентрация; конец концентрации", } # Names of functions that in terse mode don't say "of" (or it's equivalent in other languages) @@ -81,7 +81,7 @@ } - OperatorIntentRenaming: { - "dimension-product": "by" + "dimension-product": "на" } - KnownWords: { @@ -94,8 +94,8 @@ } - SIPrefixes: { - "Q": "quetta", "R": "ronna", "Y": "yotta", "Z": "zetta", "E": "exa", "P": "peta", "T": "tera", "G": "giga", "M": "mega", "k": "kilo", "h": "hecto", "da": "deka", - "d": "deci", "c": "centi", "m": "milli", "µ": "micro", "n": "nano", "p": "pico", "f": "femto", "a": "atto", "z": "zepto", "y": "yocto", "r": "ronto", "q": "quecto" +"Q": "кветта", "R": "ронна", "Y": "иотта", "Z": "зетта", "E": "экса", "P": "пета", "T": "тера", "G": "гига", "M": "мега", "k": "кило", "h": "гекто", "da": "дека", + "d": "деци", "c": "санти", "m": "милли", "µ": "микро", "n": "нано", "p": "пико", "f": "фемто", "a": "атто", "z": "зепто", "y": "иокто", "r": "ронто", "q": "квекто" } # this is a list of all units that accept SIPrefixes @@ -104,161 +104,161 @@ # The SI prefixes can be used with several of accepted units, but not, for example, with the non-SI units of time. - SIUnits: { # base units - "A": "amp", - "cd": "candela", - "K": "kelvin", "K": "kelvin", # U+212A - "g": "gram", - "m": "metre", # British spelling works for US also - "mol": "mole", - "s": "second", "sec": "second", # "sec" not actually legal + "A": "ампер", + "cd": "кандела", + "K": "кельвин", "K": "кельвин", # U+212A + "g": "грамм", + "m": "метр", + "mol": "моль", + "s": "секунда", "sec": "секунда", # "sec" не является официальным, но поддерживается # derived units - "Bq": "becquerel", - "C": "coulomb", - "°C": "degree celsius", "℃": "degree celsius", # should only take negative powers - "F": "farad", - "Gy": "gray", - "H": "henry", - "Hz": "hertz", - "J": "joule", - "kat": "kattel", - "lm": "lumen", - "lx": "lux", - "N": "newton", - "Ω": "ohm", "Ω": "ohm", # Greek Cap letter, U+2126 OHM SIGN - "Pa": "pascal", - "S": "siemens", - "Sv": "sievert", - "T": "tesla", - "V": "volt", - "W": "watt", - "Wb": "weber", + "Bq": "беккерель", + "C": "кулон", + "°C": "градус Цельсия", "℃": "градус Цельсия", # должны использоваться только с отрицательными степенями + "F": "фарад", + "Gy": "грей", + "H": "генри", + "Hz": "герц", + "J": "джоуль", + "kat": "катал", + "lm": "люмен", + "lx": "люкс", + "N": "ньютон", + "Ω": "ом", "Ω": "ом", # греческая заглавная буква Омега, U+2126 OHM SIGN + "Pa": "паскаль", + "S": "сименс", + "Sv": "зиверт", + "T": "тесла", + "V": "вольт", + "W": "ватт", + "Wb": "вебер", # accepted (plus a few variants) that take SI prefixes - "l": "litre", "L": "litre", "ℓ": "litre", # Should only take negative powers; British spelling works for US also - "t": "metric ton", # should only take positive powers - "Da": "dalton", - "Np": "neper", # should only take negative powers - "u": "atomic mass unit", # 'u' is correct: https://en.wikipedia.org/wiki/Dalton_(unit) - "eV": "electronvolt", - "rad": "radian", # should only take negative powers - "sr": "sterradion", # should only take negative powers + "l": "литр", "L": "литр", "ℓ": "литр", # должны использоваться только с отрицательными степенями + "t": "тонна", # должна использоваться только с положительными степенями + "Da": "дальтон", + "Np": "непер", # должен использоваться только с отрицательными степенями + "u": "атомная единица массы", # 'u' правильно: https://en.wikipedia.org/wiki/Dalton_(unit) + "eV": "электронвольт", + "rad": "радиан", # должен использоваться только с отрицательными степенями + "sr": "стерадиан", # должен использоваться только с отрицательными степенями # others that take a prefix - "a": "annum", # should only take positive powers - "as": "arcsecond", # see en.wikipedia.org/wiki/Minute_and_second_of_arc + "a": "год", # должен использоваться только с положительными степенями + "as": "угловая секунда", # см. ru.wikipedia.org/wiki/Minute_and_second_of_arc # technically wrong, but used in practice with SI Units - "b": "bit", # should only take positive powers - "B": "byte", # should only take positive powers - "Bd": "baud", # should only take positive powers + "b": "бит", # должен использоваться только с положительными степенями + "B": "байт", # должен использоваться только с положительными степенями + "Bd": "бод", # должен использоваться только с положительными степенями } - UnitsWithoutPrefixes: { # time - "″": "second", "\"": "second", - "′": "minute", "'": "minute","min": "minute", - "h": "hour", "hr": "hour", "Hr": "hour", - "d": "day", "dy": "day", - "w": "week", "wk": "week", - "y": "year", "yr": "year", + "″": "секунда", "\"": "секунда", + "′": "минута", "'": "минута","min": "минута", + "h": "час", "hr": "час", "Hr": "час", + "d": "день", "dy": "день", + "w": "неделя", "wk": "неделя", + "y": "год", "yr": "год", # angles - "°": "degree", "deg": "degree", # should only take negative powers - "arcmin": "arcminute", - "amin": "arcminute", - "am": "arcminute", - "MOA": "arcminute", - "arcsec": "arcsecond", - "asec": "arcsecond", + "°": "градус", "deg": "градус", # должны использоваться только с отрицательными степенями + "arcmin": "угловая минута", + "amin": "угловая минута", + "am": "угловая минута", + "MOA": "угловая минута", + "arcsec": "угловая секунда", + "asec": "угловая секунда", # distance - "au": "astronomical unit", "AU": "astronomical unit", - "ltyr": "light year", "ly": "light year", - "pc": "parsec", - "Å": "angstrom", "Å": "angstrom", # U+00C5 and U+212B - "fm": "fermi", + "au": "астрономическая единица", "AU": "астрономическая единица", + "ltyr": "световой год", "ly": "световой год", + "pc": "парсек", + "Å": "ангстрем", "Å": "ангстрем", # U+00C5 и U+212B + "fm": "ферми", # others - "ha": "hectare", - # "B": "bel", # "B" more commonly means bytes - "dB": "decibel", # already logarithmic, so not used with SI prefixes - - "amu": "atomic mass unit", - "atm": "atmosphere", - "bar": "bar", - "cal": "calorie", - "Ci": "curie", - "grad": "gradian", - "M": "molar", - "R": "roentgen", - "rpm": "revolution per minute", - "℧": "m-h-o", - "dyn": "dyne", - "erg": "erg", + "ha": "гектар", + # "B": "bel", # "B" чаще означает байты + "dB": "децибел", # уже логарифмическая, поэтому не используется с приставками СИ + + "amu": "атомная единица массы", + "atm": "атмосфера", + "bar": "бар", + "cal": "калория", + "Ci": "кюри", + "grad": "градиан", + "M": "молярный", + "R": "рентген", + "rpm": "оборот в минуту", + "℧": "сименс (устаревшее)", + "dyn": "дина", + "erg": "эрг", # powers of 2 used with bits and bytes - "Kib": "kibi-bit", "Mib": "mebi-bit", "Gib": "gibi-bit", "Tib": "tebi-bit", "Pib": "pebi-bit", "Eib": "exbi-bit", "Zib": "zebi-bit", "Yib": "yobi-bit", - "KiB": "kibi-byte", "MiB": "mebi-byte", "GiB": "gibi-byte", "TiB": "tebi-byte", "PiB": "pebi-byte", "EiB": "exbi-byte", "ZiB": "zebi-byte", "YiB": "yobi-byte", + "Kib": "кибибит", "Mib": "мебибит", "Gib": "гибибит", "Tib": "тебибит", "Pib": "пебибит", "Eib": "эксбибит", "Zib": "зебибит", "Yib": "йобибит", + "KiB": "кибибайт", "MiB": "мебибайт", "GiB": "гибибайт", "TiB": "тебибайт", "PiB": "пебибайт", "EiB": "эксбибайт", "ZiB": "зебибайт", "YiB": "йобибайт", } # this will only be used if the language is English, so it can be empty for other countries - EnglishUnits: { # length - "in": "inch", - "ft": "foot", - "mi": "mile", - "rd": "rod", - "li": "link", - "ch": "chain", + "in": "дюйм", + "ft": "фут", + "mi": "миля", + "rd": "род", + "li": "линк", + "ch": "чейн", # area - "sq in": "square inch", "sq. in": "square inch", "sq. in.": "square inch", - "sq ft": "square foot", "sq. ft": "square foot", "sq. ft.": "square foot", - "sq yd": "square yard", "sq. yd": "square yard", "sq. yd.": "square yard", - "sq mi": "square mile", "sq. mi": "square mile", "sq. mi.": "square mile", - "ac": "acre", - "FBM": "board foot", + "sq in": "квадратный дюйм", "sq. in": "квадратный дюйм", "sq. in.": "квадратный дюйм", + "sq ft": "квадратный фут", "sq. ft": "квадратный фут", "sq. ft.": "квадратный фут", + "sq yd": "квадратный ярд", "sq. yd": "квадратный ярд", "sq. yd.": "квадратный ярд", + "sq mi": "квадратная миля", "sq. mi": "квадратная миля", "sq. mi.": "квадратная миля", + "ac": "акр", + "FBM": "доско-фут", # volume - "cu in": "cubic inch", "cu. in": "cubic inch", "cu. in.": "cubic inch", - "cu ft": "cubic foot", "cu. ft": "cubic foot", "cu. ft.": "cubic foot", - "cu yd": "cubic yard", "cu. yd": "cubic yard", "cu. yd.": "cubic yard", - "bbl": "barrel", "BBL": "barrel", - "pk": "peck", - "bu": "bushel", - "tsp": "teaspoon", - "tbl": "tablespoon", + "cu in": "кубический дюйм", "cu. in": "кубический дюйм", "cu. in.": "кубический дюйм", + "cu ft": "кубический фут", "cu. ft": "кубический фут", "cu. ft.": "кубический фут", + "cu yd": "кубический ярд", "cu. yd": "кубический ярд", "cu. yd.": "кубический ярд", + "bbl": "баррель", "BBL": "баррель", + "pk": "пек", + "bu": "бушель", + "tsp": "чайная ложка", + "tbl": "столовая ложка", # liquid - "fl dr": "fluid drams", - "fl oz": "fluid ounce", - "gi": "gill", - "cp": "cup", "cup": "cup", - "pt": "pint", - "qt": "quart", - "gal": "gallon", + "fl dr": "жидкая драхма", + "fl oz": "жидкая унция", + "gi": "джилл", + "cp": "чашка", "cup": "чашка", + "pt": "пинта", + "qt": "кварта", + "gal": "галлон", # weight - "gr": "grain", - "dr": "dram", - "oz": "ounce", "℥": "ounce", - "lb": "pound", - "cwt": "hundredweight", - "dwt": "pennyweight", - "oz t": "troy ounce", - "lb t": "troy pound", + "gr": "гран", + "dr": "драхма", + "oz": "унция", "℥": "унция", + "lb": "фунт", + "cwt": "центнер (английский)", + "dwt": "пеннивейт", + "oz t": "тройская унция", + "lb t": "тройский фунт", # energy - "hp": "horsepower", - "BTU": "BTU", - "°F": "degree fahrenheit", "℉": "degree fahrenheit", + "hp": "лошадиная сила", + "BTU": "БТЕ", + "°F": "градус Фаренгейта", "℉": "градус Фаренгейта", # other - "mph": "mile per hour", - "mpg": "mile per gallon", - } + "mph": "миля в час", + "mpg": "миля на галлон", + } - PluralForms: { # FIX: this needs to be flushed out @@ -307,25 +307,25 @@ ] - NumbersOrdinalOnes: [ -«ноль», «первый», «второй», «третий», «четвертый», «пятый», «шестой», «седьмой», «восьмой», «девятый», +«нулевой», «первый», «второй», «третий», «четвёртый», «пятый», «шестой», «седьмой», «восьмой», «девятый», «десятый», «одиннадцатый», «двенадцатый», «тринадцатый», «четырнадцатый», «пятнадцатый», «шестнадцатый», «семнадцатый», «восемнадцатый», «девятнадцатый» ] - NumbersOrdinalPluralOnes: [ -«ноль», «первый», «секунды», «терции», «четвертые», «пятые», «шестые», «седьмые», «восьмые», «девятые», +«нулевые», «первые», «вторые», «третьи», «четвёртые», «пятые», «шестые», «седьмые», «восьмые», «девятые», «десятые», «одиннадцатые», «двенадцатые», «тринадцатые», «четырнадцатые», «пятнадцатые», «шестнадцатые», «семнадцатые», «восемнадцатые», «девятнадцатые» ] # stop when regularity begins - NumbersOrdinalFractionalOnes: [ -«ноль», «первый», «половина» +«нулевая», «первая», «вторая» ] # stop when regularity begins - NumbersOrdinalFractionalPluralOnes: [ -«нули», «первые», «половинки» +«нулевых», «первых», «вторых» ] @@ -354,8 +354,8 @@ ] - NumbersOrdinalPluralHundreds: [ -"", "сотые", "две сотых", "три сотых", "четыре сотых", "пять сотых", -« шесть сотых», «семь сотых», «восемь сотых», «девять сотых» +"", "сотые", "двухсотые", "трёхсотые", "четырёхсотые", "пятисотые", +« шестисотые», «семисотые», «восьмисотые», «девятисотые» ] @@ -367,10 +367,10 @@ - NumbersOrdinalLarge: [ "", "тысячная", "миллионная", "миллиардная", "триллионная", "квадриллионная", -«квинтиллионный», «секстиллионный», «септиллионный», «октиллионный», «нониллионный» +«квинтиллионная», «секстиллионная», «септиллионная», «октиллионная», «нониллионная» ] - NumbersOrdinalPluralLarge: [ "", "тысячные", "миллионные", "миллиардные", "триллионные", "квадриллионные", -«квинтиллионы», «секстиллионы», «септиллионы», «октиллионы», «нониллионы» +«квинтиллионные», «секстиллионные», «септиллионные», «октиллионные», «нониллионные» ] diff --git a/Rules/Languages/ru/navigate.yaml b/Rules/Languages/ru/navigate.yaml index 449e1291..cf9359db 100644 --- a/Rules/Languages/ru/navigate.yaml +++ b/Rules/Languages/ru/navigate.yaml @@ -48,44 +48,44 @@ - if: "$MatchCounter = 0 and $SayCommand = 'true'" then_test: - if: "self::m:math and starts-with($NavCommand, 'ZoomOut')" - then: [t: "увеличение все еще", pause: "medium"] + then: [t: "увеличение всё ещё", pause: "medium"] - else_if: "IsNode(., 'leaf') and starts-with($NavCommand, 'ZoomIn')" - then: [t: "увеличение на все пути", pause: "medium"] + then: [t: "увеличение полностью", pause: "medium"] else: - test: - if: "starts-with($NavCommand, 'Zoom')" - then: [set_variables: [Prefix: "'zoom'"]] # phrase('zoom' in to see more details) + then: [set_variables: [Prefix: "'увеличение'"]] # phrase('zoom' in to see more details) - else_if: "starts-with($NavCommand, 'Move')" - then: [set_variables: [Prefix: "'move'"]] # phrase('move' to next entry in table) + then: [set_variables: [Prefix: "'перемещение'"]] # phrase('move' to next entry in table) - else_if: "starts-with($NavCommand, 'Read')" - then: [set_variables: [Prefix: "'read'"]] # phrase('read' to next entry in table) + then: [set_variables: [Prefix: "'чтение'"]] # phrase('read' to next entry in table) - else_if: "starts-with($NavCommand, 'Describe')" - then: [set_variables: [Prefix: "'describe'"]] # phrase('describe' to next entry in table) + then: [set_variables: [Prefix: "'описание'"]] # phrase('describe' to next entry in table) - test: if: "$Prefix != ''" then: - x: "$Prefix" - test: - if: "substring($NavCommand, string-length($Prefix)+1) = 'In'" - then: [t: "in"] # phrase(zoom 'in' to see more details) + then: [t: "внутрь"] # phrase(zoom 'in' to see more details) - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'InAll'" # HACK: '\uF8FE' is used internally for the concatenation char by 'ct' -- this gets "ed" concatenated to "zoom" - then: [t: "все путь"] # phrase(zoom 'out all the way' to see more details) + then: [t: "полностью"] # phrase(zoom 'out all the way' to see more details) - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Out'" - then: [t: "out"] # phrase(zoom 'out' to see more details) + then: [t: "наружу"] # phrase(zoom 'out' to see more details) - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'OutAll'" # HACK: '\uF8FE' is used internally for the concatenation char by 'ct' -- this gets "ed" concatenated to "zoom" - then: [t: "все путь"] # phrase(zoom 'out all the way' to see more details) + then: [t: "полностью"] # phrase(zoom 'out all the way' to see more details) - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Next'" - then: [t: "право"] # phrase(move to the 'right') + then: [t: "вправо"] # phrase(move to the 'right') - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Previous'" - then: [t: "левый"] # phrase(move to the 'left') + then: [t: "влево"] # phrase(move to the 'left') - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Current'" - then: [t: "нынешним"] # phrase(who is the 'current' president) + then: [t: "текущий"] # phrase(who is the 'current' president) - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'LineStart'" - then: [t: "на начало линии"] # phrase(move 'to start of line') + then: [t: "в начало строки"] # phrase(move 'to start of line') - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'LineEnd'" - then: [t: "к концу линии"] # phrase(move 'to end of line') + then: [t: "в конец строки"] # phrase(move 'to end of line') - pause: "medium" - set_variables: [MatchCounter: "1"] @@ -118,7 +118,7 @@ - test: if: "count($Child2D/preceding-sibling::*)=0" then: [t: "корень"] # phrase(the cube 'root' of x) - else: [t: "корневой индекс"] # phrase(the 'root index' of x is 3) + else: [t: "индекс корня"] # phrase(the 'root index' of x is 3) - pause: "medium" - name: into-or-out-of-msub @@ -128,8 +128,8 @@ - x: "$Move2D" - test: if: "count($Child2D/preceding-sibling::*)=0" - then: [t: "база"] # phrase(the 'base' of the power) - else: [t: "sepcript"] # phrase(x with 'subscript' 2) + then: [t: "основание"] # phrase(the 'base' of the power) + else: [t: "нижний индекс"] # phrase(x with 'subscript' 2) - pause: "medium" - name: into-or-out-of-msup @@ -139,8 +139,8 @@ - x: "$Move2D" - test: if: "not($Child2D/preceding-sibling::*)" - then: [t: "база"] # phrase(the 'base' of the power) - else: [t: "superscript"] # phrase(x with 'superscript' 2) # FIX: it would be better to use the word used when reading (power, exponent, ...) + then: [t: "основание"] # phrase(the 'base' of the power) + else: [t: "верхний индекс"] # phrase(x with 'superscript' 2) # FIX: it would be better to use the word used when reading (power, exponent, ...) - pause: "medium" - name: into-or-out-of-msubsup @@ -150,10 +150,10 @@ - x: "$Move2D" - test: - if: "not($Child2D/preceding-sibling::*)" - then: [t: "база"] # phrase(the 'base' of the power) + then: [t: "основание"] # phrase(the 'base' of the power) - else_if: "count($Child2D/preceding-sibling::*)=1" - then: [t: "sepcript"] # phrase(x with 'subscript' 2) - else: [t: "superscript"] # phrase(x with 'superscript' 2) # FIX: it would be better to use the word used when reading (power, exponent, ...) + then: [t: "нижний индекс"] # phrase(x with 'subscript' 2) + else: [t: "верхний индекс"] # phrase(x with 'superscript' 2) # FIX: it would be better to use the word used when reading (power, exponent, ...) - pause: "medium" - name: into-or-out-of-munder @@ -163,7 +163,7 @@ - x: "$Move2D" - test: if: "count($Child2D/preceding-sibling::*)=0" - then: [t: "база"] # phrase(the 'base' of the power) + then: [t: "основание"] # phrase(the 'base' of the power) else: [t: "нижний предел"] # phrase(the 'lower limit' of the function is zero) - pause: "medium" @@ -174,7 +174,7 @@ - x: "$Move2D" - test: if: "count($Child2D/preceding-sibling::*)=0" - then: [t: "база"] # phrase(the 'base' of the power) + then: [t: "основание"] # phrase(the 'base' of the power) else: [t: "верхний предел"] # phrase(the 'upper limit' of the function is zero) - pause: "medium" @@ -185,7 +185,7 @@ - x: "$Move2D" - test: - if: "count($Child2D/preceding-sibling::*)=0" - then: [t: "база"] # phrase(the 'base' of the power) + then: [t: "основание"] # phrase(the 'base' of the power) - else_if: "count($Child2D/preceding-sibling::*)=1" then: [t: "нижний предел"] # phrase(the 'lower limit' of the function is zero) else: [t: "верхний предел"] # phrase(the 'upper limit' of the function is zero) @@ -205,18 +205,18 @@ - x: "$Move2D" - test: - if: "$NumPrecedingSiblings=0" - then: [t: "база"] # phrase(the 'base' of the power) + then: [t: "основание"] # phrase(the 'base' of the power) - else_if: "$Child2D/preceding-sibling::*[self::m:mprescripts]" # are we before mprescripts and hence are postscripts then: - test: # in postscripts -- base shifts by one if: "$NumPrecedingSiblings mod 2 = 0" - then: [t: "sepcript"] # phrase(x with 'subscript' 2) - else: [t: "superscript"] # phrase(x with 'superscript' 2) + then: [t: "нижний индекс"] # phrase(x with 'subscript' 2) + else: [t: "верхний индекс"] # phrase(x with 'superscript' 2) else: - test: if: "$NumPrecedingSiblings mod 2 = 0" - then: [t: "pre-superscript"] # phrase(x with 'pre-superscript' 2) - else: [t: "pre-subscript"] # phrase(x with 'pre-subscript' 2) + then: [t: "верхний левый индекс"] # phrase(x with 'pre-superscript' 2) + else: [t: "нижний левый индекс"] # phrase(x with 'pre-subscript' 2) - pause: "medium" - name: into-or-out-of-mtd @@ -254,17 +254,17 @@ then: - test: - if: "$PreviousNavCommand = 'ZoomIn'" - then: [t: "отменить zoom in"] # phrase('undo zoom in') + then: [t: "отмена увеличения"] # phrase('undo zoom in') - else_if: "$PreviousNavCommand = 'ZoomOut'" - then: [t: "отменить увеличение"] # phrase('undo zoom out') + then: [t: "отмена уменьшения"] # phrase('undo zoom out') - else_if: "$PreviousNavCommand = 'ZoomInAll'" - then: [t: "отменить масштабирование на все пути"] # phrase('undo zooming in all the way') + then: [t: "отмена полного увеличения"] # phrase('undo zooming in all the way') - else_if: "$PreviousNavCommand = 'ZoomOutAll'" - then: [t: "отменить увеличиваясь на весь путь"] # phrase('undo zooming out all the way') + then: [t: "отмена полного уменьшения"] # phrase('undo zooming out all the way') - else_if: "$PreviousNavCommand = 'MovePrevious' or $PreviousNavCommand = 'MovePreviousZoom'" - then: [t: "отменить движение влево"] # phrase('undo move left') + then: [t: "отмена перемещения влево"] # phrase('undo move left') - else_if: "$PreviousNavCommand = 'MoveNext' or $PreviousNavCommand = 'MoveNextZoom'" - then: [t: "отменить направо"] # phrase('undo move right') + then: [t: "отмена перемещения вправо"] # phrase('undo move right') - else_if: "$PreviousNavCommand = 'None'" then: [t: "нет предыдущей команды"] # phrase('no previous command') - pause: "medium" @@ -289,7 +289,7 @@ replace: - test: if: "$MatchCounter = 0 and $NavVerbosity != 'Terse'" - then: [t: "расширение на весь путь", pause: "long"] # phrase('zoomed in all of the way') + then: [t: "увеличение полностью", pause: "long"] # phrase('zoomed in all of the way') - test: if: "$ReadZoomLevel!=-1" then: @@ -521,7 +521,7 @@ variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] replace: [x: "."] # we need to speak it here - - t: "ряд" # phrase(the first 'row' of the matrix) + - t: "строка" # phrase(the first 'row' of the matrix) # if we let the speech rules speak the row, it is given just the MathML for the row, so the row # will always be '1' - x: "count(../preceding-sibling::*)+1" - pause: medium @@ -564,12 +564,12 @@ then: - test: - if: "$NavCommand = 'MoveStart'" - then: [t: "перейти на начало математики"] # phrase('move to start of math') + then: [t: "перемещение в начало выражения"] # phrase('move to start of math') - else_if: "$NavCommand = 'MoveLineStart'" - then: [t: "перейти на начало линии"] # phrase('move to start of line') + then: [t: "перемещение в начало строки"] # phrase('move to start of line') - else_if: "$NavCommand = 'MoveEnd'" - then: [t: "перейти к концу математики"] # phrase('move to end of math') - else: [t: "перейти к концу линии"] # "$NavCommand = 'MoveLineEnd'" # phrase('move to end of line') + then: [t: "перемещение в конец выражения"] # phrase('move to end of math') + else: [t: "перемещение в конец строки"] # "$NavCommand = 'MoveLineEnd'" # phrase('move to end of line') - pause: "medium" - test: if: "$NavCommand = 'MoveStart' or $NavCommand = 'MoveLineStart'" @@ -608,8 +608,8 @@ then: - test: if: "$NavCommand = 'MoveLineStart'" - then: [t: "перейти на начало линии"] # phrase('move to start of line') - else: [t: "перейти к концу линии"] # "$NavCommand = 'MoveLineEnd'" # phrase('move to end of line') + then: [t: "перемещение в начало строки"] # phrase('move to start of line') + else: [t: "перемещение в конец строки"] # "$NavCommand = 'MoveLineEnd'" # phrase('move to end of line') - pause: "medium" - test: if: "self::m:mrow or @data-from-mathml = 'mrow'" @@ -659,7 +659,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "двигайся влево" # phrase('move left') + - t: "перемещение влево" # phrase('move left') - pause: short - test: if: "$NavVerbosity != 'Terse'" @@ -689,7 +689,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "двигайся вправо" # phrase('move right') + - t: "перемещение вправо" # phrase('move right') - pause: short - test: if: "$NavVerbosity != 'Terse'" @@ -722,7 +722,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "перейти на вверх" # phrase('move up' to previous row in the table) + - t: "перемещение вверх" # phrase('move up' to previous row in the table) - pause: short - test: if: "$NavVerbosity != 'Terse'" @@ -758,7 +758,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "двигаться вниз" # phrase('move down to the next row in the table) + - t: "перемещение вниз" # phrase('move down to the next row in the table) - pause: short - test: if: "$NavVerbosity != 'Terse'" @@ -850,7 +850,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "перейти на вверх" # phrase('move up' to the previous row in the table) + - t: "перемещение вверх" # phrase('move up' to the previous row in the table) - pause: medium - t: "нет следующей строки" # phrase('no next row' in the table) - set_variables: [SpeakExpression: "'false'"] @@ -868,7 +868,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "прочитайте текущую запись" # phrase('read current entry' in the table) + - t: "прочитать текущую запись" # phrase('read current entry' in the table) - pause: medium - test: if: "$NavVerbosity != 'Terse'" @@ -1197,7 +1197,7 @@ - test: if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - t: "не могу двигаться правильно" # phrase('cannot move right') + - t: "невозможно перемещение вправо" # phrase('cannot move right') - pause: medium - with: variables: [Move2D: "'end of'", Child2D: "$EdgeNode/*[last()]"] @@ -1215,16 +1215,16 @@ - test: if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - t: "не могу" # phrase('cannot' move right in expression) + - t: "невозможно" # phrase('cannot' move right in expression) - test: - if: "$NavCommand = 'MoveNext'" then: [t: "перейти"] # phrase('move' to next entry in table) - else_if: "$NavCommand = 'ReadNext'" - then: [t: "читать"] # phrase('read' next entry in table) - else: [t: "опишите"] # phrase('describe' next entry in table) - - t: "правильно" # phrase(move 'right') + then: [t: "чтение"] # phrase('read' next entry in table) + else: [t: "описание"] # phrase('describe' next entry in table) + - t: "вправо" # phrase(move 'right') - pause: short - - t: "конец математики" # phrase(move 'end of math') + - t: "конец выражения" # phrase(move 'end of math') - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1394,7 +1394,7 @@ - test: if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose' and $NavCommand = 'MovePrevious'" then: - - t: "не могу двигаться влево" # phrase('cannot move left' in expression) + - t: "невозможно перемещение влево" # phrase('cannot move left' in expression) - pause: medium - with: variables: [Move2D: "'end of'", Child2D: "$EdgeNode/*[1]"] @@ -1408,7 +1408,7 @@ - "($NavCommand = 'MovePrevious' or $NavCommand = 'ReadPrevious' or $NavCommand = 'DescribePrevious') and" - "(self::m:math or name(EdgeNode(., 'left', 'math'))='math')" replace: - - t: "начало математики" # phrase('start of math') + - t: "начало выражения" # phrase('start of math') - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1421,7 +1421,7 @@ - test: if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - t: "не могу двигаться влево" # phrase('cannot move left') + - t: "невозможно перемещение влево" # phrase('cannot move left') - pause: short - with: variables: [Move2D: "'start of'", Child2D: "."] @@ -1582,7 +1582,7 @@ - test: - if: "$NavMode = 'Enhanced'" then: - - t: "персонаж" # phrase(a mathematical 'character') + - t: "символ" # phrase(a mathematical 'character') - set_variables: [NavMode: "'Character'", ReadZoomLevel: "1"] - else_if: "$NavMode = 'Character'" then: @@ -1614,7 +1614,7 @@ - t: "улучшенный" # phrase(an 'enhanced' way to do something) - set_variables: [NavMode: "'Enhanced'", ReadZoomLevel: "-1"] - else: - - t: "персонаж" # phrase(a mathematical 'character') + - t: "символ" # phrase(a mathematical 'character') - set_variables: [NavMode: "'Character'", ReadZoomLevel: "1"] - t: "режим" # phrase(a simple 'mode' of use) - pause: long @@ -1632,11 +1632,11 @@ - test: if: "$Overview = 'true'" then: - - t: "говорите выражение после движения" # phrase('speak expression after move') + - t: "проговорить выражение после перемещения" # phrase('speak expression after move') - pause: long - set_variables: [Overview: "'false'"] else: - - t: "обзор выражения после движения" # phrase('overview of expression after move') + - t: "обзор выражения после перемещения" # phrase('overview of expression after move') - pause: long - set_variables: [Overview: "'true'"] @@ -1650,7 +1650,7 @@ - test: - if: "$NavCommand = 'ReadCurrent'" then: [t: "читать"] # phrase('read' next entry in table) - else: [t: "опишите"] # phrase('describe' next entry in table) + else: [t: "описать"] # phrase('describe' next entry in table) - t: "текущая" # phrase('current' entry in table) - pause: long - set_variables: [NavNode: "@id"] @@ -1671,10 +1671,10 @@ - if: "starts-with($NavCommand, 'Read')" then: [t: "читать"] # phrase('read' next entry in table) - else_if: "starts-with($NavCommand, 'Describe')" - then: [t: "опишите"] # phrase('describe' next entry in table) + then: [t: "описать"] # phrase('describe' next entry in table) - else_if: "starts-with($NavCommand, 'MoveTo')" then: [t: "перейти к"] # phrase('move to' the next entry in table) - else: [t: "установите"] # phrase('set' the value of the next entry in table) + else: [t: "установить"] # phrase('set' the value of the next entry in table) - t: "заполнитель" # phrase('placeholder' for the value) - x: "$PlaceMarkerIndex" - pause: long @@ -1687,7 +1687,7 @@ - test: if: "$NavVerbosity != 'Terse'" then: - - t: "установите заполнителя" # phrase('set placeholder' to the value) + - t: "установить заполнитель" # phrase('set placeholder' to the value) - x: "$PlaceMarkerIndex" - pause: long - set_variables: [NavNode: "@id"] @@ -1719,7 +1719,7 @@ - test: if: "$NavCommand = 'WhereAmI'" then: - - t: "внутри ничего больше" # phrase('inside of nothing more') + - t: "больше внутри ничего нет" # phrase('inside of nothing more') - pause: long - set_variables: [SpeakExpression: "'false'"] else: diff --git a/Rules/Languages/ru/overview.yaml b/Rules/Languages/ru/overview.yaml index e91653ac..be4cdab5 100644 --- a/Rules/Languages/ru/overview.yaml +++ b/Rules/Languages/ru/overview.yaml @@ -21,10 +21,10 @@ if: "IsNode(*[1], 'simple') and IsNode(*[2], 'simple')" then: - x: "*[1]" - - t: "над" + - t: "на" # (en: 'over') - x: "*[2]" else: - - t: "фракция" + - t: "дробь" # (en: 'fraction') - name: overview-default tag: [msqrt, "square-root"] @@ -49,7 +49,7 @@ - if: "*[2][.='2']" then: [t: "квадратный корень"] - else_if: "*[2][.='3']" - then: [t: "куб корень"] + then: [t: "кубический корень"] # (en: 'cube root') - else_if: "*[2][not(contains(., '.'))]" then: [x: "ToOrdinal(*[2])", t: "корень"] else: @@ -57,7 +57,7 @@ if: "*[2][self::m:mi][string-length(.)=1]" then: - x: "*[2]" - - pronounce: [{text: "-th"}, {ipa: "θ"}, {sapi5: "th"}, {eloquence: "T"}] + - pronounce: [{text: "-й"}, {ipa: "j"}, {sapi5: "th"}, {eloquence: "T"}] else: {x: "*[2]"} - t: "корень" - test: @@ -74,24 +74,24 @@ - "*[2][self::m:mtable] and" - "(IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|'))" replace: - - t: "а" + - t: "на" # (en: 'a') - x: count(*[2]/*) - - t: "к" + - t: "на" # (en: 'by') - x: count(*[2]/*[self::m:mtr][1]/*) - test: if: "*[1][.='|']" # just need to check the first bracket since we know it must be (, [, or | - then: [t: "определяющий"] - else: [t: "матрица"] + then: [t: "определитель"] # (en: 'determinant') + else: [t: "матрица"] # (en: 'matrix') - name: overview-default tag: mtable match: "." replace: - - t: "а" - - x: count(*[2]/*) - - t: "к" - - x: count(*[2]/*[self::m:mtr][1]/*) - - t: "стол" + - t: "на" # (en: 'a') + - x: count(*) + - t: "на" # (en: 'by') + - x: count(*[self::m:mtr][1]/*) + - t: "таблица" # (en: 'table') - name: short-mrow tag: mrow @@ -115,6 +115,6 @@ - pause: auto - x: "*[5]" - pause: auto - - t: "и так далее" + - t: "и так далее" # (en: 'and so on') - include: "SimpleSpeak_Rules.yaml" diff --git a/Rules/Languages/ru/unicode-full.yaml b/Rules/Languages/ru/unicode-full.yaml index 4224bf75..cd76b611 100644 --- a/Rules/Languages/ru/unicode-full.yaml +++ b/Rules/Languages/ru/unicode-full.yaml @@ -2,621 +2,74 @@ - "¢": [t: "центы"] # 0xa2 (en: 'cents', google translation) - - "£": [t: "фунт"] # 0xa3 (en: 'pounds', google translation) - - "¤": [t: "валютный знак"] # 0xa4 (en: 'currency sign', google translation) - - "¥": [t: "иена"] # 0xa5 (en: 'yen', google translation) - - "¦": [t: "сломанный бар"] # 0xa6 (en: 'broken bar', google translation) - - "§": [t: "раздел"] # 0xa7 (en: 'section', google translation) - - "¨": [t: "двойная точка"] # 0xa8 (en: 'double dot', google translation) + - "£": [t: "фунты"] # 0xa3 (en: 'pounds', google translation) + - "¤": [t: "знак валюты"] # 0xa4 (en: 'currency sign', google translation) + - "¥": [t: "иены"] # 0xa5 (en: 'yen', google translation) + - "¦": [t: "вертикальная пунктирная черта"] # 0xa6 (en: 'broken bar', google translation) + - "§": [t: "параграф"] # 0xa7 (en: 'section', google translation) + - "¨": [t: "две точки"] # 0xa8 (en: 'double dot', google translation) - "©": [t: "авторское право"] # 0xa9 (en: 'copyright', google translation) - - "ª": [t: "женский орден -индикатор"] # 0xaa (en: 'feminine ordinal indicator', google translation) - - "¬": [t: "нет"] # 0xac (en: 'not', google translation) - - "«": [t: "оценка с двойным углом."] # 0xab (en: 'left-pointing double angle quote mark', google translation) + - "ª": [t: "женский порядковый индикатор"] # 0xaa (en: 'feminine ordinal indicator', google translation) + - "¬": [t: "отрицание"] # 0xac (en: 'not', google translation) + - "«": [t: "левая двойная угловая кавычка"] # 0xab (en: 'left-pointing double angle quote mark', google translation) - "¯": # 0xaf - test: if: "ancestor::m:modified-variable and preceding-sibling::*[1][self::m:mi]" - then: [t: "бар"] # (en: 'bar', google translation) + then: [t: "черта"] # (en: 'bar', google translation) else: [t: "линия"] # (en: 'line', google translation) - - "²": [t: "два"] # 0xb2 (en: 'two', google translation) - - "³": [t: "три"] # 0xb3 (en: 'three', google translation) - - "´": [t: "острый"] # 0xb4 (en: 'acute', google translation) + - "²": [t: "в квадрате"] # 0xb2 (en: 'two', google translation) + - "³": [t: "в кубе"] # 0xb3 (en: 'three', google translation) + - "´": [t: "акут"] # 0xb4 (en: 'acute', google translation) - "µ": [t: "микро"] # 0xb5 (en: 'micro', google translation) - - "¹": [t: "один"] # 0xb9 (en: 'one', google translation) - - "º": [t: "мужской орден -индикатор"] # 0xb9 (en: 'masculine ordinal indicator', google translation) + - "¹": [t: "в первой степени"] # 0xb9 (en: 'one', google translation) + - "º": [t: "мужской порядковый индикатор"] # 0xb9 (en: 'masculine ordinal indicator', google translation) - "·": - test: if: "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_MultSymbolDot = 'Auto'" - then: [t: "раз"] # (en: 'times', google translation) - else: [t: "умножить"] # (en: 'dot') + then: [t: "умножить"] # (en: 'times', google translation) + else: [t: "точка"] # (en: 'dot') - "×": # 0xd7 - test: if: "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_MultSymbolX = 'Auto'" - then: [t: "раз"] # (en: 'times', google translation) + then: [t: "умножить"] # (en: 'times', google translation) else_test: if: $ClearSpeak_MultSymbolX = 'By' - then: [t: "к"] # (en: 'by', google translation) - else: [t: "умножить"] # (en: 'cross') + then: [t: "на"] # (en: 'by', google translation) + else: [t: "крестик"] # (en: 'cross') - "÷": [t: "разделить на"] # 0xf7 (en: 'divided by') - "¡": [t: "перевернутый восклицательный знак"] # 0xa1 (en: 'inverted exclamation mark', google translation) - - "¶": [t: "абзац"] # 0xb6 (en: 'paragraph mark', google translation) - - "¿": [t: "перевернутый вопрос"] # 0xbf (en: 'inverted question mark', google translation) - - - "ʰ": [t: "модификатор маленький h"] # 0x2b0 (en: 'modifier small h', google translation) - - "ʱ": [t: "модификатор маленький h с крючком"] # 0x2b1 (en: 'modifier small h with hook', google translation) - - "ʲ": [t: "модификатор small j"] # 0x2b2 (en: 'modifier small j', google translation) - - "ʳ": [t: "модификатор маленький r"] # 0x2b3 (en: 'modifier small r', google translation) - - "ʴ": [t: "модификатор маленький повернут r"] # 0x2b4 (en: 'modifier small turned r', google translation) - - "ʵ": [t: "модификатор small turn r r с крючком"] # 0x2b5 (en: 'modifier small turned r with hook', google translation) + - "¶": [t: "знак абзаца"] # 0xb6 (en: 'paragraph mark', google translation) + - "¿": [t: "перевёрнутый вопросительный знак"] # 0xbf (en: 'inverted question mark', google translation) + + - "ʰ": [t: "верхний индекс h"] # 0x2b0 (en: 'modifier small h', google translation) + - "ʱ": [t: "верхний индекс h с крючком"] # 0x2b1 (en: 'modifier small h with hook', google translation) + - "ʲ": [t: "верхний индекс j"] # 0x2b2 (en: 'modifier small j', google translation) + - "ʳ": [t: "верхний индекс r"] # 0x2b3 (en: 'modifier small r', google translation) + - "ʴ": [t: "верхний индекс перевёрнутого r"] # 0x2b4 (en: 'modifier small turned r', google translation) + - "ʵ": [t: "верхний индекс перевёрнутого r с крючком"] # 0x2b5 (en: 'modifier small turned r with hook', google translation) - "ʶ": # 0x2b6 - - t: "модификатор маленький перевернутый" # (en: 'modifier small inverted', google translation) + - t: "верхний индекс перевёрнутой" # (en: 'modifier small inverted', google translation) - spell: "translate('R', 'R', 'R')" - - "ʷ": [t: "модификатор маленький w"] # 0x2b7 (en: 'modifier small w', google translation) - - "ʸ": [t: "модификатор маленький y"] # 0x2b8 (en: 'modifier small y', google translation) - - "ʹ": [t: "модификатор prime"] # 0x2b9 (en: 'modifier prime', google translation) - - "ʺ": [t: "модификатор double prime"] # 0x2ba (en: 'modifier double prime', google translation) - - "ʻ": [t: "модификатор стал запятой"] # 0x2bb (en: 'modifier turned comma', google translation) - - "ʼ": [t: "модификатор апостроф"] # 0x2bc (en: 'modifier apostrophe', google translation) - - "ʽ": [t: "модификатор обратный запятой"] # 0x2bd (en: 'modifier reversed comma', google translation) - - "ʾ": [t: "модификатор справа наполовину кольцо"] # 0x2be (en: 'modifier right half ring', google translation) - - "ʿ": [t: "модификатор оставил половину кольца"] # 0x2bf (en: 'modifier left half ring', google translation) - - "ˀ": [t: "модификатор глоттальная остановка"] # 0x2c0 (en: 'modifier glottal stop', google translation) - - "ˁ": [t: "модификатор поменял глоттальную остановку"] # 0x2c1 (en: 'modifier reversed glottal stop', google translation) - - "˂": [t: "модификатор левой стрелки"] # 0x2c2 (en: 'modifier left arrowhead', google translation) - - "˃": [t: "модификатор правой стрелки"] # 0x2c3 (en: 'modifier right arrowhead', google translation) - - "˄": [t: "модификатор вверх стрел"] # 0x2c4 (en: 'modifier up arrowhead', google translation) - - "˅": [t: "модификатор вниз стрел"] # 0x2c5 (en: 'modifier down arrowhead', google translation) - - "ˆ": [t: "модификатор объединенный акцент"] # 0x2c6 (en: 'modifier circumflex accent', google translation) - - "ˇ": [t: "проверять"] # 0x2c7 (en: 'check', google translation) - - "ˈ": [t: "модификатор вертикальной линии"] # 0x2c8 (en: 'modifier vertical line', google translation) - - "ˉ": [t: "модификатор макрон"] # 0x2c9 (en: 'modifier macron', google translation) - - "ˊ": [t: "модификатор острый акцент"] # 0x2ca (en: 'modifier acute accent', google translation) - - "ˋ": [t: "модификатор могильный акцент"] # 0x2cb (en: 'modifier grave accent', google translation) - - "ˌ": [t: "модификатор низкой вертикальной линии"] # 0x2cc (en: 'modifier low vertical line', google translation) - - "ˍ": [t: "модификатор низкий макрон"] # 0x2cd (en: 'modifier low macron', google translation) - - "ˎ": [t: "модификатор низкий могильный акцент"] # 0x2ce (en: 'modifier low grave accent', google translation) - - "ˏ": [t: "модификатор низкий острый акцент"] # 0x2cf (en: 'modifier low acute accent', google translation) - - "ː": [t: "модификатор треугольная толстая кишка"] # 0x2d0 (en: 'modifier triangular colon', google translation) - - "ˑ": [t: "модификатор половина треугольной толстой кишки"] # 0x2d1 (en: 'modifier half triangular colon', google translation) - - "˒": [t: "модификатор центрирован правой половиной кольца"] # 0x2d2 (en: 'modifier centered right half ring', google translation) - - "˓": [t: "модификатор центральный левый половинный кольцо"] # 0x2d3 (en: 'modifier centered left half ring', google translation) - - "˔": [t: "модификатор вверх"] # 0x2d4 (en: 'modifier up tadck', google translation) - - "˕": [t: "модификатор вниз"] # 0x2d5 (en: 'modifier down tack', google translation) - - "˖": [t: "модификатор плюс знак"] # 0x2d6 (en: 'modifier plus sign', google translation) - - "˗": [t: "модификатор минус знак"] # 0x2d7 (en: 'modifier minus sign', google translation) - - "˘": [t: "бреве"] # 0x2d8 (en: 'breve', google translation) - - "˙": [t: "точка"] # 0x2d9 (en: 'dot', google translation) - - "˚": [t: "кольцо выше"] # 0x2da (en: 'ring above', google translation) - - "˛": [t: "огонек"] # 0x2db (en: 'ogonek', google translation) - - "˜": [t: "маленькая тильда"] # 0x2dc (en: 'small tilde', google translation) - - "˝": [t: "двойной острый акцент"] # 0x2dd (en: 'double acute accent', google translation) - - "˞": [t: "модификатор rhotic hook"] # 0x2de (en: 'modifier rhotic hook', google translation) - - "˟": [t: "модификатор cross accent"] # 0x2df (en: 'modifier cross accent', google translation) - - "ˠ": [t: "модификатор маленькой гамма"] # 0x2e0 (en: 'modifier small gamma', google translation) - - "ˡ": [t: "модификатор маленький l"] # 0x2e1 (en: 'modifier small l', google translation) - - "ˢ": [t: "модификатор маленький с"] # 0x2e2 (en: 'modifier small s', google translation) - - "ˣ": [t: "модификатор маленький x"] # 0x2e3 (en: 'modifier small x', google translation) - - "ˤ": [t: "модификатор небольшой обратной глоттальной остановки"] # 0x2e4 (en: 'modifier small reversed glottal stop', google translation) - - "˥": [t: "модификатор лишний тональный батончик"] # 0x2e5 (en: 'modifier extra-high tone bar', google translation) - - "˦": [t: "модификатор высокого тона"] # 0x2e6 (en: 'modifier high tone bar', google translation) - - "˧": [t: "модификатор среднего тона"] # 0x2e7 (en: 'modifier mid tone bar', google translation) - - "˨": [t: "модификатор с низким тоном"] # 0x2e8 (en: 'modifier low tone bar', google translation) - - "˩": [t: "модификатор экстра-низко-тон"] # 0x2e9 (en: 'modifier extra-low tone bar', google translation) - - "˪": [t: "модификатор инь, выходящий по тональной марке"] # 0x2ea (en: 'modifier yin departing tone mark', google translation) - - "˫": [t: "модификатор ян уходящего тон"] # 0x2eb (en: 'modifier yang departing tone mark', google translation) - - "ˬ": [t: "модификатор голоса"] # 0x2ec (en: 'modifier voicing', google translation) - - "˭": [t: "модификатор бездиочный"] # 0x2ed (en: 'modifier unaspirated', google translation) - - "ˮ": [t: "модификатор двойной апостроф"] # 0x2ee (en: 'modifier double apostrophe', google translation) - - "˯": [t: "модификатор низкого вниз стрелы"] # 0x2ef (en: 'modifier low down arrowhead', google translation) - - "˰": [t: "модификатор низкий вверх стрел"] # 0x2f0 (en: 'modifier low up arrowhead', google translation) - - "˱": [t: "модификатор низкий левый стрелок"] # 0x2f1 (en: 'modifier low left arrowhead', google translation) - - "˲": [t: "модификатор низкого правого стрелка"] # 0x2f2 (en: 'modifier low right arrowhead', google translation) - - "˳": [t: "модификатор низкий кольцо"] # 0x2f3 (en: 'modifier low ring', google translation) - - "˴": [t: "модификатор среднего могилы"] # 0x2f4 (en: 'modifier middle grave accent', google translation) - - "˵": [t: "модификатор среднего двойного могилы"] # 0x2f5 (en: 'modifier middle double grave accent', google translation) - - "˶": [t: "модификатор среднего двойного острого акцента"] # 0x2f6 (en: 'modifier middle double acute accent', google translation) - - "˷": [t: "модификатор низкий тильде"] # 0x2f7 (en: 'modifier low tilde', google translation) - - "˸": [t: "модификатор поднял толстую кишку"] # 0x2f8 (en: 'modifier raised colon', google translation) - - "˹": [t: "модификатор начинается высокий тон"] # 0x2f9 (en: 'modifier begin high tone', google translation) - - "˺": [t: "модификатор заканчивает высокий тон"] # 0x2fa (en: 'modifier end high tone', google translation) - - "˻": [t: "модификатор начинается с низким тоном"] # 0x2fb (en: 'modifier begin low tone', google translation) - - "˼": [t: "модификатор заканчивается низким тоном"] # 0x2fc (en: 'modifier end low tone', google translation) - - "˽": [t: "модификатор полка"] # 0x2fd (en: 'modifier shelf', google translation) - - "˾": [t: "модификатор открытая полка"] # 0x2fe (en: 'modifier open shelf', google translation) - - "˿": [t: "модификатор низкий левый стрелка"] # 0x2ff (en: 'modifier low left arrow', google translation) - - "̀": [t: "могильный акцент украшения"] # 0x300 (en: 'grave accent embellishment', google translation) - - "́": [t: "острый акцентный украшение"] # 0x301 (en: 'acute accent embellishment', google translation) - - "̂": [t: "окружающий акцент украшения"] # 0x302 (en: 'circumflex accent embellishment', google translation) - - "̃": [t: "тильде украшает"] # 0x303 (en: 'tilde embellishment', google translation) - - "̄": [t: "макрон украшает"] # 0x304 (en: 'macron embellishment', google translation) - - "̅": [t: "вручительская варенья"] # 0x305 (en: 'overbar embellishment', google translation) - - "̆": [t: "бреве украшения"] # 0x306 (en: 'breve embellishment', google translation) - - "̇": [t: "точка над украшением"] # 0x307 (en: 'dot above embellishment', google translation) - - "̈": [t: "украшение диарезиса"] # 0x308 (en: 'diaeresis embellishment', google translation) - - "̉": [t: "крючок над украшением"] # 0x309 (en: 'hook above embellishment', google translation) - - "̊": [t: "кольцо над украшением"] # 0x30a (en: 'ring above embellishment', google translation) - - "̋": [t: "двойное острое акцентное украшение"] # 0x30b (en: 'double acute accent embellishment', google translation) - - "̌": [t: "проверять"] # 0x30c (en: 'check', google translation) - - "̍": [t: "вертикальная линия над украшением"] # 0x30d (en: 'vertical line above embellishment', google translation) - - "̎": [t: "двойная вертикальная линия над украшением"] # 0x30e (en: 'double vertical line above embellishment', google translation) - - "̏": [t: "двойной могильный акцент украшения"] # 0x30f (en: 'double grave accent embellishment', google translation) - - "̐": [t: "кендрабинду украшает"] # 0x310 (en: 'candrabindu embellishment', google translation) - - "̑": [t: "перевернутое украшение бреве"] # 0x311 (en: 'inverted breve embellishment', google translation) - - "̒": [t: "повернут запятую над украшением"] # 0x312 (en: 'turned comma above embellishment', google translation) - - "̓": [t: "запятая над украшением"] # 0x313 (en: 'comma above embellishment', google translation) - - "̔": [t: "обратная запятая над украшением"] # 0x314 (en: 'reversed comma above embellishment', google translation) - - "̕": [t: "запятая над правым украшением"] # 0x315 (en: 'comma above right embellishment', google translation) - - "̖": [t: "могильный акцент ниже украшения"] # 0x316 (en: 'grave accent below embellishment', google translation) - - "̗": [t: "острый акцент ниже украшения"] # 0x317 (en: 'acute accent below embellishment', google translation) - - "̘": [t: "левая привязка под украшением"] # 0x318 (en: 'left tack below embellishment', google translation) - - "̙": [t: "правая привязка под украшением"] # 0x319 (en: 'right tack below embellishment', google translation) - - "̚": [t: "левый угол над украшением"] # 0x31a (en: 'left angle above embellishment', google translation) - - "̛": [t: "рога в украшении"] # 0x31b (en: 'horn embellishment', google translation) - - "̜": [t: "полево половина кольца под украшением"] # 0x31c (en: 'left half ring below embellishment', google translation) - - "̝": [t: "вверх по приукрашиванию"] # 0x31d (en: 'up tack below embellishment', google translation) - - "̞": [t: "вниз по привязке"] # 0x31e (en: 'down tack below embellishment', google translation) - - "̟": [t: "плюс знак ниже украшения"] # 0x31f (en: 'plus sign below embellishment', google translation) - - "̠": [t: "знак минус ниже украшения"] # 0x320 (en: 'minus sign below embellishment', google translation) - - "̡": [t: "палатализированный крюк под украшением"] # 0x321 (en: 'palatalized hook below embellishment', google translation) - - "̢": [t: "ретрофлексный крюк под украшением"] # 0x322 (en: 'retroflex hook below embellishment', google translation) - - "̣": [t: "точка ниже украшения"] # 0x323 (en: 'dot below embellishment', google translation) - - "̤": [t: "диарезис ниже украшения"] # 0x324 (en: 'diaeresis below embellishment', google translation) - - "̥": [t: "кольцо ниже украшения"] # 0x325 (en: 'ring below embellishment', google translation) - - "̦": [t: "запятая ниже украшения"] # 0x326 (en: 'comma below embellishment', google translation) - - "̧": [t: "седия украшения"] # 0x327 (en: 'cedilla embellishment', google translation) - - "̨": [t: "огонек украшает"] # 0x328 (en: 'ogonek embellishment', google translation) - - "̩": [t: "вертикальная линия под украшением"] # 0x329 (en: 'vertical line below embellishment', google translation) - - "̪": [t: "мост ниже украшения"] # 0x32a (en: 'bridge below embellishment', google translation) - - "̫": [t: "перевернутая двойная арка ниже украшения"] # 0x32b (en: 'inverted double arch below embellishment', google translation) - - "̬": [t: "карон ниже украшения"] # 0x32c (en: 'caron below embellishment', google translation) - - "̭": [t: "окружающий акцент под украшением"] # 0x32d (en: 'circumflex accent below embellishment', google translation) - - "̮": [t: "бреве под украшением"] # 0x32e (en: 'breve below embellishment', google translation) - - "̯": [t: "перевернутый бреве под украшением"] # 0x32f (en: 'inverted breve below embellishment', google translation) - - "̰": [t: "тильда ниже украшения"] # 0x330 (en: 'tilde below embellishment', google translation) - - "̱": [t: "макрон ниже украшения"] # 0x331 (en: 'macron below embellishment', google translation) - - "̲": [t: "низкая линия украшения"] # 0x332 (en: 'low line embellishment', google translation) - - "̳": [t: "двойная низкая линейная украшения"] # 0x333 (en: 'double low line embellishment', google translation) - - "̴": [t: "тильде наложение украшений"] # 0x334 (en: 'tilde overlay embellishment', google translation) - - "̵": [t: "краткое инсультное наложение"] # 0x335 (en: 'short stroke overlay embellishment', google translation) - - "̶": [t: "длинное инсульт украшает"] # 0x336 (en: 'long stroke overlay embellishment', google translation) - - "̷": [t: "короткое наложение solidus"] # 0x337 (en: 'short solidus overlay embellishment', google translation) - - "̸": [t: "длинное наложение solidus"] # 0x338 (en: 'long solidus overlay embellishment', google translation) - - "̹": [t: "правое половина кольца под украшением"] # 0x339 (en: 'right half ring below embellishment', google translation) - - "̺": [t: "перевернутый мост под украшением"] # 0x33a (en: 'inverted bridge below embellishment', google translation) - - "̻": [t: "квадрат ниже украшения"] # 0x33b (en: 'square below embellishment', google translation) - - "̼": [t: "seagull ниже украшения"] # 0x33c (en: 'seagull below embellishment', google translation) - - "̽": [t: "x выше украшения"] # 0x33d (en: 'x above embellishment', google translation) - - "̾": [t: "вертикальное украшение тильды"] # 0x33e (en: 'vertical tilde embellishment', google translation) - - "̿": [t: "двойное оберное украшение"] # 0x33f (en: 'double overline embellishment', google translation) - - "̀": [t: "могильный тон марк украшения"] # 0x340 (en: 'grave tone mark embellishment', google translation) - - "́": [t: "острый тонус марк украшения"] # 0x341 (en: 'acute tone mark embellishment', google translation) - - "͆": [t: "мост выше"] # 0x346 (en: 'bridge above', google translation) - - - "ΪΫϏ": # 0x3aa, 0x3ab, 0x3cf - - test: - if: "$CapitalLetters_Beep" - then: - - audio: - value: "beep.mp4" - replace: [] - - test: - if: "$CapitalLetters_UseWord" - then_test: - if: "$SpeechOverrides_CapitalLetters = ''" - then_test: - if: "$Impairment = 'Blindness'" - then: [t: "пропусков"] # (en: 'cap', google translation) - else: [x: "$SpeechOverrides_CapitalLetters"] - - pitch: - value: "$CapitalLetters_Pitch" - replace: [spell: "translate('.', 'ΪΫϏ', 'ιυϗ')"] - - t: "с диалитикой" # (en: 'with dialytika', google translation) - - "ϊ": [t: "йота с диалитикой"] # 0x3ca (en: 'iota with dialytika') - - "ϋ": [t: "ипсилон с диалитикой"] # 0x3cb (en: 'upsilon with dialytika') - - "ό": [t: "омикрон с тоносом"] # 0x3cc (en: 'omicron with tonos') - - "ύ": [t: "ипсилон с тоносом"] # 0x3cd (en: 'upsilon with tonos') - - "ώ": [t: "омега с тоносом"] # 0x3ce (en: 'omega with tonos') - - "ϐ": [t: "бета"] # 0x3d0 (en: 'beta') - - "ϑ": [t: "тета"] # 0x3d1 (en: 'theta') - - "ϒ": [t: "ипсилон с крючком"] # 0x3d2 (en: 'upsilon with hook') - - "ϓ": [t: "ипсилон с акутом и крючком"] # 0x3d3 (en: 'upsilon with acute and hook') - - "ϔ": [t: "ипсилон с диэрезисом и крючком"] # 0x3d4 (en: 'upsilon with diaeresis and hook') - - "ϕ": [t: "фи"] # 0x3d5 (en: 'phi') - - "ϖ": [t: "пи"] # 0x3d6 (en: 'pi') - - "ϗ": [t: "кай"] # 0x3d7 (en: 'kai') - - "Ϙ": [t: "верхний архаичный коппа"] # 0x3d8 (en: 'cap archaic koppa', google translation) - - "ϙ": [t: "архаичная коппа"] # 0x3d9 (en: 'archaic koppa') - - "ϵ": [t: "полулунный эпсилон"] # 0x3f5 (en: 'epsilon') - - "϶": [t: "обратный полулунный эпсилон"] # 0x3f6 (en: 'reversed epsilon') - - "А-Я": # 0x410 - 0x42f - - test: - if: "$CapitalLetters_Beep" - then: - - audio: - value: "beep.mp4" - replace: [] - - test: - if: "$CapitalLetters_UseWord" - then_test: - if: "$SpeechOverrides_CapitalLetters = ''" - then_test: - if: "$Impairment = 'Blindness'" - then: [t: "пропусков"] # (en: 'cap', google translation) - else: [x: "$SpeechOverrides_CapitalLetters"] - - pitch: - value: "$CapitalLetters_Pitch" - replace: [spell: "translate('.', 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ', 'абвгдежзийклмнопрстуфхцчшщъыьэюя')"] - - "а": [t: "а"] # 0x430 (en: 'a', google translation) - - "б": [t: "быть"] # 0x431 (en: 'be', google translation) - - "в": [t: "вежливый"] # 0x432 (en: 've', google translation) - - "г": [t: "ghe"] # 0x433 (google translation) - - "д": [t: "де"] # 0x434 (en: 'de', google translation) - - "е": [t: "те"] # 0x435 (en: 'ie', google translation) - - "ж": [t: "же"] # 0x436 (en: 'zhe', google translation) - - "з": [t: "ze"] # 0x437 (google translation) - - "и": [t: "и"] # 0x438 (en: 'i', google translation) - - "й": [t: "короткий я"] # 0x439 (en: 'short i', google translation) - - "к": [t: "категория"] # 0x43a (en: 'ka', google translation) - - "л": [t: "эль"] # 0x43b (en: 'el', google translation) - - "м": [t: "эм"] # 0x43c (en: 'em', google translation) - - "н": [t: "поступка"] # 0x43d (en: 'en', google translation) - - "о": [t: "о"] # 0x43e (en: 'o', google translation) - - "п": [t: "финиш"] # 0x43f (en: 'pe', google translation) - - "р": [t: "эр"] # 0x440 (en: 'er', google translation) - - "с": [t: "эс"] # 0x441 (en: 'es', google translation) - - "т": [t: "театр"] # 0x442 (en: 'te', google translation) - - "у": [t: "у"] # 0x443 (en: 'u', google translation) - - "ф": [t: "эф"] # 0x444 (en: 'ef', google translation) - - "х": [t: "ха"] # 0x445 (en: 'ha', google translation) - - "ц": [t: "нога"] # 0x446 (en: 'tse', google translation) - - "ч": [t: "костюм"] # 0x447 (en: 'che', google translation) - - "ш": [t: "ша"] # 0x448 (en: 'sha', google translation) - - "щ": [t: "шша"] # 0x449 (en: 'shcha', google translation) - - "ъ": [t: "жесткий знак"] # 0x44a (en: 'hard sign', google translation) - - "ы": [t: "еру"] # 0x44b (en: 'yeru', google translation) - - "ь": [t: "мягкий знак"] # 0x44c (en: 'soft sign', google translation) - - "э": [t: "э"] # 0x44d (en: 'e', google translation) - - "ю": [t: "ю"] # 0x44e (en: 'yu', google translation) - - "я": [t: "я"] # 0x44f (en: 'ya', google translation) - - "؆": [t: "арабский корень куба"] # 0x606 (en: 'Arabic-Indic cube root', google translation) - - "؇": [t: "арабский индикатор четвертый корень"] # 0x607 (en: 'Arabic-Indic fourth root', google translation) - - "؈": [t: "арабский рэй"] # 0x608 (en: 'Arabic ray', google translation) - - "‐": [t: "дефис"] # 0x2010 (en: 'hyphen', google translation) - - "‑": [t: "дефис"] # 0x2011 (en: 'hyphen', google translation) - - "‒": [t: "фигура dash"] # 0x2012 (en: 'figure dash', google translation) - - "–": [t: "en dash"] # 0x2013 (google translation) - - "—": [t: "em dash"] # 0x2014 (google translation) - - "―": [t: "горизонтальный батончик"] # 0x2015 (en: 'horizontal bar', google translation) - - "‖": [t: "двойная вертикальная линия"] # 0x2016 (en: 'double vertical line', google translation) - - "†": [t: "кинжал"] # 0x2020 (en: 'dagger', google translation) - - "‡": [t: "двойной кинжал"] # 0x2021 (en: 'double dagger', google translation) - - - " - ": [t: "‡"] # 0x2000 - 0x2007 (en: ' ', google translation) - - - "•": # 0x2022 - - test: - if: "@data-chem-formula-op" - then: [t: "точка"] # (en: 'dot', google translation) - else: [t: "пуля"] # (en: 'bullet', google translation) - - - "…": # 0x2026 - test: - if: - - "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_Ellipses = 'Auto' or" - # must be ClearSpeak and $ClearSpeak_Ellipses = 'AndSoOn' - # speak '…' as 'and so on...' unless expr starts with '…' - - "../*[1][.='…']" - then: [t: "точка точка точка"] # (en: 'dot dot dot', google translation) - else_test: # must have $ClearSpeak_Ellipses = 'AndSoOn' - if: "count(following-sibling::*) = 0" - then: [t: "и так далее"] # (en: 'and so on', google translation) - else: [t: "и так далее"] # (en: 'and so on up to', google translation) - - - "‰": [t: "за мил"] # 0x2030 (en: 'per mille', google translation) - - "‱": [t: "за десять тысяч"] # 0x2031 (en: 'per ten thousand', google translation) - - "′": [t: "штрих"] # 0x2032 (en: 'prime') - - "″": [t: "двойной штрих"] # 0x2033 (en: 'double prime') - - "‴": [t: "тройной штрих"] # 0x2034 (en: 'triple prime') - - "‵": [t: "обратный штрих"] # 0x2035 (en: 'reversed prime') - - "‶": [t: "обратный двойной штрих"] # 0x2036 (en: 'reversed double prime') - - "‷": [t: "обратный тройной штрих"] # 0x2037 (en: 'reversed triple prime', google translation) - - "‸": [t: "в"] # 0x2038 (en: 'to the', google translation) - - "‹": [t: "одиночный левый угол угла цитата"] # 0x2039 (en: 'single left pointing angle quote mark', google translation) - - "›": [t: "одиночный правый угол цитата цитата"] # 0x203a (en: 'single right pointing angle quote mark', google translation) - - "‼": [t: "двойной фактор"] # 0x203c (en: 'double factorial', google translation) - - "⁄": [t: "разделен на"] # 0x2044 (en: 'divided by', google translation) - - "⁅": [t: "левый квадратный кронштейн с перо"] # 0x2045 (en: 'left square bracket with quill', google translation) - - "⁆": [t: "правый квадратный кронштейн с перо"] # 0x2046 (en: 'right square bracket with quill', google translation) - - "※": [t: "справочная марка"] # 0x203b (en: 'reference mark', google translation) - - "‿": [t: "под галстуком"] # 0x203F (en: 'under tie', google translation) - - "⁀": [t: "галстук"] # 0x2040 (en: 'tie', google translation) - - "⁎": [t: "низкий звездочка"] # 0x204e (en: 'low asterisk', google translation) - - "⁏": [t: "обратная точка с запятой"] # 0x204f (en: 'reversed semicolon', google translation) - - "⁐": [t: "закрыть"] # 0x2050 (en: 'close up', google translation) - - "⁑": [t: "две вертикальные звездочки"] # 0x2051 (en: 'two vertical asterisks', google translation) - - "⁒": [t: "коммерческий минус знак"] # 0x2052 (en: 'commercial minus sign', google translation) - - "⁗": [t: "четырехкратный prime"] # 0x2057 (en: 'quadruple prime', google translation) - - "⁠": [t: ""] # 0x2060 - - "⁰": [t: "к нулевой степени"] # 0x2070 (en: 'to the zeroth power', google translation) - - "ⁱ": [t: "к силе эйхт"] # 0x2071 (en: 'to the eihth power', google translation) - - "⁴": [t: "к четвёртой степени"] # 0x2074 (en: 'to the fourth power', google translation) - - "⁵": [t: "к пятой степени"] # 0x2075 (en: 'to the fifth power', google translation) - - "⁶": [t: "к шестой степени"] # 0x2076 (en: 'to the sixth power', google translation) - - "⁷": [t: "к седьмой степении"] # 0x2077 (en: 'to the seventh power', google translation) - - "⁸": [t: "к восьмой степени"] # 0x2078 (en: 'to the eighth power', google translation) - - "⁹": [t: "к девятой степени"] # 0x2079 (en: 'to the ninth power', google translation) - - "⁺": [t: "superscript plus sign"] # 0x207a (google translation) - - "⁻": [t: "superscript минус"] # 0x207b (en: 'superscript minus', google translation) - - "⁼": [t: "superscript equals sign"] # 0x207c (google translation) - - "⁽": [t: "superscript left sakesisetise"] # 0x207d (en: 'superscript left parenthesis', google translation) - - "⁾": [t: "право скобок"] # 0x207e (en: 'superscript right parenthesis', google translation) - - "ⁿ": [t: "к власти энн"] # 0x207f (en: 'to the ennth power', google translation) - - "₀": [t: "суб -ноль"] # 0x2080 (en: 'sub zero', google translation) - - "₁": [t: "подставка"] # 0x2081 (en: 'sub one', google translation) - - "₂": [t: "подставка два"] # 0x2082 (en: 'sub two', google translation) - - "₃": [t: "подставка три"] # 0x2083 (en: 'sub three', google translation) - - "₄": [t: "подставка четверка"] # 0x2084 (en: 'sub four', google translation) - - "₅": [t: "подставка пяти"] # 0x2085 (en: 'sub five', google translation) - - "₆": [t: "sub six"] # 0x2086 (google translation) - - "₇": [t: "sub seven"] # 0x2087 (google translation) - - "₈": [t: "саб"] # 0x2088 (en: 'sub eight', google translation) - - "₉": [t: "sub девять"] # 0x2089 (en: 'sub nine', google translation) - - "₊": [t: "подписк плюс знак"] # 0x208a (en: 'subscript plus sign', google translation) - - "₋": [t: "подписка минус знак"] # 0x208b (en: 'subscript minus sign', google translation) - - "₌": [t: "подписк равна значению"] # 0x208c (en: 'subscript equals sign', google translation) - - "₍": [t: "подписк остался в скобках"] # 0x208d (en: 'subscript left parenthesis', google translation) - - "₎": [t: "подписк право с клеса"] # 0x208e (en: 'subscript right parenthesis', google translation) - - "ₐ": [t: "подсуд а"] # 0x2090 (en: 'sub A', google translation) - - "ₑ": [t: "саб"] # 0x2091 (en: 'sub E', google translation) - - "ₒ": [t: "саб"] # 0x2092 (en: 'sub O', google translation) - - "ₓ": [t: "суб"] # 0x2093 (en: 'sub X', google translation) - - "ₕ": [t: "сабл"] # 0x2095 (en: 'sub H', google translation) - - "ₖ": [t: "суб"] # 0x2096 (en: 'sub K', google translation) - - "ₗ": [t: "сабл"] # 0x2097 (en: 'sub L', google translation) - - "ₘ": [t: "саб м"] # 0x2098 (en: 'sub M', google translation) - - "ₙ": [t: "суб"] # 0x2099 (en: 'sub N', google translation) - - "ₚ": [t: "суб -п"] # 0x209a (en: 'sub P', google translation) - - "ₛ": [t: "sub s"] # 0x209b (en: 'sub S', google translation) - - "ₜ": [t: "суб т"] # 0x209c (en: 'sub T', google translation) - - "₠": [t: "европейская текущая единица"] # 0x20a0 (en: 'european currenty units', google translation) - - "₡": [t: "колонс"] # 0x20a1 (en: 'colons', google translation) - - "₢": [t: "крузейро"] # 0x20a2 (en: 'cruzeiro', google translation) - - "₣": [t: "франк"] # 0x20a3 (en: 'franc', google translation) - - "₤": [t: "лира"] # 0x20a4 (en: 'lira', google translation) - - "₥": [t: "мельницы"] # 0x20a5 (en: 'mills', google translation) - - "₦": [t: "найра"] # 0x20a6 (en: 'naira', google translation) - - "₧": [t: "пезета"] # 0x20a7 (en: 'peseta', google translation) - - "₨": [t: "рупии"] # 0x20a8 (en: 'rupees', google translation) - - "₩": [t: "выиграл"] # 0x20a9 (en: 'won', google translation) - - "₪": [t: "новые шекели"] # 0x20aa (en: 'new sheqels', google translation) - - "₫": [t: "донг"] # 0x20ab (en: 'dong', google translation) - - "€": [t: "евро"] # 0x20ac (en: 'euros', google translation) - - "₭": [t: "кип"] # 0x20ad (en: 'kip', google translation) - - "₮": [t: "тугрик"] # 0x20ae (en: 'tugrik', google translation) - - "₯": [t: "драхма"] # 0x20af (en: 'drachma', google translation) - - "₰": [t: "немецкие копейки"] # 0x20b0 (en: 'german pennies', google translation) - - "₱": [t: "песо"] # 0x20b1 (en: 'pesos', google translation) - - "₲": [t: "гуаранис"] # 0x20b2 (en: 'guaranis', google translation) - - "₳": [t: "австралии"] # 0x20b3 (en: 'australs', google translation) - - "₴": [t: "гривния"] # 0x20b4 (en: 'hryvnias', google translation) - - "₵": [t: "седис"] # 0x20b5 (en: 'cedis', google translation) - - "₶": [t: "ливр турнуа"] # 0x20b6 (en: 'livre tournois', google translation) - - "₷": [t: "spesmilos"] # 0x20b7 (google translation) - - "₸": [t: "тенги"] # 0x20b8 (en: 'tenges', google translation) - - "₹": [t: "индийские рупии"] # 0x20b9 (en: 'indian rupees', google translation) - - "₺": [t: "турецкие лирас"] # 0x20ba (en: 'turkish liras', google translation) - - "⃐": [t: "левый гарпун над украшением"] # 0x20d0 (en: 'left harpoon above embellishment', google translation) - - "⃑": [t: "правый гарпун над украшением"] # 0x20d1 (en: 'right harpoon above embellishment', google translation) - - "⃒": [t: "длинная вертикальная линия наложения"] # 0x20d2 (en: 'long vertical line overlay embellishment', google translation) - - "⃓": [t: "короткая вертикальная линия наложения"] # 0x20d3 (en: 'short vertical line overlay embellishment', google translation) - - "⃔": [t: "стрелка против часовой стрелки над украшением"] # 0x20d4 (en: 'anticlockwise arrow above embellishment', google translation) - - "⃕": [t: "стрелка по часовой стрелке над украшением"] # 0x20d5 (en: 'clockwise arrow above embellishment', google translation) - - "⃖": [t: "левая стрелка над украшением"] # 0x20d6 (en: 'left arrow above embellishment', google translation) - - "⃗": [t: "правая стрелка над украшением"] # 0x20d7 (en: 'right arrow above embellishment', google translation) - - "⃘": [t: "кольцо наложения украшения"] # 0x20d8 (en: 'ring overlay embellishment', google translation) - - "⃙": [t: "по часовой стрелке приукрашивание"] # 0x20d9 (en: 'clockwise ring overlay embellishment', google translation) - - "⃚": [t: "окружающееся в борту с часовой стрельбой"] # 0x20da (en: 'anticlockwise ring overlay embellishment', google translation) - - "⃛": [t: "тройная точка"] # 0x20db (en: 'triple dot', google translation) - - "⃜": [t: "четырехкратная точка"] # 0x20dc (en: 'quadruple dot', google translation) - - "⃝": [t: "прилагая круговой украшение"] # 0x20dd (en: 'enclosing circle embellishment', google translation) - - "⃞": [t: "прилагая квадратные украшения"] # 0x20de (en: 'enclosing square embellishment', google translation) - - "⃟": [t: "прилагая алмазные украшения"] # 0x20df (en: 'enclosing diamond embellishment', google translation) - - "⃠": [t: "прилагая круговую обратную скользу"] # 0x20e0 (en: 'enclosing circle backslash embellishment', google translation) - - "⃡": [t: "стрелка влево справа над украшением"] # 0x20e1 (en: 'left right arrow above embellishment', google translation) - - "⃢": [t: "прилагая в кражу экрана"] # 0x20e2 (en: 'enclosing screen embellishment', google translation) - - "⃣": [t: "приложение украшения keyuppercase"] # 0x20e3 (en: 'enclosing keycap embellishment', google translation) - - "⃤": [t: "прилагаясь вверх, указывающее треугольное украшение"] # 0x20e4 (en: 'enclosing upward pointing triangle embellishment', google translation) - - "⃥": [t: "обратное наложение solidus"] # 0x20e5 (en: 'reverse solidus overlay embellishment', google translation) - - "⃦": [t: "двойное украшение инсульта"] # 0x20e6 (en: 'double verticle stroke embellishment', google translation) - - "⃧": [t: "аннуитетный символ украшения"] # 0x20e7 (en: 'annuity symbol embellishment', google translation) - - "⃨": [t: "тройной недостаточный родовой"] # 0x20e8 (en: 'triple underdot', google translation) - - "⃩": [t: "широкий мост над украшением"] # 0x20e9 (en: 'wide bridge above embellishment', google translation) - - "⃪": [t: "слева стрелка наложения"] # 0x20ea (en: 'leftwards arrow overlay embellishment', google translation) - - "⃫": [t: "длинное двойное наложение solidus"] # 0x20eb (en: 'long double solidus overlay embellishment', google translation) - - "⃬": [t: "прямо гарпун с барб вниз по украшению"] # 0x20ec (en: 'rightwards harpoon with barb downwards embellishment', google translation) - - "⃭": [t: "левый гарпун с барб вниз по украшению"] # 0x20ed (en: 'leftwards harpoon with barb downwards embellishment', google translation) - - "⃮": [t: "левая стрелка ниже украшения"] # 0x20ee (en: 'left arrow below embellishment', google translation) - - "⃯": [t: "правая стрелка ниже украшения"] # 0x20ef (en: 'right arrow below embellishment', google translation) - - "⃰": [t: "звездочка над украшением"] # 0x20f0 (en: 'asterisk above embellishment', google translation) - - "℄": [t: "символ центральной линии"] # 0x2104 (en: 'center line symbol', google translation) - - "℅": [t: "заботиться о"] # 0x2105 (en: 'care of', google translation) - - "℆": [t: "када уна"] # 0x2106 (en: 'cada una', google translation) - - "ℇ": [t: "постоянная эйлера"] # 0x2107 (en: 'euler's constant', google translation) - - "℈": [t: "смешивание"] # 0x2108 (en: 'scruples', google translation) - - "℉": [t: "степени фаренгейт"] # 0x2109 (en: 'degrees fahrenheit', google translation) - - "ℊ": [t: "сценарий g"] # 0x210a (en: 'script g', google translation) - - "ℌℑℨℭ": # 0x210c, 0x2111, 0x2128, 0x212d - - t: "фрактур" # (en: 'fraktur', google translation) - - spell: "translate('.', 'ℌℑℨℭ', 'HIZC')" - - - "ℍℙℾℿ": # 0x210d, 0x2119, 0x213e, 0x213f - - t: "двойной удар" # (en: 'double struck', google translation) - - spell: "translate('.', 'ℍℙℾℿ', 'HPΓΠ')" - - - "ℎ": [t: "планка постоянная"] # 0x210e (en: 'planck constant', google translation) - - "ℏ": [t: "h бар"] # 0x210f (en: 'h bar', google translation) - - - "ℐℒ℘ℬℰℱℳ": # 0x2110, 0x2112, 0x2118, 0x2130, 0x2131, 0x2133 - - t: "сценарий" # (en: 'script', google translation) - - spell: "translate('.', 'ℐℒ℘ℬℰℱℳ', 'ILPBEFM')" - - - "ℓ": [t: "скрипт л"] # 0x2113 (en: 'script l', google translation) - - "℔": [t: "фунт"] # 0x2114 (en: 'pounds', google translation) - - "№": [t: "число"] # 0x2116 (en: 'number', google translation) - - "℥": [t: "унции"] # 0x2125 (en: 'ounces', google translation) - - "Ω": [t: "ом"] # 0x2126 (en: 'ohms', google translation) - - "℧": [t: "mhos"] # 0x2127 (google translation) - - "℩": [t: "повернута йота"] # 0x2129 (en: 'turned iota', google translation) - - "K": [t: "кельвин"] # 0x212a (en: 'kelvin', google translation) - - "Å": [t: "ангстры"] # 0x212b (en: 'angstroms', google translation) - - "ℯ": [t: "сценарий e"] # 0x212f (en: 'script e', google translation) - - # coalesced some chars that use cap letters - - "Ⅎ℺⅁⅂⅃⅄": # 0x2132, 0x213a, 0x2141, 0x2142, 0x2143, 0x2144 - - test: - - if: "'.' = '℺'" - then: [t: "вращается"] # (en: 'rotated', google translation) - - else_if: "'.' = 'Ⅎ'" - then: [t: "перевернутый"] # (en: 'turned', google translation) - - else_if: "'.' = '⅃'" - then: [t: "обратный безэриф"] # (en: 'reversed sans-serif', google translation) - else: [t: "повернулся без зарисования"] # (en: 'turned sans-serif', google translation) - - spell: "translate('.', 'Ⅎ℺⅁⅂⅃⅄', 'FQGLLY')" - - - "ℴ": [t: "сценарий o"] # 0x2134 (en: 'script o', google translation) - - "ℵ": [t: "первый трансфинит кардинал"] # 0x2135 (en: 'first transfinite cardinal', google translation) - - "ℶ": [t: "второй трансфинит кардинал"] # 0x2136 (en: 'second transfinite cardinal', google translation) - - "ℷ": [t: "третий трансфинит кардинал"] # 0x2137 (en: 'third transfinite cardinal', google translation) - - "ℸ": [t: "четвертый трансфинит кардинал"] # 0x2138 (en: 'fourth transfinite cardinal', google translation) - - "ℼ": [t: "двойной удар пи"] # 0x213c (en: 'double struck pi', google translation) - - "ℽ": [t: "двойной удар гамма"] # 0x213d (en: 'double struck gamma', google translation) - - "⅀": [t: "двойное поражение n-ary summation"] # 0x2140 (en: 'double struck n-ary summation', google translation) - - "⅋": [t: "повернул амперс и"] # 0x214b (en: 'turned ampersand', google translation) - - "⅌": [t: "перемещение"] # 0x214c (en: 'per', google translation) - - "ⅎ": [t: "повернулся ф"] # 0x214e (en: 'turned F', google translation) - - "¼": [t: "одна четверть"] # 0x00bc (en: 'one quarter', google translation) - - "½": [t: "половина"] # 0x00bd (en: 'one half', google translation) - - "¾": [t: "три четверти"] # 0x00be (en: 'three quarters', google translation) - - "⅐": [t: "один седьмой"] # 0x2150 (en: 'one seventh', google translation) - - "⅑": [t: "один девятый"] # 0x2151 (en: 'one ninth', google translation) - - "⅒": [t: "одна десятая"] # 0x2152 (en: 'one tenth', google translation) - - "⅓": [t: "треть"] # 0x2153 (en: 'one third', google translation) - - "⅔": [t: "две трети"] # 0x2154 (en: 'two thirds', google translation) - - "⅕": [t: "один пятый"] # 0x2155 (en: 'one fifth', google translation) - - "⅖": [t: "два пятых"] # 0x2156 (en: 'two fifths', google translation) - - "⅗": [t: "три пятых"] # 0x2157 (en: 'three fifths', google translation) - - "⅘": [t: "четыре пятых"] # 0x2158 (en: 'four fifths', google translation) - - "⅙": [t: "один шестой"] # 0x2159 (en: 'one sixth', google translation) - - "⅚": [t: "пять шестых"] # 0x215a (en: 'five sixths', google translation) - - "⅛": [t: "один ат"] # 0x215b (en: 'one eighth', google translation) - - "⅜": [t: "три афи"] # 0x215c (en: 'three eighths', google translation) - - "⅝": [t: "пять ат"] # 0x215d (en: 'five eighths', google translation) - - "⅞": [t: "семь ат"] # 0x215e (en: 'seven eighths', google translation) - - "⅟": [t: "один"] # 0x215f (en: 'one over', google translation) - - "Ⅰ": [t: "Ⅰ"] # 0x2160 (en: 'I', google translation) - - "Ⅱ": [t: "я i"] # 0x2161 (en: 'I I', google translation) - - "Ⅲ": [t: "я я я"] # 0x2162 (en: 'I I I', google translation) - - "Ⅳ": [t: "я v"] # 0x2163 (en: 'I V', google translation) - - "Ⅴ": [t: "Ⅴ"] # 0x2164 (en: 'V', google translation) - - "Ⅵ": [t: "v i"] # 0x2165 (en: 'V I', google translation) - - "Ⅶ": [t: "v i i"] # 0x2166 (en: 'V I I', google translation) - - "Ⅷ": [t: "v i i i"] # 0x2167 (en: 'V I I I', google translation) - - "Ⅸ": [t: "я x"] # 0x2168 (en: 'I X', google translation) - - "Ⅹ": [t: "Ⅹ"] # 0x2169 (en: 'X', google translation) - - "Ⅺ": [t: "x i"] # 0x216a (en: 'X I', google translation) - - "Ⅻ": [t: "x i i"] # 0x216b (en: 'X I I', google translation) - - "Ⅼ": [t: "Ⅼ"] # 0x216c (en: 'L', google translation) - - "Ⅽ": [t: "Ⅽ"] # 0x216d (en: 'C', google translation) - - "Ⅾ": [t: "Ⅾ"] # 0x216e (en: 'D', google translation) - - "Ⅿ": [t: "Ⅿ"] # 0x216f (en: 'M', google translation) - - "ⅰ": [t: "ⅰ"] # 0x2170 (en: 'I', google translation) - - "ⅱ": [t: "я i"] # 0x2171 (en: 'I I', google translation) - - "ⅲ": [t: "я я я"] # 0x2172 (en: 'I I I', google translation) - - "ⅳ": [t: "я v"] # 0x2173 (en: 'I V', google translation) - - "ⅴ": [t: "ⅴ"] # 0x2174 (en: 'V', google translation) - - "ⅵ": [t: "v i"] # 0x2175 (en: 'V I', google translation) - - "ⅶ": [t: "v i i"] # 0x2176 (en: 'V I I', google translation) - - "ⅷ": [t: "v i i i"] # 0x2177 (en: 'V I I I', google translation) - - "ⅸ": [t: "я x"] # 0x2178 (en: 'I X', google translation) - - "ⅹ": [t: "ⅹ"] # 0x2179 (en: 'X', google translation) - - "ⅺ": [t: "x i"] # 0x217a (en: 'X I', google translation) - - "ⅻ": [t: "x i i"] # 0x217b (en: 'X I I', google translation) - - "ⅼ": [t: "ⅼ"] # 0x217c (en: 'L', google translation) - - "ⅽ": [t: "ⅽ"] # 0x217d (en: 'C', google translation) - - "ⅾ": [t: "ⅾ"] # 0x217e (en: 'D', google translation) - - "ⅿ": [t: "ⅿ"] # 0x217f (en: 'M', google translation) - - "↉": [t: "нулевые трети"] # 0x2189 (en: 'zero thirds', google translation) - - "←": [t: "стрелка влево"] # 0x2190 (en: 'leftwards arrow', google translation) - - "↑": [t: "вверх стрелой"] # 0x2191 (en: 'upwards arrow', google translation) - - "→": [t: "стрелка вправо"] # 0x2192 (en: 'rightwards arrow', google translation) - - "↓": [t: "вниз стрелы"] # 0x2193 (en: 'downwards arrow', google translation) - - "↔": [t: "левая стрелка справа"] # 0x2194 (en: 'left right arrow', google translation) - - "↕": [t: "вверх вниз стрел"] # 0x2195 (en: 'up down arrow', google translation) - - "↖": [t: "северо -западный стрелка"] # 0x2196 (en: 'north west arrow', google translation) - - "↗": # 0x2197 - - test: - if: "ancestor::*[2][self::m:limit]" - then: [t: "подходы снизу"] # (en: 'approaches from below', google translation) - else: [t: "северо -восточный стрела"] # (en: 'north east arrow', google translation) - - - "↘": # 0x2198 - - test: - if: "ancestor::*[2][self::m:limit]" - then: [t: "подходы сверху"] # (en: 'approaches from above', google translation) - else: [t: "юго -восточная стрела"] # (en: 'south east arrow', google translation) - - - "↙": [t: "юго -западный стрелка"] # 0x2199 (en: 'south west arrow', google translation) - - "↚": [t: "стрелка влево с ходом"] # 0x219a (en: 'leftwards arrow with stroke', google translation) - - "↛": [t: "стрелка вправо с ударом"] # 0x219b (en: 'rightwards arrow with stroke', google translation) - - "↜": [t: "левая волновая стрелка"] # 0x219c (en: 'leftwards wave arrow', google translation) - - "↝": [t: "правая волновая стрелка"] # 0x219d (en: 'rightwards wave arrow', google translation) - - "↞": [t: "слева две головы стрелы"] # 0x219e (en: 'leftwards two headed arrow', google translation) - - "↟": [t: "вверху две головные стрелы"] # 0x219f (en: 'upwards two headed arrow', google translation) - - "↠": [t: "права две головные стрелы"] # 0x21a0 (en: 'rightwards two headed arrow', google translation) - - "↡": [t: "вниз по двум головным стрелкам"] # 0x21a1 (en: 'downwards two headed arrow', google translation) - - "↢": [t: "стрелка влево с хвостом"] # 0x21a2 (en: 'leftwards arrow with tail', google translation) - - "↣": [t: "стрелка вправо с хвостом"] # 0x21a3 (en: 'rightwards arrow with tail', google translation) - - "↤": [t: "стрелка влево из бара"] # 0x21a4 (en: 'leftwards arrow from bar', google translation) - - "↥": [t: "стрелка вверх от бара"] # 0x21a5 (en: 'upwards arrow from bar', google translation) - - "↦": [t: "стрелка вправо из бара"] # 0x21a6 (en: 'rightwards arrow from bar', google translation) - - "↧": [t: "стрелка вниз от бара"] # 0x21a7 (en: 'downwards arrow from bar', google translation) - - "↨": [t: "вверх вниз стрел с базой"] # 0x21a8 (en: 'up down arrow with base', google translation) - - "↩": [t: "стрелка влево с крючком"] # 0x21a9 (en: 'leftwards arrow with hook', google translation) - - "↪": [t: "стрелка вправо с крючком"] # 0x21aa (en: 'rightwards arrow with hook', google translation) - - "↫": [t: "стрелка влево с петлей"] # 0x21ab (en: 'leftwards arrow with loop', google translation) - - "↬": [t: "стрелка вправо с петлей"] # 0x21ac (en: 'rightwards arrow with loop', google translation) - - "↭": [t: "левая стрелка правой волны"] # 0x21ad (en: 'left right wave arrow', google translation) - - "↮": [t: "левая стрелка вправо с ударом"] # 0x21ae (en: 'left right arrow with stroke', google translation) - - "↯": [t: "вниз zigzag arrow"] # 0x21af (en: 'downwards zigzag arrow', google translation) - - "↰": [t: "стрелка вверх с наконечником влево"] # 0x21b0 (en: 'upwards arrow with tip leftwards', google translation) - - "↱": [t: "стрелка вверх с наконечником вправо"] # 0x21b1 (en: 'upwards arrow with tip rightwards', google translation) - - "↲": [t: "стрелка вниз с наконечником слева"] # 0x21b2 (en: 'downwards arrow with tip leftwards', google translation) - - "↳": [t: "стрелка вниз с наконечником вправо"] # 0x21b3 (en: 'downwards arrow with tip rightwards', google translation) - - "↴": [t: "стрелка вправо с углом вниз"] # 0x21b4 (en: 'rightwards arrow with corner downwards', google translation) - - "↵": [t: "стрелка вниз с углом налево"] # 0x21b5 (en: 'downwards arrow with corner leftwards', google translation) - - "↶": [t: "стрелка в верхней части часовой стрелки"] # 0x21b6 (en: 'anticlockwise top semicircle arrow', google translation) - - "↷": [t: "верхняя стрелка по часовой стрелке"] # 0x21b7 (en: 'clockwise top semicircle arrow', google translation) - - "↸": [t: "северо -западный стрела до длинного бара"] # 0x21b8 (en: 'north west arrow to long bar', google translation) - - "↹": [t: "стрелка слева, чтобы пройти вправо, стрелу в бар"] # 0x21b9 (en: 'leftwards arrow to bar over rightwards arrow to bar', google translation) - - "↺": [t: "стрелка с открытым кругом"] # 0x21ba (en: 'anticlockwise open circle arrow', google translation) - - "↻": [t: "по часовой стрелке открытый круг стрелы"] # 0x21bb (en: 'clockwise open circle arrow', google translation) - - "↼": [t: "оставил гарпун вверх"] # 0x21bc (en: 'left harpoon up', google translation) - - "↽": [t: "оставил гарпун вниз"] # 0x21bd (en: 'left harpoon down', google translation) - - "↾": [t: "вверх по гарпуне правильно"] # 0x21be (en: 'up harpoon right', google translation) - - "↿": [t: "вверх по гарпуне ушел"] # 0x21bf (en: 'up harpoon left', google translation) - - "⇀": [t: "правый гарпун вверх"] # 0x21c0 (en: 'right harpoon up', google translation) - - "⇁": [t: "правый гарпун вниз"] # 0x21c1 (en: 'right harpoon down', google translation) - - "⇂": [t: "вниз по гарпуне справа"] # 0x21c2 (en: 'down harpoon right', google translation) - - "⇃": [t: "вниз по гарпуне ушел"] # 0x21c3 (en: 'down harpoon left', google translation) - - "⇄": [t: "стрелка вправо над стрелкой влево"] # 0x21c4 (en: 'rightwards arrow over leftwards arrow', google translation) - - "⇅": [t: "вверх стрелка слева от стрелы вниз"] # 0x21c5 (en: 'upwards arrow leftwards of downwards arrow', google translation) - - "⇆": [t: "стрелка слева направо"] # 0x21c6 (en: 'leftwards arrow over rightwards arrow', google translation) - - "⇇": [t: "левые парные стрелы"] # 0x21c7 (en: 'leftwards paired arrows', google translation) - - "⇈": [t: "вверх парные стрелы"] # 0x21c8 (en: 'upwards paired arrows', google translation) - - "⇉": [t: "правые парные стрелы"] # 0x21c9 (en: 'rightwards paired arrows', google translation) - - "⇊": [t: "вниз в парных стрелках"] # 0x21ca (en: 'downwards paired arrows', google translation) - - "⇋": [t: "левый гарпун над правым гарпуном"] # 0x21cb (en: 'left harpoon over right harpoon', google translation) - - "⇌": [t: "правый гарпун над левым гарпуном"] # 0x21cc (en: 'right harpoon over left harpoon', google translation) + - "ʷ": [t: "верхний индекс w"] # 0x2b7 (en: 'modifier small w', google translation) + - "ʸ": [t: "верхний индекс y"] # 0x2b8 (en: 'modifier small y', google translation) + - "ʹ": [t: "штрих"] # 0x2b9 (en: 'modifier prime', google translation) + - "ʺ": [t: "двойной штрих"] # 0x2ba (en: 'modifier double prime', google translation) + - "ʻ": [t: "перевёрнутая запятая"] # 0x2bb (en: 'modifier turned comma', google translation) + - "ʼ": [t: "апостроф"] # 0x2bc (en: 'modifier apostrophe', google translation) + - "ʽ": [t: "перевёрнутый апостроф"] # 0x2bd (en: 'modifier reversed comma', google translation) + - "ʾ": [t: "правое полукольцо"] # 0x2be (en: 'modifier right half ring', google translation) + - "ʿ": [t: "левое полукольцо"] # 0x2bf (en: 'modifier left half ring', google translation) + - "ˀ": [t: "гортанная смычка"] # 0x2c0 (en: 'modifier glottal stop', google translation) + - "ˁ": [t: "перевёрнутая гортанная смычка"] # 0x2c1 (en: 'modifier reversed glottal stop', google translation) + - "˂": [t: "левый наконечник стрелки"] # 0x2c2 (en: 'modifier left arrowhead', google translation) + - "˃": [t: "правый наконечник стрелки"] # 0x2c3 (en: 'modifier right arrowhead', google translation) + - "˄": [t: "верхний наконечник стрелки"] # 0x2c4 (en: 'modifier up arrowhead', google translation) + - "˅": [t: "нижний наконечник стрелки"] # 0x2c5 (en: 'modifier down arrowhead', google translation) + - "ˆ": [t: "циркумфлекс"] # 0x2c6 (en: 'modifier circumflex accent', google translation) + - "ˇ": [t: "гачек"] # 0x2c7 (en: 'check', google translation) + - "ˈ": [t: "вертикальная черта"] # 0x2c8 (en: 'modifier vertical line', google translation) +en: 'right harpoon over left harpoon', google translation) - "⇍": [t: "слева двойная стрелка с ходом"] # 0x21cd (en: 'leftwards double arrow with stroke', google translation) - "⇎": [t: "левая правая двойная стрелка с ходом"] # 0x21ce (en: 'left right double arrow with stroke', google translation) - "⇏": [t: "права двойная стрелка с ходом"] # 0x21cf (en: 'rightwards double arrow with stroke', google translation) @@ -3644,3 +3097,544 @@ - "↓": [t: "стрелка вниз"] # 0xffec (en: 'down arrow', google translation) - "": [t: "неизвестный или отсутствующий объект"] # 0xfffc (en: 'unknown or missing object', google translation) - "�": [t: "неизвестный или отсутствующий символ"] # 0xfffd (en: 'unknown or missing character', google translation) +- "ˉ": [t: "макрон"] # 0x2c9 (en: 'modifier macron') +- "ˊ": [t: "акут"] # 0x2ca (en: 'modifier acute accent') +- "ˋ": [t: "гравис"] # 0x2cb (en: 'modifier grave accent') +- "ˌ": [t: "нижняя вертикальная черта"] # 0x2cc (en: 'modifier low vertical line') +- "ˍ": [t: "нижний макрон"] # 0x2cd (en: 'modifier low macron') +- "ˎ": [t: "нижний гравис"] # 0x2ce (en: 'modifier low grave accent') +- "ˏ": [t: "нижний акут"] # 0x2cf (en: 'modifier low acute accent') +- "ː": [t: "знак долготы"] # 0x2d0 (en: 'modifier triangular colon') +- "ˑ": [t: "половинный знак долготы"] # 0x2d1 (en: 'modifier half triangular colon') +- "˒": [t: "центрированное правое полукольцо"] # 0x2d2 (en: 'modifier centered right half ring') +- "˓": [t: "центрированное левое полукольцо"] # 0x2d3 (en: 'modifier centered left half ring') +- "˔": [t: "верхний упор"] # 0x2d4 (en: 'modifier up tack') +- "˕": [t: "нижний упор"] # 0x2d5 (en: 'modifier down tack') +- "˖": [t: "верхний индекс плюс"] # 0x2d6 (en: 'modifier plus sign') +- "˗": [t: "верхний индекс минус"] # 0x2d7 (en: 'modifier minus sign') +- "˘": [t: "бреве"] # 0x2d8 (en: 'breve') +- "˙": [t: "точка сверху"] # 0x2d9 (en: 'dot') +- "˚": [t: "кольцо сверху"] # 0x2da (en: 'ring above') +- "˛": [t: "огонек"] # 0x2db (en: 'ogonek') +- "˜": [t: "малая тильда"] # 0x2dc (en: 'small tilde') +- "˝": [t: "двойной акут"] # 0x2dd (en: 'double acute accent') +- "˞": [t: "ротический крюк"] # 0x2de (en: 'modifier rhotic hook') +- "˟": [t: "перечёркивающий акцент"] # 0x2df (en: 'modifier cross accent') +- "ˠ": [t: "верхний индекс гаммы"] # 0x2e0 (en: 'modifier small gamma') +- "ˡ": [t: "верхний индекс l"] # 0x2e1 (en: 'modifier small l') +- "ˢ": [t: "верхний индекс s"] # 0x2e2 (en: 'modifier small s') +- "ˣ": [t: "верхний индекс x"] # 0x2e3 (en: 'modifier small x') +- "ˤ": [t: "верхний индекс перевёрнутой гортанной смычки"] # 0x2e4 (en: 'modifier small reversed glottal stop') +- "˥": [t: "сверхвысокий тон"] # 0x2e5 (en: 'modifier extra-high tone bar') +- "˦": [t: "высокий тон"] # 0x2e6 (en: 'modifier high tone bar') +- "˧": [t: "средний тон"] # 0x2e7 (en: 'modifier mid tone bar') +- "˨": [t: "низкий тон"] # 0x2e8 (en: 'modifier low tone bar') +- "˩": [t: "сверхнизкий тон"] # 0x2e9 (en: 'modifier extra-low tone bar') +- "˪": [t: "знак тона инь"] # 0x2ea (en: 'modifier yin departing tone mark') +- "˫": [t: "знак тона ян"] # 0x2eb (en: 'modifier yang departing tone mark') +- "ˬ": [t: "звонкость"] # 0x2ec (en: 'modifier voicing') +- "˭": [t: "непридыхательность"] # 0x2ed (en: 'modifier unaspirated') +- "ˮ": [t: "двойной апостроф"] # 0x2ee (en: 'modifier double apostrophe') +- "˯": [t: "нижний наконечник стрелки вниз"] # 0x2ef (en: 'modifier low down arrowhead') +- "˰": [t: "нижний наконечник стрелки вверх"] # 0x2f0 (en: 'modifier low up arrowhead') +- "˱": [t: "нижний наконечник стрелки влево"] # 0x2f1 (en: 'modifier low left arrowhead') +- "˲": [t: "нижний наконечник стрелки вправо"] # 0x2f2 (en: 'modifier low right arrowhead') +- "˳": [t: "нижнее кольцо"] # 0x2f3 (en: 'modifier low ring') +- "˴": [t: "средний гравис"] # 0x2f4 (en: 'modifier middle grave accent') +- "˵": [t: "средний двойной гравис"] # 0x2f5 (en: 'modifier middle double grave accent') +- "˶": [t: "средний двойной акут"] # 0x2f6 (en: 'modifier middle double acute accent') +- "˷": [t: "нижняя тильда"] # 0x2f7 (en: 'modifier low tilde') +- "˸": [t: "верхнее двоеточие"] # 0x2f8 (en: 'modifier raised colon') +- "˹": [t: "начало высокого тона"] # 0x2f9 (en: 'modifier begin high tone') +- "˺": [t: "конец высокого тона"] # 0x2fa (en: 'modifier end high tone') +- "˻": [t: "начало низкого тона"] # 0x2fb (en: 'modifier begin low tone') +- "˼": [t: "конец низкого тона"] # 0x2fc (en: 'modifier end low tone') +- "˽": [t: "полка"] # 0x2fd (en: 'modifier shelf') +- "˾": [t: "открытая полка"] # 0x2fe (en: 'modifier open shelf') +- "˿": [t: "нижняя левая стрелка"] # 0x2ff (en: 'modifier low left arrow') +- "̀": [t: "комбинируемый гравис"] # 0x300 (en: 'grave accent embellishment') +- "́": [t: "комбинируемый акут"] # 0x301 (en: 'acute accent embellishment') +- "̂": [t: "комбинируемый циркумфлекс"] # 0x302 (en: 'circumflex accent embellishment') +- "̃": [t: "комбинируемая тильда"] # 0x303 (en: 'tilde embellishment') +- "̄": [t: "комбинируемый макрон"] # 0x304 (en: 'macron embellishment') +- "̅": [t: "комбинируемое надчёркивание"] # 0x305 (en: 'overbar embellishment') +- "̆": [t: "комбинируемое бреве"] # 0x306 (en: 'breve embellishment') +- "̇": [t: "комбинируемая точка сверху"] # 0x307 (en: 'dot above embellishment') +- "̈": [t: "комбинируемый диэрезис"] # 0x308 (en: 'diaeresis embellishment') +- "̉": [t: "комбинируемый крючок сверху"] # 0x309 (en: 'hook above embellishment') +- "̊": [t: "комбинируемое кольцо сверху"] # 0x30a (en: 'ring above embellishment') +- "̋": [t: "комбинируемый двойной акут"] # 0x30b (en: 'double acute accent embellishment') +- "̌": [t: "комбинируемый гачек"] # 0x30c (en: 'check') +- "̍": [t: "комбинируемая вертикальная линия сверху"] # 0x30d (en: 'vertical line above embellishment') +- "̎": [t: "комбинируемая двойная вертикальная линия сверху"] # 0x30e (en: 'double vertical line above embellishment') +- "̏": [t: "комбинируемый двойной гравис"] # 0x30f (en: 'double grave accent embellishment') +- "̐": [t: "комбинируемая чандрабинду"] # 0x310 (en: 'candrabindu embellishment') +- "̑": [t: "комбинируемое перевёрнутое бреве"] # 0x311 (en: 'inverted breve embellishment') +- "̒": [t: "комбинируемая перевёрнутая запятая сверху"] # 0x312 (en: 'turned comma above embellishment') +- "̓": [t: "комбинируемая запятая сверху"] # 0x313 (en: 'comma above embellishment') +- "̔": [t: "комбинируемая перевёрнутая запятая сверху"] # 0x314 (en: 'reversed comma above embellishment') +- "̕": [t: "комбинируемая запятая справа сверху"] # 0x315 (en: 'comma above right embellishment') +- "̖": [t: "комбинируемый гравис снизу"] # 0x316 (en: 'grave accent below embellishment') +- "̗": [t: "комбинируемый акут снизу"] # 0x317 (en: 'acute accent below embellishment') +- "̘": [t: "комбинируемый левый упор снизу"] # 0x318 (en: 'left tack below embellishment') +- "̙": [t: "комбинируемый правый упор снизу"] # 0x319 (en: 'right tack below embellishment') +- "̚": [t: "комбинируемый левый угол сверху"] # 0x31a (en: 'left angle above embellishment') +- "̛": [t: "комбинируемый рожок"] # 0x31b (en: 'horn embellishment') +- "̜": [t: "комбинируемое левое полукольцо снизу"] # 0x31c (en: 'left half ring below embellishment') +- "̝": [t: "комбинируемый верхний упор снизу"] # 0x31d (en: 'up tack below embellishment') +- "̞": [t: "комбинируемый нижний упор снизу"] # 0x31e (en: 'down tack below embellishment') +- "̟": [t: "комбинируемый знак плюс снизу"] # 0x31f (en: 'plus sign below embellishment') +- "̠": [t: "комбинируемый знак минус снизу"] # 0x320 (en: 'minus sign below embellishment') +- "̡": [t: "комбинируемый палатализованный крюк снизу"] # 0x321 (en: 'palatalized hook below embellishment') +- "̢": [t: "комбинируемый ретрофлексный крюк снизу"] # 0x322 (en: 'retroflex hook below embellishment') +- "̣": [t: "комбинируемая точка снизу"] # 0x323 (en: 'dot below embellishment') +- "̤": [t: "комбинируемый диэрезис снизу"] # 0x324 (en: 'diaeresis below embellishment') +- "̥": [t: "комбинируемое кольцо снизу"] # 0x325 (en: 'ring below embellishment') +- "̦": [t: "комбинируемая запятая снизу"] # 0x326 (en: 'comma below embellishment') +- "̧": [t: "комбинируемая седиль"] # 0x327 (en: 'cedilla embellishment') +- "̨": [t: "комбинируемый огонек"] # 0x328 (en: 'ogonek embellishment') +- "̩": [t: "комбинируемая вертикальная линия снизу"] # 0x329 (en: 'vertical line below embellishment') +- "̪": [t: "комбинируемый мостик снизу"] # 0x32a (en: 'bridge below embellishment') +- "̫": [t: "комбинируемая перевёрнутая двойная арка снизу"] # 0x32b (en: 'inverted double arch below embellishment') +- "̬": [t: "комбинируемый гачек снизу"] # 0x32c (en: 'caron below embellishment') +- "̭": [t: "комбинируемый циркумфлекс снизу"] # 0x32d (en: 'circumflex accent below embellishment') +- "̮": [t: "комбинируемое бреве снизу"] # 0x32e (en: 'breve below embellishment') +- "̯": [t: "комбинируемое перевёрнутое бреве снизу"] # 0x32f (en: 'inverted breve below embellishment') +- "̰": [t: "комбинируемая тильда снизу"] # 0x330 (en: 'tilde below embellishment') +- "̱": [t: "комбинируемый макрон снизу"] # 0x331 (en: 'macron below embellishment') +- "̲": [t: "комбинируемое подчёркивание"] # 0x332 (en: 'low line embellishment') +- "̳": [t: "комбинируемое двойное подчёркивание"] # 0x333 (en: 'double low line embellishment') +- "̴": [t: "комбинируемая наложенная тильда"] # 0x334 (en: 'tilde overlay embellishment') +- "̵": [t: "комбинируемая короткая черта"] # 0x335 (en: 'short stroke overlay embellishment') +- "̶": [t: "комбинируемая длинная черта"] # 0x336 (en: 'long stroke overlay embellishment') +- "̷": [t: "комбинируемый короткий слэш"] # 0x337 (en: 'short solidus overlay embellishment') +- "̸": [t: "комбинируемый длинный слэш"] # 0x338 (en: 'long solidus overlay embellishment') +- "̹": [t: "комбинируемое правое полукольцо снизу"] # 0x339 (en: 'right half ring below embellishment') +- "̺": [t: "комбинируемый перевёрнутый мостик снизу"] # 0x33a (en: 'inverted bridge below embellishment') +- "̻": [t: "комбинируемый квадрат снизу"] # 0x33b (en: 'square below embellishment') +- "̼": [t: "комбинируемая чайка снизу"] # 0x33c (en: 'seagull below embellishment') +- "̽": [t: "комбинируемый икс сверху"] # 0x33d (en: 'x above embellishment') +- "̾": [t: "комбинируемая вертикальная тильда"] # 0x33e (en: 'vertical tilde embellishment') +- "̿": [t: "комбинируемое двойное надчёркивание"] # 0x33f (en: 'double overline embellishment') +- "̀": [t: "комбинируемый знак гравис-тона"] # 0x340 (en: 'grave tone mark embellishment') +- "́": [t: "комбинируемый знак акут-тона"] # 0x341 (en: 'acute tone mark embellishment') +- "͆": [t: "комбинируемый мостик сверху"] # 0x346 (en: 'bridge above') + +- "ΪΫϏ": # 0x3aa, 0x3ab, 0x3cf + - test: + if: "$CapitalLetters_Beep" + then: + - audio: + value: "beep.mp4" + replace: [] + - test: + if: "$CapitalLetters_UseWord" + then_test: + if: "$SpeechOverrides_CapitalLetters = ''" + then_test: + if: "$Impairment = 'Blindness'" + then: [t: "заглавная"] # (en: 'cap') + else: [x: "$SpeechOverrides_CapitalLetters"] + - pitch: + value: "$CapitalLetters_Pitch" + replace: [spell: "translate('.', 'ΪΫϏ', 'ιυϗ')"] + - t: " с диэрезисом" # (en: 'with dialytika') +- "ϊ": [t: "йота с диэрезисом"] # 0x3ca (en: 'iota with dialytika') +- "ϋ": [t: "ипсилон с диэрезисом"] # 0x3cb (en: 'upsilon with dialytika') +- "ό": [t: "омикрон с ударением"] # 0x3cc (en: 'omicron with tonos') +- "ύ": [t: "ипсилон с ударением"] # 0x3cd (en: 'upsilon with tonos') +- "ώ": [t: "омега с ударением"] # 0x3ce (en: 'omega with tonos') +- "ϐ": [t: "бета"] # 0x3d0 (en: 'beta') +- "ϑ": [t: "тета"] # 0x3d1 (en: 'theta') +- "ϒ": [t: "ипсилон с крючком"] # 0x3d2 (en: 'upsilon with hook') +- "ϓ": [t: "ипсилон с акутом и крючком"] # 0x3d3 (en: 'upsilon with acute and hook') +- "ϔ": [t: "ипсилон с диэрезисом и крючком"] # 0x3d4 (en: 'upsilon with diaeresis and hook') +- "ϕ": [t: "фи"] # 0x3d5 (en: 'phi') +- "ϖ": [t: "пи"] # 0x3d6 (en: 'pi') +- "ϗ": [t: "кай"] # 0x3d7 (en: 'kai') +- "Ϙ": [t: "заглавная архаичная коппа"] # 0x3d8 (en: 'cap archaic koppa') +- "ϙ": [t: "архаичная коппа"] # 0x3d9 (en: 'archaic koppa') +- "ϵ": [t: "эпсилон"] # 0x3f5 (en: 'epsilon') +- "϶": [t: "обратный эпсилон"] # 0x3f6 (en: 'reversed epsilon') +- "А-Я": # 0x410 - 0x42f + - test: + if: "$CapitalLetters_Beep" + then: + - audio: + value: "beep.mp4" + replace: [] + - test: + if: "$CapitalLetters_UseWord" + then_test: + if: "$SpeechOverrides_CapitalLetters = ''" + then_test: + if: "$Impairment = 'Blindness'" + then: [t: "заглавная"] # (en: 'cap') + else: [x: "$SpeechOverrides_CapitalLetters"] + - pitch: + value: "$CapitalLetters_Pitch" + replace: [spell: "translate('.', 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ', 'абвгдежзийклмнопрстуфхцчшщъыьэюя')"] +- "а": [t: "а"] # 0x430 +- "б": [t: "бэ"] # 0x431 +- "в": [t: "вэ"] # 0x432 +- "г": [t: "гэ"] # 0x433 +- "д": [t: "дэ"] # 0x434 +- "е": [t: "е"] # 0x435 +- "ж": [t: "жэ"] # 0x436 +- "з": [t: "зэ"] # 0x437 +- "и": [t: "и"] # 0x438 +- "й": [t: "и краткое"] # 0x439 +- "к": [t: "ка"] # 0x43a +- "л": [t: "эль"] # 0x43b +- "м": [t: "эм"] # 0x43c +- "н": [t: "эн"] # 0x43d +- "о": [t: "о"] # 0x43e +- "п": [t: "пэ"] # 0x43f +- "р": [t: "эр"] # 0x440 +- "с": [t: "эс"] # 0x441 +- "т": [t: "тэ"] # 0x442 +- "у": [t: "у"] # 0x443 +- "ф": [t: "эф"] # 0x444 +- "х": [t: "ха"] # 0x445 +- "ц": [t: "цэ"] # 0x446 +- "ч": [t: "чэ"] # 0x447 +- "ш": [t: "ша"] # 0x448 +- "щ": [t: "ща"] # 0x449 +- "ъ": [t: "твёрдый знак"] # 0x44a +- "ы": [t: "ы"] # 0x44b +- "ь": [t: "мягкий знак"] # 0x44c +- "э": [t: "э"] # 0x44d +- "ю": [t: "ю"] # 0x44e +- "я": [t: "я"] # 0x44f +- "؆": [t: "арабский кубический корень"] # 0x606 (en: 'Arabic-Indic cube root') +- "؇": [t: "арабский корень четвёртой степени"] # 0x607 (en: 'Arabic-Indic fourth root') +- "؈": [t: "арабский рай"] # 0x608 (en: 'Arabic ray') +- "‐": [t: "дефис"] # 0x2010 (en: 'hyphen') +- "‑": [t: "неразрывный дефис"] # 0x2011 (en: 'non-breaking hyphen') +- "‒": [t: "цифровое тире"] # 0x2012 (en: 'figure dash') +- "–": [t: "короткое тире"] # 0x2013 (en: 'en dash') +- "—": [t: "длинное тире"] # 0x2014 (en: 'em dash') +- "―": [t: "горизонтальная черта"] # 0x2015 (en: 'horizontal bar') +- "‖": [t: "двойная вертикальная линия"] # 0x2016 (en: 'double vertical line') +- "†": [t: "крестик"] # 0x2020 (en: 'dagger') +- "‡": [t: "двойной крестик"] # 0x2021 (en: 'double dagger') + +- " - ": [t: ""] # 0x2000 - 0x2007 (различные пробелы, не озвучиваются) + +- "•": # 0x2022 + - test: + if: "@data-chem-formula-op" + then: [t: "точка"] # в химических формулах + else: [t: "маркер"] # (en: 'bullet') + +- "…": # 0x2026 + test: + if: + - "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_Ellipses = 'Auto' or" + - "../*[1][.='…']" + then: [t: "многоточие"] # (en: 'dot dot dot') + else_test: + if: "count(following-sibling::*) = 0" + then: [t: "и так далее"] # (en: 'and so on') + else: [t: "и так далее до"] # (en: 'and so on up to') + +- "‰": [t: "промилле"] # 0x2030 (en: 'per mille') +- "‱": [t: "десять тысяч"] # 0x2031 (en: 'per ten thousand') +- "′": [t: "штрих"] # 0x2032 (en: 'prime') +- "″": [t: "двойной штрих"] # 0x2033 (en: 'double prime') +- "‴": [t: "тройной штрих"] # 0x2034 (en: 'triple prime') +- "‵": [t: "обратный штрих"] # 0x2035 (en: 'reversed prime') +- "‶": [t: "обратный двойной штрих"] # 0x2036 (en: 'reversed double prime') +- "‷": [t: "обратный тройной штрих"] # 0x2037 (en: 'reversed triple prime') +- "‸": [t: "в степени"] # 0x2038 (en: 'to the') +- "‹": [t: "левая одиночная угловая кавычка"] # 0x2039 (en: 'single left-pointing angle quote mark') +- "›": [t: "правая одиночная угловая кавычка"] # 0x203a (en: 'single right-pointing angle quote mark') +- "‼": [t: "двойной восклицательный знак"] # 0x203c (en: 'double factorial') +- "⁄": [t: "косая черта дроби"] # 0x2044 (en: 'fraction slash') +- "⁅": [t: "левая квадратная скобка с пером"] # 0x2045 (en: 'left square bracket with quill') +- "⁆": [t: "правая квадратная скобка с пером"] # 0x2046 (en: 'right square bracket with quill') +- "※": [t: "знак ссылки"] # 0x203b (en: 'reference mark') +- "‿": [t: "соединение снизу"] # 0x203F (en: 'under tie') +- "⁀": [t: "соединение сверху"] # 0x2040 (en: 'tie') +- "⁎": [t: "нижняя звёздочка"] # 0x204e (en: 'low asterisk') +- "⁏": [t: "обратная точка с запятой"] # 0x204f (en: 'reversed semicolon') +- "⁐": [t: "сомкнуть"] # 0x2050 (en: 'close up') +- "⁑": [t: "две вертикальные звёздочки"] # 0x2051 (en: 'two vertical asterisks') +- "⁒": [t: "коммерческий знак минус"] # 0x2052 (en: 'commercial minus sign') +- "⁗": [t: "четыре штриха"] # 0x2057 (en: 'quadruple prime') +- "⁠": [t: ""] # 0x2060 (невидимый соединитель) +- "⁰": [t: "в степени ноль"] # 0x2070 (en: 'to the zeroth power') +- "ⁱ": [t: "в степени i"] # 0x2071 (en: 'to the i-th power') +- "⁴": [t: "в четвёртой степени"] # 0x2074 (en: 'to the fourth power') +- "⁵": [t: "в пятой степени"] # 0x2075 (en: 'to the fifth power') +- "⁶": [t: "в шестой степени"] # 0x2076 (en: 'to the sixth power') +- "⁷": [t: "в седьмой степени"] # 0x2077 (en: 'to the seventh power') +- "⁸": [t: "в восьмой степени"] # 0x2078 (en: 'to the eighth power') +- "⁹": [t: "в девятой степени"] # 0x2079 (en: 'to the ninth power') +- "⁺": [t: "верхний индекс плюс"] # 0x207a (en: 'superscript plus sign') +- "⁻": [t: "верхний индекс минус"] # 0x207b (en: 'superscript minus') +- "⁼": [t: "верхний индекс равно"] # 0x207c (en: 'superscript equals sign') +- "⁽": [t: "верхний индекс левая скобка"] # 0x207d (en: 'superscript left parenthesis') +- "⁾": [t: "верхний индекс правая скобка"] # 0x207e (en: 'superscript right parenthesis') +- "ⁿ": [t: "в степени n"] # 0x207f (en: 'to the n-th power') +- "₀": [t: "индекс ноль"] # 0x2080 (en: 'sub zero') +- "₁": [t: "индекс один"] # 0x2081 (en: 'sub one') +- "₂": [t: "индекс два"] # 0x2082 (en: 'sub two') +- "₃": [t: "индекс три"] # 0x2083 (en: 'sub three') +- "₄": [t: "индекс четыре"] # 0x2084 (en: 'sub four') +- "₅": [t: "индекс пять"] # 0x2085 (en: 'sub five') +- "₆": [t: "индекс шесть"] # 0x2086 (en: 'sub six') +- "₇": [t: "индекс семь"] # 0x2087 (en: 'sub seven') +- "₈": [t: "индекс восемь"] # 0x2088 (en: 'sub eight') +- "₉": [t: "индекс девять"] # 0x2089 (en: 'sub nine') +- "₊": [t: "индекс плюс"] # 0x208a (en: 'subscript plus sign') +- "₋": [t: "индекс минус"] # 0x208b (en: 'subscript minus sign') +- "₌": [t: "индекс равно"] # 0x208c (en: 'subscript equals sign') +- "₍": [t: "индекс левая скобка"] # 0x208d (en: 'subscript left parenthesis') +- "₎": [t: "индекс правая скобка"] # 0x208e (en: 'subscript right parenthesis') +- "ₐ": [t: "индекс a"] # 0x2090 (en: 'sub a') +- "ₑ": [t: "индекс e"] # 0x2091 (en: 'sub e') +- "ₒ": [t: "индекс o"] # 0x2092 (en: 'sub o') +- "ₓ": [t: "индекс x"] # 0x2093 (en: 'sub x') +- "ₕ": [t: "индекс h"] # 0x2095 (en: 'sub h') +- "ₖ": [t: "индекс k"] # 0x2096 (en: 'sub k') +- "ₗ": [t: "индекс l"] # 0x2097 (en: 'sub l') +- "ₘ": [t: "индекс m"] # 0x2098 (en: 'sub m') +- "ₙ": [t: "индекс n"] # 0x2099 (en: 'sub n') +- "ₚ": [t: "индекс p"] # 0x209a (en: 'sub p') +- "ₛ": [t: "индекс s"] # 0x209b (en: 'sub s') +- "ₜ": [t: "индекс t"] # 0x209c (en: 'sub t') +- "₠": [t: "евро"] # 0x20a0 (en: 'european currency unit') — устаревший, но пусть будет евро +- "₡": [t: "колон"] # 0x20a1 (en: 'colon') +- "₢": [t: "крузейро"] # 0x20a2 (en: 'cruzeiro') +- "₣": [t: "франк"] # 0x20a3 (en: 'franc') +- "₤": [t: "лира"] # 0x20a4 (en: 'lira') +- "₥": [t: "милль"] # 0x20a5 (en: 'mill') +- "₦": [t: "найра"] # 0x20a6 (en: 'naira') +- "₧": [t: "песета"] # 0x20a7 (en: 'peseta') +- "₨": [t: "рупия"] # 0x20a8 (en: 'rupee') +- "₩": [t: "вона"] # 0x20a9 (en: 'won') +- "₪": [t: "новый шекель"] # 0x20aa (en: 'new sheqel') +- "₫": [t: "донг"] # 0x20ab (en: 'dong') +- "€": [t: "евро"] # 0x20ac (en: 'euro') +- "₭": [t: "кип"] # 0x20ad (en: 'kip') +- "₮": [t: "тугрик"] # 0x20ae (en: 'tugrik') +- "₯": [t: "драхма"] # 0x20af (en: 'drachma') +- "₰": [t: "пфенниг"] # 0x20b0 (en: 'german penny') +- "₱": [t: "песо"] # 0x20b1 (en: 'peso') +- "₲": [t: "гуарани"] # 0x20b2 (en: 'guarani') +- "₳": [t: "аустраль"] # 0x20b3 (en: 'austral') +- "₴": [t: "гривна"] # 0x20b4 (en: 'hryvnia') +- "₵": [t: "седи"] # 0x20b5 (en: 'cedi') +- "₶": [t: "ливр"] # 0x20b6 (en: 'livre tournois') +- "₷": [t: "спесмило"] # 0x20b7 (en: 'spesmilo') +- "₸": [t: "тенге"] # 0x20b8 (en: 'tenge') +- "₹": [t: "индийская рупия"] # 0x20b9 (en: 'indian rupee') +- "₺": [t: "турецкая лира"] # 0x20ba (en: 'turkish lira') +- "⃐": [t: "комбинируемый левый гарпун сверху"] # 0x20d0 (en: 'left harpoon above embellishment') +- "⃑": [t: "комбинируемый правый гарпун сверху"] # 0x20d1 (en: 'right harpoon above embellishment') +- "⃒": [t: "комбинируемая длинная вертикальная черта"] # 0x20d2 (en: 'long vertical line overlay embellishment') +- "⃓": [t: "комбинируемая короткая вертикальная черта"] # 0x20d3 (en: 'short vertical line overlay embellishment') +- "⃔": [t: "комбинируемая стрелка против часовой стрелки"] # 0x20d4 (en: 'anticlockwise arrow above embellishment') +- "⃕": [t: "комбинируемая стрелка по часовой стрелке"] # 0x20d5 (en: 'clockwise arrow above embellishment') +- "⃖": [t: "комбинируемая стрелка влево сверху"] # 0x20d6 (en: 'left arrow above embellishment') +- "⃗": [t: "комбинируемая стрелка вправо сверху"] # 0x20d7 (en: 'right arrow above embellishment') +- "⃘": [t: "комбинируемое кольцо"] # 0x20d8 (en: 'ring overlay embellishment') +- "⃙": [t: "комбинируемое кольцо по часовой стрелке"] # 0x20d9 (en: 'clockwise ring overlay embellishment') +- "⃚": [t: "комбинируемое кольцо против часовой стрелки"] # 0x20da (en: 'anticlockwise ring overlay embellishment') +- "⃛": [t: "комбинируемые три точки"] # 0x20db (en: 'triple dot') +- "⃜": [t: "комбинируемые четыре точки"] # 0x20dc (en: 'quadruple dot') +- "⃝": [t: "комбинируемый круг"] # 0x20dd (en: 'enclosing circle embellishment') +- "⃞": [t: "комбинируемый квадрат"] # 0x20de (en: 'enclosing square embellishment') +- "⃟": [t: "комбинируемый ромб"] # 0x20df (en: 'enclosing diamond embellishment') +- "⃠": [t: "комбинируемый круг с обратной косой"] # 0x20e0 (en: 'enclosing circle backslash embellishment') +- "⃡": [t: "комбинируемая стрелка влево-вправо сверху"] # 0x20e1 (en: 'left right arrow above embellishment') +- "⃢": [t: "комбинируемый прямоугольник"] # 0x20e2 (en: 'enclosing screen embellishment') +- "⃣": [t: "комбинируемый значок клавиши"] # 0x20e3 (en: 'enclosing keycap embellishment') +- "⃤": [t: "комбинируемый треугольник вверх"] # 0x20e4 (en: 'enclosing upward pointing triangle embellishment') +- "⃥": [t: "комбинируемая обратная косая черта"] # 0x20e5 (en: 'reverse solidus overlay embellishment') +- "⃦": [t: "комбинируемая двойная вертикальная черта"] # 0x20e6 (en: 'double vertical stroke embellishment') +- "⃧": [t: "комбинируемый символ аннуитета"] # 0x20e7 (en: 'annuity symbol embellishment') +- "⃨": [t: "комбинируемые три точки снизу"] # 0x20e8 (en: 'triple underdot') +- "⃩": [t: "комбинируемый широкий мостик сверху"] # 0x20e9 (en: 'wide bridge above embellishment') +- "⃪": [t: "комбинируемая левая стрелка"] # 0x20ea (en: 'leftwards arrow overlay embellishment') +- "⃫": [t: "комбинируемая длинная двойная косая"] # 0x20eb (en: 'long double solidus overlay embellishment') +- "⃬": [t: "комбинируемый правый гарпун вниз"] # 0x20ec (en: 'rightwards harpoon with barb downwards embellishment') +- "⃭": [t: "комбинируемый левый гарпун вниз"] # 0x20ed (en: 'leftwards harpoon with barb downwards embellishment') +- "⃮": [t: "комбинируемая левая стрелка снизу"] # 0x20ee (en: 'left arrow below embellishment') +- "⃯": [t: "комбинируемая правая стрелка снизу"] # 0x20ef (en: 'right arrow below embellishment') +- "⃰": [t: "комбинируемая звёздочка сверху"] # 0x20f0 (en: 'asterisk above embellishment') +- "℄": [t: "символ центровой линии"] # 0x2104 (en: 'center line symbol') +- "℅": [t: "вниманию"] # 0x2105 (en: 'care of') +- "℆": [t: "каждая"] # 0x2106 (en: 'cada una') +- "ℇ": [t: "постоянная Эйлера"] # 0x2107 (en: 'Euler's constant') +- "℈": [t: "скрупул"] # 0x2108 (en: 'scruple') +- "℉": [t: "градус Фаренгейта"] # 0x2109 (en: 'degree Fahrenheit') +- "ℊ": [t: "рукописная g"] # 0x210a (en: 'script g') +- "ℌℑℨℭ": # 0x210c, 0x2111, 0x2128, 0x212d + - t: "готическое" # (en: 'fraktur') + - spell: "translate('.', 'ℌℑℨℭ', 'HIZC')" +- "ℍℙℾℿ": # 0x210d, 0x2119, 0x213e, 0x213f + - t: "двойное" # (en: 'double struck') + - spell: "translate('.', 'ℍℙℾℿ', 'HPΓΠ')" +- "ℎ": [t: "постоянная Планка"] # 0x210e (en: 'Planck constant') +- "ℏ": [t: "постоянная Планка с чертой"] # 0x210f (en: 'h-bar') + +- "ℐℒ℘ℬℰℱℳ": # 0x2110, 0x2112, 0x2118, 0x2130, 0x2131, 0x2133 + - t: "рукописное" # (en: 'script') + - spell: "translate('.', 'ℐℒ℘ℬℰℱℳ', 'ILPBEFM')" + +- "ℓ": [t: "рукописная l"] # 0x2113 (en: 'script l') +- "℔": [t: "фунт"] # 0x2114 (en: 'pound') +- "№": [t: "номер"] # 0x2116 (en: 'numero') +- "℥": [t: "унция"] # 0x2125 (en: 'ounce') +- "Ω": [t: "ом"] # 0x2126 (en: 'ohm') +- "℧": [t: "сименс"] # 0x2127 (en: 'mho') +- "℩": [t: "перевёрнутая йота"] # 0x2129 (en: 'turned iota') +- "K": [t: "кельвин"] # 0x212a (en: 'kelvin') +- "Å": [t: "ангстрем"] # 0x212b (en: 'angstrom') +- "ℯ": [t: "рукописная e"] # 0x212f (en: 'script e') + +- "Ⅎ℺⅁⅂⅃⅄": # 0x2132, 0x213a, 0x2141, 0x2142, 0x2143, 0x2144 + - test: + - if: "'.' = '℺'" + then: [t: "повёрнутое"] # (en: 'rotated') + - else_if: "'.' = 'Ⅎ'" + then: [t: "перевёрнутое"] # (en: 'turned') + - else_if: "'.' = '⅃'" + then: [t: "обратное без засечек"] # (en: 'reversed sans-serif') + else: [t: "повёрнутое без засечек"] # (en: 'turned sans-serif') + - spell: "translate('.', 'Ⅎ℺⅁⅂⅃⅄', 'FQGLLY')" + +- "ℴ": [t: "рукописная o"] # 0x2134 (en: 'script o') +- "ℵ": [t: "алеф"] # 0x2135 (en: 'alef') +- "ℶ": [t: "бет"] # 0x2136 (en: 'bet') +- "ℷ": [t: "гимель"] # 0x2137 (en: 'gimel') +- "ℸ": [t: "далет"] # 0x2138 (en: 'dalet') +- "ℼ": [t: "двойное пи"] # 0x213c (en: 'double-struck pi') +- "ℽ": [t: "двойная гамма"] # 0x213d (en: 'double-struck gamma') +- "⅀": [t: "двойная сумма"] # 0x2140 (en: 'double-struck n-ary summation') +- "⅋": [t: "перевёрнутый амперсанд"] # 0x214b (en: 'turned ampersand') +- "⅌": [t: "на"] # 0x214c (en: 'per') +- "ⅎ": [t: "перевёрнутая f"] # 0x214e (en: 'turned f') +- "¼": [t: "одна четверть"] # 0x00bc (en: 'one quarter') +- "½": [t: "одна вторая"] # 0x00bd (en: 'one half') +- "¾": [t: "три четверти"] # 0x00be (en: 'three quarters') +- "⅐": [t: "одна седьмая"] # 0x2150 (en: 'one seventh') +- "⅑": [t: "одна девятая"] # 0x2151 (en: 'one ninth') +- "⅒": [t: "одна десятая"] # 0x2152 (en: 'one tenth') +- "⅓": [t: "одна треть"] # 0x2153 (en: 'one third') +- "⅔": [t: "две трети"] # 0x2154 (en: 'two thirds') +- "⅕": [t: "одна пятая"] # 0x2155 (en: 'one fifth') +- "⅖": [t: "две пятых"] # 0x2156 (en: 'two fifths') +- "⅗": [t: "три пятых"] # 0x2157 (en: 'three fifths') +- "⅘": [t: "четыре пятых"] # 0x2158 (en: 'four fifths') +- "⅙": [t: "одна шестая"] # 0x2159 (en: 'one sixth') +- "⅚": [t: "пять шестых"] # 0x215a (en: 'five sixths') +- "⅛": [t: "одна восьмая"] # 0x215b (en: 'one eighth') +- "⅜": [t: "три восьмых"] # 0x215c (en: 'three eighths') +- "⅝": [t: "пять восьмых"] # 0x215d (en: 'five eighths') +- "⅞": [t: "семь восьмых"] # 0x215e (en: 'seven eighths') +- "⅟": [t: "один"] # 0x215f (en: 'one over') +- "Ⅰ": [t: "один"] # 0x2160 (римская цифра) +- "Ⅱ": [t: "два"] # 0x2161 +- "Ⅲ": [t: "три"] # 0x2162 +- "Ⅳ": [t: "четыре"] # 0x2163 +- "Ⅴ": [t: "пять"] # 0x2164 +- "Ⅵ": [t: "шесть"] # 0x2165 +- "Ⅶ": [t: "семь"] # 0x2166 +- "Ⅷ": [t: "восемь"] # 0x2167 +- "Ⅸ": [t: "девять"] # 0x2168 +- "Ⅹ": [t: "десять"] # 0x2169 +- "Ⅺ": [t: "одиннадцать"] # 0x216a +- "Ⅻ": [t: "двенадцать"] # 0x216b +- "Ⅼ": [t: "пятьдесят"] # 0x216c +- "Ⅽ": [t: "сто"] # 0x216d +- "Ⅾ": [t: "пятьсот"] # 0x216e +- "Ⅿ": [t: "тысяча"] # 0x216f +- "ⅰ": [t: "один"] # 0x2170 +- "ⅱ": [t: "два"] # 0x2171 +- "ⅲ": [t: "три"] # 0x2172 +- "ⅳ": [t: "четыре"] # 0x2173 +- "ⅴ": [t: "пять"] # 0x2174 +- "ⅵ": [t: "шесть"] # 0x2175 +- "ⅶ": [t: "семь"] # 0x2176 +- "ⅷ": [t: "восемь"] # 0x2177 +- "ⅸ": [t: "девять"] # 0x2178 +- "ⅹ": [t: "десять"] # 0x2179 +- "ⅺ": [t: "одиннадцать"] # 0x217a +- "ⅻ": [t: "двенадцать"] # 0x217b +- "ⅼ": [t: "пятьдесят"] # 0x217c +- "ⅽ": [t: "сто"] # 0x217d +- "ⅾ": [t: "пятьсот"] # 0x217e +- "ⅿ": [t: "тысяча"] # 0x217f +- "↉": [t: "ноль третьих"] # 0x2189 (en: 'zero thirds') +- "←": [t: "стрелка влево"] # 0x2190 +- "↑": [t: "стрелка вверх"] # 0x2191 +- "→": [t: "стрелка вправо"] # 0x2192 +- "↓": [t: "стрелка вниз"] # 0x2193 +- "↔": [t: "стрелка влево-вправо"] # 0x2194 +- "↕": [t: "стрелка вверх-вниз"] # 0x2195 +- "↖": [t: "стрелка северо-запад"] # 0x2196 +- "↗": # 0x2197 + - test: + if: "ancestor::*[2][self::m:limit]" + then: [t: "стремится снизу"] # (en: 'approaches from below') + else: [t: "стрелка северо-восток"] # 0x2197 +- "↘": # 0x2198 + - test: + if: "ancestor::*[2][self::m:limit]" + then: [t: "стремится сверху"] # (en: 'approaches from above') + else: [t: "стрелка юго-восток"] # 0x2198 +- "↙": [t: "стрелка юго-запад"] # 0x2199 +- "↚": [t: "стрелка влево с чертой"] # 0x219a +- "↛": [t: "стрелка вправо с чертой"] # 0x219b +- "↜": [t: "стрелка влево волнистая"] # 0x219c +- "↝": [t: "стрелка вправо волнистая"] # 0x219d +- "↞": [t: "стрелка влево с двумя головками"] # 0x219e +- "↟": [t: "стрелка вверх с двумя головками"] # 0x219f +- "↠": [t: "стрелка вправо с двумя головками"] # 0x21a0 +- "↡": [t: "стрелка вниз с двумя головками"] # 0x21a1 +- "↢": [t: "стрелка влево с хвостом"] # 0x21a2 +- "↣": [t: "стрелка вправо с хвостом"] # 0x21a3 +- "↤": [t: "стрелка влево от черты"] # 0x21a4 +- "↥": [t: "стрелка вверх от черты"] # 0x21a5 +- "↦": [t: "стрелка вправо от черты"] # 0x21a6 +- "↧": [t: "стрелка вниз от черты"] # 0x21a7 +- "↨": [t: "стрелка вверх-вниз с основанием"] # 0x21a8 +- "↩": [t: "стрелка влево с крючком"] # 0x21a9 +- "↪": [t: "стрелка вправо с крючком"] # 0x21aa +- "↫": [t: "стрелка влево с петлей"] # 0x21ab +- "↬": [t: "стрелка вправо с петлей"] # 0x21ac +- "↭": [t: "стрелка влево-вправо волнистая"] # 0x21ad +- "↮": [t: "стрелка влево-вправо с чертой"] # 0x21ae +- "↯": [t: "стрелка зигзаг вниз"] # 0x21af +- "↰": [t: "стрелка вверх с наконечником влево"] # 0x21b0 +- "↱": [t: "стрелка вверх с наконечником вправо"] # 0x21b1 +- "↲": [t: "стрелка вниз с наконечником влево"] # 0x21b2 +- "↳": [t: "стрелка вниз с наконечником вправо"] # 0x21b3 +- "↴": [t: "стрелка вправо с углом вниз"] # 0x21b4 +- "↵": [t: "стрелка вниз с углом влево"] # 0x21b5 +- "↶": [t: "полукруг против часовой стрелки сверху"] # 0x21b6 +- "↷": [t: "полукруг по часовой стрелке сверху"] # 0x21b7 +- "↸": [t: "стрелка северо-запад к длинной черте"] # 0x21b8 +- "↹": [t: "стрелка влево к черте над стрелкой вправо к черте"] # 0x21b9 +- "↺": [t: "разомкнутый круг против часовой стрелки"] # 0x21ba +- "↻": [t: "разомкнутый круг по часовой стрелке"] # 0x21bb +- "↼": [t: "левый гарпун вверх"] # 0x21bc +- "↽": [t: "левый гарпун вниз"] # 0x21bd +- "↾": [t: "правый гарпун вверх"] # 0x21be +- "↿": [t: "левый гарпун вверх"] # 0x21bf (дубль? в оригинале было 'up harpoon left') +- "⇀": [t: "правый гарпун вверх"] # 0x21c0 +- "⇁": [t: "правый гарпун вниз"] # 0x21c1 +- "⇂": [t: "правый гарпун вниз"] # 0x21c2 (дубль? в оригинале 'down harpoon right') +- "⇃": [t: "левый гарпун вниз"] # 0x21c3 +- "⇄": [t: "стрелка вправо над стрелкой влево"] # 0x21c4 +- "⇅": [t: "стрелка вверх слева от стрелки вниз"] # 0x21c5 +- "⇆": [t: "стрелка влево над стрелкой вправо"] # 0x21c6 +- "⇇": [t: "две стрелки влево"] # 0x21c7 +- "⇈": [t: "две стрелки вверх"] # 0x21c8 +- "⇉": [t: "две стрелки вправо"] # 0x21c9 +- "⇊": [t: "две стрелки вниз"] # 0x21ca +- "⇋": [t: "левый гарпун над правым гарпуном"] # 0x21cb +- "⇌": [t: "правый гарпун над левым гарпуном"] # 0x21cc diff --git a/Rules/Languages/ru/unicode.yaml b/Rules/Languages/ru/unicode.yaml index ba904886..3fe44005 100644 --- a/Rules/Languages/ru/unicode.yaml +++ b/Rules/Languages/ru/unicode.yaml @@ -30,7 +30,7 @@ if: "$SpeechOverrides_CapitalLetters = ''" then_test: if: "$Impairment = 'Blindness'" - then: [t: "пропусков"] # (en: 'cap', google translation) + then: [t: "большая"] # (en: 'cap', google translation) else: [x: "$SpeechOverrides_CapitalLetters"] - pitch: value: "$CapitalLetters_Pitch" @@ -53,7 +53,7 @@ if: "$SpeechOverrides_CapitalLetters = ''" then_test: if: "$Impairment = 'Blindness'" - then: [t: "пропусков"] # (en: 'cap', google translation) + then: [t: "большая"] # (en: 'cap', google translation) else: [x: "$SpeechOverrides_CapitalLetters"] - pitch: value: "$CapitalLetters_Pitch" @@ -69,32 +69,32 @@ if: "ancestor-or-self::*[contains(@data-intent-property, ':literal:')]" then_test: if: "$Verbosity = 'Terse'" - then: [t: "хлопнуть"] # 0x21 (en: 'bang', google translation) + then: [t: "восклицательный знак"] # 0x21 (en: 'bang', google translation) else: [t: "восклицательный знак"] # 0x21 (en: 'exclamation point', google translation) else: [t: "факториал"] # 0x21 (en: 'factorial', google translation) - "\"": [t: "кавычка"] # 0x22 (en: 'quotation mark', google translation) - - "#": [t: "число"] # 0x23 (en: 'number', google translation) + - "#": [t: "номер"] # 0x23 (en: 'number', google translation) - "$": [t: "доллар"] # 0x24 (en: 'dollars', google translation) - "%": [t: "процент"] # 0x25 (en: 'percent') - - "&": [t: "ampersand"] # 0x26 (google translation) + - "&": [t: "амперсанд"] # 0x26 (google translation) - "'": [t: "штрих"] # 0x27 (en: 'apostrophe') - "(": # 0x28 - test: if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak' then_test: if: "$Verbosity='Terse'" - then: [t: "открыть"] # 0x28 (en: 'open', google translation) - else: [t: "открытая скобка"] # 0x28 (en: 'open paren', google translation) - else: [t: "левая скобка"] # 0x28 (en: 'left paren', google translation) + then: [t: "скобка открывается"] # 0x28 (en: 'open', google translation) + else: [t: "открывающая круглая скобка"] # 0x28 (en: 'open paren', google translation) + else: [t: "левая круглая скобка"] # 0x28 (en: 'left paren', google translation) - ")": # 0x29 - test: if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak' then_test: if: "$Verbosity='Terse'" - then: [t: "закрывать"] # 0x29 (en: 'close', google translation) - else: [t: "закрыть скобку"] # 0x29 (en: 'close paren', google translation) - else: [t: "правильная скобка"] # 0x29 (en: 'right paren', google translation) + then: [t: "скобка закрывается"] # 0x29 (en: 'close', google translation) + else: [t: "закрывающая круглая скобка"] # 0x29 (en: 'close paren', google translation) + else: [t: "правая круглая скобка"] # 0x29 (en: 'right paren', google translation) - "*": # 0x2a test: @@ -114,7 +114,7 @@ # except if expression starts with '…' - "../*[1][.='…'] " then: - - T: "comma" # (en: 'comma', google translation) + - T: "запятая" # (en: 'comma', google translation) - test: if: "$Verbosity != Terse" then: [pause: short] @@ -132,44 +132,44 @@ - "<": # 0x3c - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "меньше" # (en: 'less than') - "=": # 0x3d - test: if: "$Verbosity!='Terse'" - then: [t: "равен"] # (en: 'is equal to', google translation) + then: [t: "равно"] # (en: 'is equal to', google translation) else: [t: "равно"] # (en: 'equals') - ">": # 0x3e - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "больше" # (en: 'greater than') - - "?": [t: "знак вопроса"] # 0x3f (en: 'question mark', google translation) - - "@": [t: "на знаке"] # 0x40 (en: 'at sign', google translation) + - "?": [t: "вопросительный знак"] # 0x3f (en: 'question mark', google translation) + - "@": [t: "собака"] # 0x40 (en: 'at sign', google translation) - "[": # 0x5b - test: if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak' - then: [t: "открытый кронштейн"] # (en: 'open bracket', google translation) - else: [t: "левый кронштейн"] # (en: 'left bracket', google translation) - - "\\": [t: "обратная черта"] # 0x5c (en: 'back slash', google translation) + then: [t: "открывающая квадратная скобка"] # (en: 'open bracket', google translation) + else: [t: "левая квадратная скобка"] # (en: 'left bracket', google translation) + - "\\": [t: "обратная косая черта"] # 0x5c (en: 'back slash', google translation) - "]": # 0x5d - test: if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak' - then: [t: "близкий кронштейн"] # (en: 'close bracket', google translation) - else: [t: "правый кронштейн"] # (en: 'right bracket', google translation) + then: [t: "закрывающая квадратная скобка"] # (en: 'close bracket', google translation) + else: [t: "правая квадратная скобка"] # (en: 'right bracket', google translation) - "^": # 0x5e - test: if: "parent::m:modified-variable or parent::m:mover" - then: [t: "шляп"] # (en: 'hat', google translation) - else: [t: "каретка"] # (en: 'caret', google translation) - - "_": [t: "под баром"] # 0x5f (en: 'under bar', google translation) - - "`": [t: "могила"] # 0x60 (en: 'grave', google translation) + then: [t: "крышка"] # (en: 'hat', google translation) + else: [t: "крышка"] # (en: 'caret', google translation) + - "_": [t: "подчёркивание"] # 0x5f (en: 'under bar', google translation) + - "`": [t: "гравис"] # 0x60 (en: 'grave', google translation) - "{": # 0x7b - test: if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak' - then: [t: "открытая скоба"] # (en: 'open brace', google translation) - else: [t: "оставленный скоба"] # (en: 'left brace', google translation) + then: [t: "открывающая фигурная скобка"] # (en: 'open brace', google translation) + else: [t: "левая фигурная скобка"] # (en: 'left brace', google translation) - "|": # 0x7c # note: for ClearSpeak and SimpleSpeak, "|" inside of sets is handled at the mrow level, same for 'sets' - with: @@ -179,23 +179,23 @@ - if: "$SpeechStyle != 'ClearSpeak'" then_test: if: "$DefaultToGiven" - then: [t: "данный"] # (en: 'given', google translation) + then: [t: "при условии"] # (en: 'given', google translation) else: [t: "вертикальная черта"] # (en: 'vertical line') - else_if: "not(preceding-sibling::*) or not(following-sibling::*)" - then: [t: "вертикальная линия"] # (en: 'vertical line', google translation) + then: [t: "вертикальная черта"] # (en: 'vertical line', google translation) - else_if: "$ClearSpeak_VerticalLine = 'SuchThat'" - then: [t: "так что"] # (en: 'such that', google translation) + then: [t: "такой, что"] # (en: 'such that', google translation) - else_if: "$ClearSpeak_VerticalLine = 'Given' or $DefaultToGiven" - then: [t: "данный"] # (en: 'given', google translation) + then: [t: "при условии"] # (en: 'given', google translation) - else: [t: "вертикальная черта"] # (en: 'divides') - "}": # 0x7d - test: if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak' - then: [t: "близкая скоба"] # (en: 'close brace', google translation) - else: [t: "правая скоба"] # (en: 'right brace', google translation) + then: [t: "закрывающая фигурная скобка"] # (en: 'close brace', google translation) + else: [t: "правая фигурная скобка"] # (en: 'right brace', google translation) - - "~": [t: "тилде"] # 0x7e (en: 'tilde', google translation) + - "~": [t: "тильда"] # 0x7e (en: 'tilde', google translation) - " ": # 0xa0 - test: # could be mtext in mtd or mtext in an mrow that is a concatenation of mtd's. Is there a better solution? @@ -203,10 +203,10 @@ then: [t: "пустой"] # want to say something for fraction (etc) with empty child (en: 'empty', google translation) else: [t: ""] - - "¬": [t: "нет"] # 0xac (en: 'not', google translation) + - "¬": [t: "не"] # 0xac (en: 'not', google translation) - "°": [t: "градусы"] # 0xb0 (en: 'degrees', google translation) - "±": [t: "плюс минус"] # 0xb1 (en: 'plus or minus') - - "´": [t: "острый"] # 0xb4 (en: 'acute', google translation) + - "´": [t: "акут"] # 0xb4 (en: 'acute', google translation) - "·": # 0xB7 - test: if: "$SpeechStyle = 'LiteralSpeak' or not($SpeechStyle = 'ClearSpeak' and $ClearSpeak_MultSymbolDot = 'Auto')" @@ -221,14 +221,14 @@ then: [t: "к"] # (en: 'by', google translation) else: [t: "умножить"] # (en: 'cross') - "÷": [t: "разделить на"] # 0xf7 (en: 'divided by') - - "̀": [t: "могильный акцент украшения"] # 0x300 (en: 'grave accent embellishment', google translation) - - "́": [t: "острый акцентный украшение"] # 0x301 (en: 'acute accent embellishment', google translation) - - "̂": [t: "окружающий акцент украшения"] # 0x302 (en: 'circumflex accent embellishment', google translation) - - "̃": [t: "тильде украшает"] # 0x303 (en: 'tilde embellishment', google translation) - - "̄": [t: "макрон украшает"] # 0x304 (en: 'macron embellishment', google translation) - - "̅": [t: "вручительская варенья"] # 0x305 (en: 'overbar embellishment', google translation) + - "̀": [t: "знак грависа"] # 0x300 (en: 'grave accent embellishment', google translation) + - "́": [t: "акут"] # 0x301 (en: 'acute accent embellishment', google translation) + - "̂": [t: "циркумфлекс"] # 0x302 (en: 'circumflex accent embellishment', google translation) + - "̃": [t: "тильда"] # 0x303 (en: 'tilde embellishment', google translation) + - "̄": [t: "макрон"] # 0x304 (en: 'macron embellishment', google translation) + - "̅": [t: "надчёркивание"] # 0x305 (en: 'overbar embellishment', google translation) - "̆": [t: "бреве"] # 0x306 (en: 'breve', google translation) - - "̇": [t: "точка над украшением"] # 0x307 (en: 'dot above embellishment', google translation) + - "̇": [t: "точка сверху"] # 0x307 (en: 'dot above embellishment', google translation) # Note: ClearSpeak has pref TriangleSymbol for "Δ", but that is wrong - "Α-Ω": @@ -244,7 +244,7 @@ if: "$SpeechOverrides_CapitalLetters = ''" then_test: if: "$Impairment = 'Blindness'" - then: [t: "пропусков"] # (en: 'cap', google translation) + then: [t: "большая"] # (en: 'cap', google translation) else: [x: "$SpeechOverrides_CapitalLetters"] - pitch: value: "$CapitalLetters_Pitch" @@ -278,13 +278,13 @@ - "ω": [t: "омега"] # 0x3c9 (en: 'omega') - "ϕ": [t: "фи"] # 0x3d5 (en: 'phi') - "ϖ": [t: "пи"] # 0x3d6 (en: 'pi') - - "ϵ": [t: "полулунный эпсилон"] # 0x3f5 (en: 'epsilon') - - "϶": [t: "обратный полулунный эпсилон"] # 0x3f6 (en: 'reversed epsilon') + - "ϵ": [t: "эпсилон"] # 0x3f5 (en: 'epsilon') + - "϶": [t: "обратный эпсилон"] # 0x3f6 (en: 'reversed epsilon') - - "–": [t: "en dash"] # 0x2013 (google translation) - - "—": [t: "em dash"] # 0x2014 (google translation) - - "―": [t: "горизонтальный батончик"] # 0x2015 (en: 'horizontal bar', google translation) - - "‖": [t: "двойная вертикальная линия"] # 0x2016 (en: 'double vertical line', google translation) + - "–": [t: "короткое тире"] # 0x2013 (google translation) + - "—": [t: "длинное тире"] # 0x2014 (google translation) + - "―": [t: "горизонтальная черта"] # 0x2015 (en: 'horizontal bar', google translation) + - "‖": [t: "двойная вертикальная черта"] # 0x2016 (en: 'double vertical line', google translation) - "…": # 0x2026 test: if: @@ -296,14 +296,14 @@ else_test: # must have $ClearSpeak_Ellipses = 'AndSoOn' if: "count(following-sibling::*) = 0" then: [t: "и так далее"] # (en: 'and so on', google translation) - else: [t: "и так далее"] # (en: 'and so on up to', google translation) + else: [t: "и так далее до"] # (en: 'and so on up to', google translation) - "⁡": # 0x2061 - test: # skip saying "of" when Terse and a trig function, when it is a shape (does this happen?), or we are in :literal mode if: "not($Verbosity='Terse' and preceding-sibling::*[1][IsInDefinition(., 'TrigFunctionNames')]) and not(preceding-sibling::*[1][IsInDefinition(., 'GeometryShapes')]) and not(@data-changed='added' and ancestor-or-self::*[contains(@data-intent-property, ':literal:')])" - then: [t: "из"] # (en: 'of', google translation) + then: [t: "от"] # (en: 'of', google translation) - "⁢": [t: ""] # 0x2062 - "⁣": [t: ""] # 0x2063 - "⁤": [t: "и"] # 0x2064 (en: 'and', google translation) @@ -312,24 +312,24 @@ - "‴": [t: "тройной штрих"] # 0x2034 (en: 'triple prime') - "ℂℕℚℝℤ": # here we rely on this running through the table again to speak "cap xxx" - - t: "тройной штрих" # (en: 'double-struck') + - t: "двойное" # (en: 'double-struck') - spell: "translate('.', 'ℂℕℚℝℤ', 'CNQRZ')" - - "℃": [t: "градусы по цельсию"] # 0x2103 (en: 'degrees celsius', google translation) - - "℉": [t: "степени фаренгейт"] # 0x2109 (en: 'degrees fahrenheit', google translation) + - "℃": [t: "градусы цельсия"] # 0x2103 (en: 'degrees celsius', google translation) + - "℉": [t: "градусы фаренгейта"] # 0x2109 (en: 'degrees fahrenheit', google translation) - "ℋℛℓ": # 0x210b - - t: "сценарий" # (en: 'script', google translation) + - t: "рукописное" # (en: 'script', google translation) - spell: "translate('.', 'ℋℛℓ', 'HRl')" - - "ℎ": [t: "постоянная планка"] # 0x210e (en: 'planck constant', google translation) + - "ℎ": [t: "постоянная Планка"] # 0x210e (en: 'planck constant', google translation) - "ℜ": # 0x211c - - t: "фрактур" # (en: 'fraktur', google translation) + - t: "готическая" # (en: 'fraktur', google translation) - spell: "'R'" - "Ω": [t: "ом"] # 0x2126 (en: 'ohms', google translation) - "K": [t: "кельвин"] # 0x212a (en: 'kelvin', google translation) - - "Å": [t: "ангстры"] # 0x212b (en: 'angstroms', google translation) + - "Å": [t: "ангстрем"] # 0x212b (en: 'angstroms', google translation) - "ⅆⅇⅈⅉ": # 0x2146-9 - - t: "дважды поразил курсив" # (en: 'double-struck italic', google translation) + - t: "двойной курсив" # (en: 'double-struck italic', google translation) - spell: "translate('.', 'ⅆⅇⅈⅉ', 'deij')" - "←": [t: "стрелка влево"] # 0x2190 (en: 'leftwards arrow', google translation) @@ -337,7 +337,7 @@ - "→": # 0x2192 - test: if: "ancestor::*[2][self::m:limit]" - then: [t: "подходы"] # (en: 'approaches', google translation) + then: [t: "стремится к"] # (en: 'approaches', google translation) else: [t: "стрелка вправо"] # (en: 'right arrow', google translation) - "↓": [t: "стрелка вниз"] # 0x2193 (en: 'downwards arrow', google translation) @@ -346,7 +346,7 @@ - "∂": # 0x2202 - test: if: "$Verbosity='Terse'" - then: [t: "частично"] # (en: 'partial', google translation) + then: [t: "частная производная"] # (en: 'partial', google translation) else: [t: "частный дифференциал"] # (en: 'partial derivative') - "∃": [t: "существует"] # 0x2203 (en: 'there exists') - "∄": [t: "не существует"] # 0x2204 (en: 'there does not exist') @@ -354,7 +354,7 @@ - "∆": # 0x2206 - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # (en: 'the', google translation) + then: [t: ""] # (en: 'the', google translation) - t: "инкремент" # (en: 'laplacian of') - "∈": # 0x2208 - test: @@ -362,7 +362,7 @@ then: - test: if: "$Verbosity!='Terse' and not(ancestor::*[self::m:set])" # "the set x is an element of ..." sounds bad" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "принадлежит" # (en: 'an element of') # Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option else_test: @@ -377,7 +377,7 @@ - else: [t: "принадлежит"] # $ClearSpeak_SetMemberSymbol = 'Belongs' (en: 'belonging to') else_test: - if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member' - then: [t: "является членом"] # (en: 'is a member of', google translation) + then: [t: "член"] # (en: 'is a member of', google translation) - else_if: $ClearSpeak_SetMemberSymbol = 'Element' then: [t: "элемент"] # (en: 'is an element of', google translation) - else_if: $ClearSpeak_SetMemberSymbol = 'In' @@ -390,7 +390,7 @@ then: - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "не принадлежит" # (en: 'not an element of') # Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option else_test: @@ -405,7 +405,7 @@ - else: [t: "не принадлежит"] # $ClearSpeak_SetMemberSymbol = 'Belongs' (en: 'not belonging to') else_test: - if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member' - then: [t: "не является членом"] # (en: 'is not a member of', google translation) + then: [t: "не член"] # (en: 'is not a member of', google translation) - else_if: $ClearSpeak_SetMemberSymbol = 'Element' then: [t: "не элемент"] # (en: 'is not an element of', google translation) - else_if: $ClearSpeak_SetMemberSymbol = 'In' @@ -417,7 +417,7 @@ then: - test: if: "$Verbosity!='Terse' and not(ancestor::*[self::m:set])" # "the set x is an element of ..." sounds bad" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "малое принадлежит" # (en: 'an element of') # Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option else_test: @@ -432,7 +432,7 @@ - else: [t: "малое принадлежит"] # $ClearSpeak_SetMemberSymbol = 'Belongs' (en: 'belonging to') else_test: - if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member' - then: [t: "является членом"] # (en: 'is a member of', google translation) + then: [t: "член"] # (en: 'is a member of', google translation) - else_if: $ClearSpeak_SetMemberSymbol = 'Element' then: [t: "элемент"] # (en: 'is an element of', google translation) - else_if: $ClearSpeak_SetMemberSymbol = 'In' @@ -443,33 +443,33 @@ - "∑": [t: "эн-арная сумма"] # 0x2211 (en: 'sum') - "−": [t: "минус"] # 0x2212 (en: 'minus') - "∓": [t: "минус плюс"] # 0x2213 (en: 'minus or plus') - - "∗": [t: "оператор звёздочка"] # 0x2217 (en: 'times') - - "∘": [t: "кольцо"] # 0x2218 (en: 'composed with') + - "∗": [t: "звёздочка"] # 0x2217 (en: 'times') + - "∘": [t: "композиция"] # 0x2218 (en: 'composed with') - "√": # 0x221a - test: if: "$Verbosity!='Terse'" - then: [t: "а"] # (en: 'the', google translation) + then: [t: ""] # (en: 'the', google translation) - t: "квадратный корень" # (en: 'square root of') - "∝": # 0x221d - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "пропорционально" # (en: 'proportional to') - "∞": [t: "бесконечность"] # 0x221e (en: 'infinity') - - "∟": [t: "правый угол"] # 0x221f (en: 'right angle') + - "∟": [t: "прямой угол"] # 0x221f (en: 'right angle') - "∠": [t: "угол"] # 0x2220 (en: 'angle') - - "∡": [t: "измеримый угол"] # 0x2221 (en: 'measured angle') + - "∡": [t: "измеренный угол"] # 0x2221 (en: 'measured angle') - "∣": [t: "делит"] # 0x2223 (en: 'divides') - "∤": [t: "не делит"] # 0x2224 (en: 'does not divide') - "∥": # 0x2225 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "параллельно" # (en: 'parallel to') - "∦": # 0x2226 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "не параллельно" # (en: 'not parallel to') - "∧": [t: "логическое и"] # 0x2227 (en: 'and') - "∨": [t: "логическое или"] # 0x2228 (en: 'or') @@ -482,7 +482,7 @@ - "∶": # 0x2236 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "отношение" # (en: 'to') - "∷": [t: "пропорция"] # 0x2237 (en: 'as') - "∼": [t: "тильда"] # 0x223c (en: 'varies with') @@ -490,28 +490,28 @@ - "∾": # 0x223e - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) - - t: "перевёрнутая плавная s" # (en: 'most positive') + then: [t: ""] # (en: 'is', google translation) + - t: "изогнутая s" # (en: 'most positive') - "∿": [t: "синусоидальная волна"] # 0x223f (en: 'sine wave') - "≠": # 0x2260 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "не равно" # (en: 'not equal to') - "≡": # 0x2261 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "тождественно равно" # (en: 'identical to') - "≤": # 0x2264 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) - - t: "less than or equal to" + then: [t: ""] # (en: 'is', google translation) + - t: "меньше или равно" - "≥": # 0x2265 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "больше или равно" # (en: 'greater than or equal to') - "≦": [t: "меньше над равно"] # 0x2266 (en: 'less than over equal to') - "≧": [t: "больше над равно"] # 0x2267 (en: 'greater than over equal to') @@ -520,30 +520,30 @@ - "⊂": # 0x2282 - test: if: "$Verbosity!='Terse'" - then: [t: "является а"] # (en: 'is a', google translation) + then: [t: ""] # (en: 'is a', google translation) - t: "подмножество" # (en: 'subset of') - "⊃": # 0x2283 - test: if: "$Verbosity!='Terse'" - then: [t: "является а"] # (en: 'is a', google translation) + then: [t: ""] # (en: 'is a', google translation) - t: "надмножество" # (en: 'superset of') - "⊄": # 0x2284 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "не подмножество" # (en: 'not a subset of') - "⊅": # 0x2285 - test: if: "$Verbosity!='Terse'" - then: [t: "является"] # (en: 'is', google translation) + then: [t: ""] # (en: 'is', google translation) - t: "не надмножество" # (en: 'not a superset of') - "⊆": # 0x2286 - test: if: "$Verbosity!='Terse'" - then: [t: "является а"] # (en: 'is a', google translation) + then: [t: ""] # (en: 'is a', google translation) - t: "подмножество или равно" # (en: 'subset of or equal to') - "⊇": # 0x2287 - test: if: "$Verbosity!='Terse'" - then: [t: "является а"] # (en: 'is a', google translation) + then: [t: ""] # (en: 'is a', google translation) - t: "надмножество или равно" # (en: 'superset of or equal to') diff --git a/tests/Languages/ru.rs b/tests/Languages/ru.rs new file mode 100644 index 00000000..0d3a8508 --- /dev/null +++ b/tests/Languages/ru.rs @@ -0,0 +1,43 @@ +#![allow(non_snake_case)] + +use crate::common::*; +use anyhow::Result; + +mod ClearSpeak { + use crate::common::*; + use anyhow::Result; + + mod functions; + mod large_ops; + mod menclose; + mod mfrac; + mod mroot; + mod msup; + mod sets; + mod symbols_and_adornments; + mod multiline; +} + +mod SimpleSpeak { + use crate::common::*; + use anyhow::Result; + + mod functions; + mod large_ops; + // mod menclose; + mod mfrac; + // mod mroot; + mod msup; + mod sets; + mod geometry; + mod linear_algebra; + mod multiline; + mod subscripts; +} + +mod shared; +mod units; +mod chemistry; +mod alphabets; +mod intent; +mod mtable; \ No newline at end of file diff --git a/tests/Languages/ru/ClearSpeak/functions.rs b/tests/Languages/ru/ClearSpeak/functions.rs new file mode 100644 index 00000000..27b2de58 --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/functions.rs @@ -0,0 +1,450 @@ +/// Tests for: +/// * functions including trig functions, logs, and functions to powers +/// * implied times/functional call and explicit times/function call +/// * parens +/// These are all intertwined, so they are in one file +use crate::common::*; + +#[test] +fn trig_names() { + let expr = " + sinx+ + cosy+ + tanz+ + secα+ + cscϕ+ + cotφ + "; + test("ru", "ClearSpeak", expr, "синус икс плюс косинус игрек плюс тангенс зет плюс секанс альфа, плюс косеканс фи, плюс котангенс фи"); +} + +#[test] +fn hyperbolic_trig_names() { + let expr = " + sinhx+ + coshy+ + tanhz+ + sechα+ + cschϕ+ + cothφ + "; + test("ru", "ClearSpeak", expr, "гиперболический синус икс, плюс гиперболический косинус игрек, плюс гиперболический тангенс зет, плюс гиперболический секанс альфа, плюс гиперболический косеканс фи, плюс гиперболический котангенс фи"); +} + +#[test] +fn inverse_trig() { + let expr = "sin-1x"; + test("ru", "ClearSpeak", expr, "арксинус икс"); +} + +#[test] +fn inverse_trig_trig_inverse() { + let expr = "tan-1x"; + test_ClearSpeak("ru", "ClearSpeak_Trig", "TrigInverse", expr, + "обратный тангенс икс"); +} + +#[test] +fn inverse_trig_arc() { + let expr = "cosh-1x"; + test_ClearSpeak("ru", "ClearSpeak_Trig", "ArcTrig", expr, + "ареакосинус икс"); +} + +#[test] +fn trig_squared() { + let expr = "sin2x"; + test("ru", "ClearSpeak", expr, "синус в квадрате икс"); +} + +#[test] +fn trig_cubed() { + let expr = "tan3x"; + test("ru", "ClearSpeak", expr, "тангенс в кубе икс"); +} + +#[test] +fn trig_fourth() { + let expr = "sec4x"; + test("ru", "ClearSpeak", expr, "секанс в четвертой степени икс"); +} + +#[test] +fn trig_power_other() { + let expr = "sinh>n-1x"; + test("ru", "ClearSpeak", expr, "гиперболический синус икс в степени n минус 1"); +} + +#[test] +fn simple_log() { + let expr = " logx "; + test("ru", "ClearSpeak", expr, "логарифм икс"); +} + +#[test] +fn normal_log() { + let expr = "log(x+y)"; + test("ru", "ClearSpeak", expr, "логарифм от, скобка открывается икс плюс игрек, скобка закрывается"); +} + +#[test] +fn simple_log_with_base() { + let expr = " logbx "; + test("ru", "ClearSpeak", expr, "логарифм икс, по основанию бэ"); +} + +#[test] +fn normal_log_with_base() { + let expr = "logb(x+y)"; + test("ru", "ClearSpeak", expr, "логарифм скобка открывается икс плюс игрек, скобка закрывается, по основанию бэ"); +} + +#[test] +fn simple_ln() { + let expr = " lnx "; + test("ru", "ClearSpeak", expr, "эл эн икс"); +} + +#[test] +fn normal_ln() { + let expr = "ln(x+y)"; + test("ru", "ClearSpeak", expr, "эл эн от, скобка открывается икс плюс игрек, скобка закрывается"); +} + +#[test] +fn simple_natural_log() { + let expr = " lnx "; + test_ClearSpeak("ru", "ClearSpeak_Log", "LnAsNaturalLog", expr, + "натуральный логарифм икс"); +} + +#[test] +fn natural_log() { + let expr = "ln(x+y)"; + test_ClearSpeak("ru", "ClearSpeak_Log", "LnAsNaturalLog", expr, + "натуральный логарифм от, скобка открывается икс плюс игрек, скобка закрывается"); +} + +#[test] +fn explicit_function_call_with_parens() { + let expr = "t(x)"; + test("ru", "ClearSpeak", expr, "тэ от икс"); +} + +#[test] +fn explicit_times_with_parens() { + let expr = "t(x)"; + test("ru", "ClearSpeak", expr, "тэ умножить на икс"); +} + +#[test] +fn explicit_function_call() { + let expr = "tx"; + test("ru", "ClearSpeak", expr, "тэ от икс"); +} + +#[test] +fn explicit_times() { + let expr = "tx"; + test("ru", "ClearSpeak", expr, "тэ икс"); +} + +#[test] +fn test_functions_none_pref() { + let expr = " + log(x+y) + + + f(x+y) + "; + test_ClearSpeak("ru", "ClearSpeak_Functions", "None", expr, + "логарифм от, скобка открывается икс плюс игрек, скобка закрывается; плюс, эф умножить на, скобка открывается икс плюс игрек, скобка закрывается"); +} + +#[test] +fn test_functions_none_pref_multiple_args() { + let expr = " + B ( 2,6 ) + "; + test_ClearSpeak("ru", "ClearSpeak_Functions", "None", expr, + "бэ большое умножить на, скобка открывается 2 запятая 6, скобка закрывается"); +} + +/* + * Tests for times + */ +#[test] +fn no_times_binomial() { + let expr = "x y"; + test("ru", "ClearSpeak", expr, "икс игрек"); +} + +#[test] +fn times_following_paren() { + let expr = " + 2 + ( 3 ) + "; + test("ru", "ClearSpeak", expr, "2 умножить на 3"); +} + +#[test] +fn times_preceding_paren() { + let expr = " + ( 2 ) + 3 + "; + test("ru", "ClearSpeak", expr, "2 умножить на 3"); +} + +#[test] +fn times_sqrt() { + let expr = " + a + b + = + ab + "; + test("ru", "ClearSpeak", expr, "квадратный корень из а; умножить на квадратный корень из бэ; равно, квадратный корень из а бэ"); +} + +#[test] +fn more_implied_times() { + let expr = " + + + + ( + 2x + ) + 2 + + + "; + test_ClearSpeak("ru", "ClearSpeak_ImpliedTimes", "MoreImpliedTimes", expr, + "скобка 2 умножить на икс закрывается в квадрате"); +} + +#[test] +fn explicit_times_more_implied_times() { + let expr = "tx"; + test_ClearSpeak("ru", "ClearSpeak_ImpliedTimes", "MoreImpliedTimes", expr, "тэ умножить на икс"); +} + +#[test] +fn explicit_times_none_simple_right() { + let expr = "2[3 ]"; + test_ClearSpeak("ru", "ClearSpeak_ImpliedTimes", "None", + expr, "2, квадратная скобка открывается 3 квадратная скобка закрывается"); +} + +#[test] +fn explicit_times_none_simple_left() { + let expr = "(21)x"; + test_ClearSpeak("ru", "ClearSpeak_ImpliedTimes", "None", + expr, "скобка открывается 2 минус 1, скобка закрывается; икс"); +} + +#[test] +fn explicit_times_none_superscript() { + let expr = " + f(x)= +x +2 + +( + +x+1 +) + "; + test_ClearSpeak_prefs("ru", + vec![("ClearSpeak_ImpliedTimes", "None"), ("ClearSpeak_Functions", "None")], + expr, "эф скобка открывается икс скобка закрывается; равно; икс в квадрате, скобка открывается икс плюс 1, скобка закрывается"); +} + +/* + * Tests for parens + */ +#[test] +fn no_parens_number() { + let expr = " + ( + 25 + ) + x + "; + test("ru", "ClearSpeak", expr, "25 умножить на икс"); +} + +#[test] +fn no_parens_monomial() { + let expr = " + b + ( + xy + ) + "; + test("ru", "ClearSpeak", expr, "бэ, скобка открывается икс игрек скобка закрывается"); +} + +#[test] +fn no_parens_negative_number() { + let expr = " + 2+ + ( + 2 + ) + "; + test("ru", "ClearSpeak", expr, "2 плюс минус 2"); +} + +#[test] +fn no_parens_negative_number_with_var() { + let expr = " + ( + 2x + ) + + +1 + "; + test("ru", "ClearSpeak", expr, "минус 2 икс, плюс 1"); +} + +#[test] +fn parens_superscript() { + let expr = " + + + + ( + 2x + ) + 2 + + + "; + test("ru", "ClearSpeak", expr, "скобка открывается 2 икс скобка закрывается в квадрате"); +} + +#[test] +fn no_parens_fraction() { + let expr = " + 2 + + + + ( + 12 + ) + "; + test("ru", "ClearSpeak", expr, "2 плюс одна вторая"); +} + +// Tests for the ten types of intervals in ClearSpeak +#[test] +fn parens_interval_open_open() { + let expr = " + ( + c,d + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от цэ до дэ, не включая цэ и дэ"); +} + +#[test] +fn parens_interval_closed_open() { + let expr = " + [ + c,d + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от цэ до дэ, включая цэ, но не включая дэ"); +} + +#[test] +fn parens_interval_open_closed() { + let expr = " + ( + c,d + ] + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от цэ до дэ, не включая цэ, но включая дэ"); +} + +#[test] +fn parens_interval_closed_closed() { + let expr = " + [ + c,d + ] + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от цэ до дэ, включая цэ и дэ"); +} + +#[test] +fn parens_interval_neg_infinity_open_open() { + let expr = " + ( + - ,d + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от минус бесконечности до дэ, не включая дэ"); +} + +#[test] +fn parens_interval_neg_infinity_closed_open() { + let expr = " + ( + - ,d + ] + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от минус бесконечности до дэ, включая дэ"); +} + +#[test] +fn parens_interval_open_open_infinity() { + let expr = " + ( + c, + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от цэ до бесконечности, не включая цэ"); +} + +#[test] +fn parens_interval_closed_open_infinity() { + let expr = " + [ + c, + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от цэ до бесконечности, включая цэ"); +} + +#[test] +fn parens_interval_neg_infinity_to_infinity() { + let expr = " + ( + - , + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от минус бесконечности до бесконечности"); +} + +#[test] +fn parens_interval_neg_infinity_to_pos_infinity() { + let expr = " + ( + - ,+ + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Paren", "Interval", expr, + "интервал от минус бесконечности до плюс бесконечности"); +} diff --git a/tests/Languages/ru/ClearSpeak/large_ops.rs b/tests/Languages/ru/ClearSpeak/large_ops.rs new file mode 100644 index 00000000..860914d8 --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/large_ops.rs @@ -0,0 +1,201 @@ +use crate::common::*; + +#[test] +fn sum_both() { + let expr = " + + + n=1 + 10 + + n + "; + test("ru", "ClearSpeak", expr, "сумма от n равно 1 до 10 от n"); +} + +#[test] +fn sum_under() { + let expr = " + + + S + + i + "; + test("ru", "ClearSpeak", expr, "сумма по эс большое от i"); +} + +#[test] +fn sum_both_msubsup() { + let expr = " + + + n=1 + 10 + + n + "; + test("ru", "ClearSpeak", expr, "сумма от n равно 1 до 10 от n"); +} + +#[test] +fn sum_sub() { + let expr = " + + + S + + i + "; + test("ru", "ClearSpeak", expr, "сумма по эс большое от i"); +} + +#[test] +fn sum() { + let expr = " + + ai + "; + test("ru", "ClearSpeak", expr, "сумма а с индексом i"); +} + +#[test] +fn product_both() { + let expr = " + + + n=1 + 10 + + n + "; + test("ru", "ClearSpeak", expr, "произведение от n равно 1 до 10 от n"); +} + +#[test] +fn product_under() { + let expr = " + + + S + + i + "; + test("ru", "ClearSpeak", expr, "произведение по эс большое от i"); +} + +#[test] +fn product() { + let expr = " + + ai + "; + test("ru", "ClearSpeak", expr, "произведение а с индексом i"); +} + +#[test] +fn intersection_both() { + let expr = " + + + i=1 + 10 + + Si + "; + test("ru", "ClearSpeak", expr, "пересечение от i равно 1 до 10 от; эс большое с индексом i"); +} + +#[test] +fn intersection_under() { + let expr = " + + + C + + Si + "; + test("ru", "ClearSpeak", expr, "пересечение по цэ большое от, эс большое с индексом i"); +} + +#[test] +fn intersection() { + let expr = " + + Si + "; + test("ru", "ClearSpeak", expr, "пересечение эс большое с индексом i"); +} + +#[test] +fn union_both() { + let expr = " + + + i=1 + 10 + + Si + "; + test("ru", "ClearSpeak", expr, "объединение от i равно 1 до 10 от; эс большое с индексом i"); +} + +#[test] +fn union_under() { + let expr = " + + + C + + Si + "; + test("ru", "ClearSpeak", expr, "объединение по цэ большое от, эс большое с индексом i"); +} + +#[test] +fn union() { + let expr = " + + Si + "; + test("ru", "ClearSpeak", expr, "объединение эс большое с индексом i"); +} + +#[test] +fn integral_both() { + let expr = " + + + + 0 + 1 + + f(x ) + + dx + "; + test("ru", "ClearSpeak", expr, "интеграл от 0 до 1 от, эф от икс; д икс"); +} + +#[test] +fn integral_under() { + let expr = " + + + + + f(x ) + dx + "; + test("ru", "ClearSpeak", expr, "интеграл по действительным числам от; эф от икс д икс"); +} + +#[test] +fn integral() { + let expr = " + + f(x ) + dx + "; + test("ru", "ClearSpeak", expr, "интеграл от эф от икс д икс"); +} diff --git a/tests/Languages/ru/ClearSpeak/menclose.rs b/tests/Languages/ru/ClearSpeak/menclose.rs new file mode 100644 index 00000000..f6cea552 --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/menclose.rs @@ -0,0 +1,193 @@ +use crate::common::*; + +#[test] +fn menclose_actuarial() { + let expr = " + 3+2i + "; + test("ru", "ClearSpeak", expr, "актуарный символ, содержащее 3 плюс 2 и конец"); +} + +#[test] +fn menclose_box() { + let expr = " + 3+2i + "; + test("ru", "ClearSpeak", expr, "рамка, окружность, содержащее 3 плюс 2 и конец"); +} + +#[test] +fn menclose_left() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "линия слева, содержащее три вторых конец"); +} + +#[test] +fn menclose_right() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "линия справа, содержащее три вторых конец"); +} + +#[test] +fn menclose_top_bottom() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "линия сверху, снизу, содержащее три вторых конец"); +} + +#[test] +fn menclose_updiagonalstrike() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "диагональ вверх, перечеркивание, содержащее три вторых конец"); +} + +#[test] +fn menclose_downdiagonalstrike() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "диагональ вниз, перечеркивание, содержащее три вторых конец"); +} + +#[test] +fn menclose_cross_out() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "икс, перечеркивание, содержащее три вторых конец"); +} + +#[test] +fn menclose_vertical_horizontal_strike() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "вертикальная, горизонтальная, перечеркивание, содержащее три вторых конец"); +} + +#[test] +fn menclose_leftarrow() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "стрелка влево, содержащее три вторых конец"); +} + +#[test] +fn menclose_right_up_down_arrow() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "стрелка вверх, стрелка вниз, стрелка вправо, содержащее три вторых конец"); +} + +#[test] +fn menclose_northeastarrow() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "стрелка на северо-восток, содержащее три вторых конец"); +} + +#[test] +fn menclose_other_single_arrows() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "стрелка на юго-восток, стрелка на юго-запад, стрелка на северо-запад, содержащее три вторых конец"); +} + +#[test] +fn menclose_northwestsoutheastarrow() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "двунаправленная диагональная стрелка вниз, содержащее три вторых конец"); +} + +#[test] +fn menclose_other_double_arrows() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "двунаправленная вертикальная стрелка, двунаправленная горизонтальная стрелка, двунаправленная диагональная стрелка вверх, содержащее три вторых конец"); +} + +#[test] +fn menclose_madrub() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "арабский символ факториала, содержащее три вторых конец"); +} + +#[test] +fn menclose_phasorangle() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "угол фазы, содержащее три вторых конец"); +} + +#[test] +fn menclose_circle_phasorangle() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "окружность, угол фазы, содержащее три вторых конец"); +} + +#[test] +fn menclose_longdiv() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "знак деления уголком, содержащее три вторых конец"); +} + +#[test] +fn menclose_longdiv_default() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "знак деления уголком, содержащее три вторых конец"); +} + +#[test] +fn menclose_longdiv_empty_string() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "знак деления уголком, содержащее три вторых конец"); +} + +#[test] +fn menclose_longdiv_whitespace_string() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "знак деления уголком, содержащее три вторых конец"); +} + +#[test] +fn menclose_radical() { + let expr = " + 32 + "; + test("ru", "ClearSpeak", expr, "квадратный корень, содержащее три вторых конец"); +} + +#[test] +fn simple_speak_menclose_top_bottom() { + let expr = " + 32 + "; + test("ru", "SimpleSpeak", expr, "линия сверху, снизу, содержащее три вторых конец"); +} diff --git a/tests/Languages/ru/ClearSpeak/mfrac.rs b/tests/Languages/ru/ClearSpeak/mfrac.rs new file mode 100644 index 00000000..ea85c812 --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/mfrac.rs @@ -0,0 +1,274 @@ +/// Tests for fractions +/// includes simple fractions and more complex fractions +/// also tests mixed fractions (implicit and explicit) +use crate::common::*; + +#[test] +fn common_fraction_half() { + let expr = " + 1 2 + "; + test("ru", "ClearSpeak", expr, "одна вторая"); +} + +#[test] +fn common_fraction_thirds() { + let expr = " + 2 3 + "; + test("ru", "ClearSpeak", expr, "две третьих"); +} + +#[test] +fn common_fraction_tenths() { + let expr = " + 17 10 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Auto")], expr, "семнадцать десятых"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Ordinal")], expr, "семнадцать десятых"); +} + +#[test] +#[allow(non_snake_case)] +fn not_ClearSpeak_common_fraction_tenths() { + let expr = " + 89 10 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Auto")], expr, "89 на 10"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Ordinal")], expr, "восемьдесят девять десятых"); +} + +#[test] +fn non_simple_fraction() { + let expr = " + + + + + x+y + + x-y + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Auto")], expr, "дробь, числитель: икс плюс игрек; знаменатель: икс минус игрек"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Ordinal")], expr, "дробь, числитель: икс плюс игрек; знаменатель: икс минус игрек"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Over")], expr, "икс плюс игрек на икс минус игрек"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "FracOver")], expr, "дробь икс плюс игрек на икс минус игрек"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "General")], expr, "дробь, числитель: икс плюс игрек; знаменатель: икс минус игрек"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "EndFrac")], expr, "дробь, числитель: икс плюс игрек; знаменатель: икс минус игрек; конец дроби"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "GeneralEndFrac")], expr, "дробь, числитель: икс плюс игрек; знаменатель: икс минус игрек; конец дроби"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "OverEndFrac")], expr, "икс плюс игрек на икс минус игрек, конец дроби"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Per")], expr, "икс плюс игрек на икс минус игрек"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose"),("ClearSpeak_Fractions", "Auto")], expr, "дробь, числитель: икс плюс игрек; знаменатель: икс минус игрек; конец дроби"); +} + +#[test] +fn frac_with_units() { + let expr = " + + + 62 + + mi + hr + + + "; + test("ru", "ClearSpeak", expr, "62 мили в час"); +} + + +#[test] +fn mixed_number() { + let expr = " + 3 + 1 2 + "; + test("ru", "ClearSpeak", expr, "3 и одна вторая"); +} + +#[test] +fn explicit_mixed_number() { + let expr = " + 3 + + 1 8 + "; + test("ru", "ClearSpeak", expr, "3 и одна восьмая"); +} + +#[test] +fn mixed_number_big() { + let expr = " + 3 + 7 83 + "; + test("ru", "ClearSpeak", expr, "3 и 7 на 83"); +} + +#[test] +fn simple_text() { + let expr = " + rise run + "; + test("ru", "ClearSpeak", expr, "подъём на длину"); +} + +#[test] +fn number_and_text() { + let expr = " + + + 2miles + + 3gallons + + "; + test("ru", "ClearSpeak", expr, "2 мили на 3 галлона"); +} + + +#[test] +fn nested_simple_fractions() { + let expr = " + + + + + 1 + 2 + + + + + 2 + 3 + + + + + "; + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "Auto")], expr, "одна вторая на две третьих"); + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "Ordinal")], expr, "одна вторая на две третьих"); + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "Over")], expr, "1 на 2 на 2 на 3"); + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "FracOver")], expr, + "дробь дробь 1 на 2 на дробь 2 на 3"); + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "General")], expr, + "дробь, числитель: дробь, числитель: 1; знаменатель: 2; и знаменатель: дробь, числитель: 2; знаменатель: 3"); + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "EndFrac")], expr, "одна вторая на две третьих"); + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "GeneralEndFrac")], expr, + "дробь, числитель: дробь, числитель: 1; знаменатель: 2; конец дроби; и знаменатель: дробь, числитель: 2; знаменатель: 3; конец дроби; конец дроби"); + test_prefs("ru", "ClearSpeak", vec![("ClearSpeak_Fractions", "OverEndFrac")], expr, + "1 на 2, конец дроби, на 2 на 3, конец дроби; конец дроби"); +} + + +#[test] +fn semi_nested_fraction() { + let expr = " + + + + + 2 + 3 + + x + + 6 + + + "; + test("ru", "ClearSpeak", expr, "две третьих икс на 6"); +} + +#[test] +fn general_nested_fraction() { + let expr = " + + + + + + 10 + n + + + + + 2 + n + + + + + + "; + test("ru", "ClearSpeak", expr, "дробь, числитель: 10 на эн; и знаменатель: 2 на эн"); +} + +#[test] +fn complex_nested_fraction() { + let expr = " + + + + + + n + 10 + n + + + + + 2 + n + + + + + + "; + test("ru", "ClearSpeak", expr, "дробь, числитель: дробь, числитель: эн плюс 10; знаменатель: эн; и знаменатель: 2 на эн"); +} + +#[test] +fn simple_function() { + let expr = "f(x)2"; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Auto")], expr, "эф от икс на 2"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose"), ("ClearSpeak_Fractions", "Auto")], expr, "эф от икс на 2, конец дроби"); +} + +#[test] +fn function_over_function() { + let expr = " + f(x) + g(x) + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Auto")], expr, "эф от икс на же от икс"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose"), ("ClearSpeak_Fractions", "Auto")], expr, "эф от икс на же от икс, конец дроби"); +} + +#[test] +fn non_simple_function_over_function() { + let expr = " + f(x+1) + g(x) + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Fractions", "Auto")], expr, + "дробь, числитель: эф от, открывается скобка икс плюс 1, закрывается скобка; знаменатель: же от икс"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose"), ("ClearSpeak_Fractions", "Auto")], expr, + "дробь, числитель: эф от, открывается скобка икс плюс 1, закрывается скобка; знаменатель: же от икс; конец дроби"); +} + +#[test] +fn binomial() { + let expr = " + 2 + ( + 7 3 + ) + "; + test("ru", "ClearSpeak", expr, "2 умножить на число сочетаний из 7 по 3"); +} diff --git a/tests/Languages/ru/ClearSpeak/mroot.rs b/tests/Languages/ru/ClearSpeak/mroot.rs new file mode 100644 index 00000000..76bbbf8a --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/mroot.rs @@ -0,0 +1,132 @@ +use crate::common::*; + +#[test] +fn msqrt_simple() { + let expr = " + x + "; + test("ru", "ClearSpeak", expr, "квадратный корень из икс"); +} + +#[test] +fn msqrt_simple_end_root() { + let expr = " + x + "; + test_ClearSpeak("ru", "ClearSpeak_Roots", "RootEnd", expr, "квадратный корень из икс, конец корня"); +} + +#[test] +fn msqrt_simple_positive() { + let expr = " + x + "; + test_ClearSpeak("ru", "ClearSpeak_Roots", "PosNegSqRoot", expr, "квадратный корень из икс"); +} + +#[test] +fn msqrt_simple_pos_end_root() { + let expr = " + x + "; + test_ClearSpeak("ru", "ClearSpeak_Roots", "PosNegSqRootEnd", expr, "квадратный корень из икс, конец корня"); +} + +#[test] +fn msqrt_simple_pos_end_with_neg_root() { + let expr = " + - x + - x 3 + "; + test_ClearSpeak("ru", "ClearSpeak_Roots", "PosNegSqRootEnd", expr, + "минус квадратный корень из икс, конец корня; минус, кубический корень из икс, конец корня"); +} + +#[test] +fn mroot_simple_pos_end_with_neg_root() { + let expr = " + - x 3 + - x + + "; + test_ClearSpeak("ru", "ClearSpeak_Roots", "PosNegSqRoot", expr, + "минус кубический корень из икс; минус квадратный корень из икс"); +} + +#[test] +fn neg_without_root() { + let expr = " + - x - y + "; + test("ru", "ClearSpeak", expr, "минус икс минус игрек"); +} + +#[test] +fn msqrt() { + let expr = " + + x + y + + "; + test("ru", "ClearSpeak", expr, "квадратный корень из икс плюс игрек"); +} + +#[test] +fn mroot_as_square_root() { + let expr = " + x 2 + "; + test("ru", "ClearSpeak", expr, "квадратный корень из икс"); +} + +#[test] +fn cube_root() { + let expr = " + x 3 + "; + test("ru", "ClearSpeak", expr, "кубический корень из икс"); +} + +#[test] +fn ordinal_root() { + let expr = " + x 9 + "; + test("ru", "ClearSpeak", expr, "корень девятой степени из икс"); +} + +#[test] +fn simple_mi_root() { + let expr = " + x n + "; + test("ru", "ClearSpeak", expr, "корень степени эн из икс"); +} + +#[test] +fn mroot_simple_pos_end_root() { + let expr = " + x t + "; + test_ClearSpeak("ru", "ClearSpeak_Roots", "PosNegSqRootEnd", expr, "корень степени тэ из икс, конец корня"); +} + +#[test] +fn mroot_simple_end_root() { + let expr = " + x + y + 21 + "; + test_ClearSpeak("ru", "ClearSpeak_Roots", "RootEnd", expr, "корень двадцать первой степени из икс плюс игрек, конец корня"); +} + +#[test] +fn simple_fraction_power() { + let expr = " + + x + 13 + + "; + test("ru", "ClearSpeak", expr, "корень степени одна третья из икс"); +} diff --git a/tests/Languages/ru/ClearSpeak/msup.rs b/tests/Languages/ru/ClearSpeak/msup.rs new file mode 100644 index 00000000..15cf0971 --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/msup.rs @@ -0,0 +1,336 @@ +/// Tests for superscripts +/// simple superscripts +/// complex/nested superscripts +use crate::common::*; + +#[test] +fn squared() { + let expr = " + x 2 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "икс в квадрате"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "икс во второй"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "икс во второй степени"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "икс в степени 2"); +} + +#[test] +fn cubed() { + let expr = " + x 3 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "икс в кубе"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "икс в третьей"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "икс в третьей степени"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "икс в степени 3"); +} + +#[test] +fn ordinal_power() { + let expr = " + 3 5 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в пятой степени"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в пятой"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в пятой степени"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени 5"); +} + +#[test] +fn zero_power() { + let expr = " + 3 0 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в нулевой степени"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в нулевой"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в нулевой степени"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени 0"); +} + +#[test] +fn simple_mi_power() { + let expr = " + 4 x + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "4 в степени икс"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "4 в степени икс"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "4 в степени икс"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "4 в степени икс"); +} + +#[test] +fn decimal_power() { + let expr = " + 3 5.0 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в степени 5.0"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в степени 5.0"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в степени 5.0"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени 5.0"); +} + +#[test] +fn non_simple_power() { + let expr = " + 3 y+2 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в степени игрек плюс 2"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в степени игрек плюс 2"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в степени игрек плюс 2"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени игрек плюс 2"); +} + +#[test] +fn negative_power() { + let expr = " + 3 - 2 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в степени минус 2"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в степени минус 2"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в степени минус 2"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени минус 2"); +} + +#[test] +fn simple_fraction_power() { + let expr = " + + x + 13 + + "; + test("ru", "ClearSpeak", expr, "икс в степени одна третья"); +} + +#[test] +fn nested_squared_power_with_coef() { + let expr = " + + + 3 + + 2 + + x + 2 + + + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в степени 2 икс в квадрате"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в степени (показатель: 2 икс во второй, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в степени (показатель: 2 икс во второй степени, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени (показатель: 2 икс в степени 2, конец показателя)"); +} + +#[test] +fn nested_squared_power_with_neg_coef() { + let expr = " + + + 3 + + - + 2 + + x + 2 + + + + + "; + test("ru", "ClearSpeak", expr, "3 в степени минус 2 икс в квадрате"); +} + +#[test] +fn nested_cubed_power() { + let expr = " + + y + + 45 + 3 + + + "; + test("ru", "ClearSpeak", expr, "игрек в степени четыре пятых в кубе"); +} + +#[test] +fn nested_cubed_power_with_neg_base() { + let expr = " + + y + + - + + 45 + 3 + + + + "; + test("ru", "ClearSpeak", expr, "игрек в степени минус четыре пятых в кубе"); +} + +#[test] +fn nested_number_times_squared() { + let expr = " + + + e + + + 1 + 2 + + + x + 2 + + + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "e в степени одна вторая икс в квадрате"); +} + +#[test] +fn nested_negative_number_times_squared() { + let expr = " + + + e + + + 1 + 2 + + + x + 2 + + + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "e в степени минус одна вторая икс в квадрате"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "e в степени (показатель: минус одна вторая икс во второй, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "e в степени (показатель: минус одна вторая икс во второй степени, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "e в степени (показатель: минус одна вторая икс в степени 2, конец показателя)"); +} + +#[test] +fn nested_expr_to_tenth() { + let expr = " + + + 3 + + + 3 + + 10 + + + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в степени (показатель: 3 в десятой степени, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в степени (показатель: 3 в десятой, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в степени (показатель: 3 в десятой степени, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени (показатель: 3 в степени 10, конец показателя)"); +} + +#[test] +fn nested_non_simple_squared_exp() { + let expr = " + + + 3 + + + + ( + + x+1 + ) + 2 + + + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, "3 в степени (показатель: скобка открывается икс плюс 1, скобка закрывается в квадрате, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, "3 в степени (показатель: скобка открывается икс плюс 1, скобка закрывается во второй, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, "3 в степени (показатель: скобка открывается икс плюс 1, скобка закрывается во второй степени, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, "3 в степени (показатель: скобка открывается икс плюс 1, скобка закрывается в степени 2, конец показателя)"); +} + +#[test] +fn nested_default_power() { + let expr = " + + t + + 45 + n + + +"; + test("ru", "ClearSpeak", expr, "тэ в степени (показатель: четыре пятых в степени эн, конец показателя)"); +} + +#[test] +fn nested_complex_power() { + let expr = " + + + e + + + 1 + 2 + + + + ( + + + + xμ + σ + + + ) + 2 + + + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Auto")], expr, + "e в степени (показатель: минус одна вторая умножить на; скобка открывается; дробь, числитель: икс минус мю; знаменатель: сигма; скобка закрывается в квадрате, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "Ordinal")], expr, + "e в степени (показатель: минус одна вторая умножить на; скобка открывается; дробь, числитель: икс минус мю; знаменатель: сигма; скобка закрывается во второй, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "OrdinalPower")], expr, + "e в степени (показатель: минус одна вторая умножить на; скобка открывается; дробь, числитель: икс минус мю; знаменатель: сигма; скобка закрывается во второй степени, конец показателя)"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_Exponents", "AfterPower")], expr, + "e в степени (показатель: минус одна вторая умножить на; скобка открывается; дробь, числитель: икс минус мю; знаменатель: сигма; скобка закрывается в степени 2, конец показателя)"); +} + +#[test] +fn default_power() { + let expr = " + + t + + b+1 + 3 + + + "; + test("ru", "ClearSpeak", expr, "тэ в степени дробь, числитель: бэ плюс 1; знаменатель: 3"); +} diff --git a/tests/Languages/ru/ClearSpeak/multiline.rs b/tests/Languages/ru/ClearSpeak/multiline.rs new file mode 100644 index 00000000..85cc8b6c --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/multiline.rs @@ -0,0 +1,178 @@ +use crate::common::*; + +#[test] +fn case_1() { + let expr = " + f + + ( + x + ) + + = + + { + + -1ifx<0 + 0ifx=0 + 1ifx>0 + + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Auto", expr, + "эф от икс равно; 3 случая; \ + случай 1; минус 1, если икс меньше 0; \ + случай 2; 0, если икс равно 0; \ + случай 3; 1, если икс больше 0" + ) +} + +#[test] +fn equation_auto() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Auto", expr, + "2 строки; \ + строка 1; икс плюс игрек равно 7; \ + строка 2; 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn equation_plus_at_start() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Auto", expr, "2 строки; \ + строка 1; икс плюс игрек равно 7; \ + строка 2; 2 икс, плюс 3 игрек, равно 17"); +} + +#[test] +fn equation_case() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Case", expr, + "2 случая; случай 1; икс плюс игрек равно 7; случай 2; 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn equation_constraint() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Constraint", expr, "2 ограничения; \ + ограничение 1; икс плюс игрек равно 7; \ + ограничение 2; 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn equation_equation() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Equation", expr, "2 уравнения; \ + уравнение 1; икс плюс игрек равно 7; \ + уравнение 2; 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn equation_line() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Line", expr, "2 строки; \ + строка 1; икс плюс игрек равно 7; \ + строка 2; 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn equation_none() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "None", expr, + "2 строки; \ + икс плюс игрек равно 7; \ + 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn equation_row() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Row", expr, "2 строки; \ + строка 1; икс плюс игрек равно 7; \ + строка 2; 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn equation_step() { + let expr = " + + + x+y = 7 + 2x+3y = 17 + + + "; + test_ClearSpeak("ru", "ClearSpeak_MultiLineLabel", "Step", expr, "2 шага; \ + шаг 1; икс плюс игрек равно 7; \ + шаг 2; 2 икс плюс 3 игрек равно 17"); +} + +#[test] +fn continued_row() { + let expr = " + + x=y + +1 + y=1 + +"; +test("ru", "SimpleSpeak", expr, + "2 уравнения; уравнение 1; икс равно игрек плюс 1; уравнение 2; игрек равно 1"); +} diff --git a/tests/Languages/ru/ClearSpeak/sets.rs b/tests/Languages/ru/ClearSpeak/sets.rs new file mode 100644 index 00000000..26a1cf9b --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/sets.rs @@ -0,0 +1,446 @@ +use crate::common::*; + +#[test] +fn complex() { + let expr = " + + "; + test("ru", "ClearSpeak", expr, "комплексные числа"); +} + +#[test] +fn natural() { + let expr = " + + "; + test("ru", "ClearSpeak", expr, "натуральные числа"); +} + +#[test] +fn rationals() { + let expr = " + + "; + test("ru", "ClearSpeak", expr, "рациональные числа"); +} + +#[test] +fn reals() { + let expr = " + + "; + test("ru", "ClearSpeak", expr, "действительные числа"); +} + +#[test] +fn integers() { + let expr = " + + "; + test("ru", "ClearSpeak", expr, "целые числа"); +} + +#[test] +fn msup_complex() { + let expr = " + + + 2 + + "; + test("ru", "ClearSpeak", expr, "цэ 2"); +} + +#[test] +fn msup_natural() { + let expr = " + + + 2 + + "; + test("ru", "ClearSpeak", expr, "эн 2"); +} + +#[test] +fn msup_rationals() { + let expr = " + + + 2 + + "; + test("ru", "ClearSpeak", expr, "ку 2"); +} + +#[test] +fn msup_reals() { + let expr = " + + + 3 + + "; + test("ru", "ClearSpeak", expr, "эр 3"); +} + +#[test] +fn msup_integers() { + let expr = " + + + 4 + + "; + test("ru", "ClearSpeak", expr, "зэ 4"); +} + +#[test] +fn msup_positive_integers() { + let expr = " + + + + + + "; + test("ru", "ClearSpeak", expr, "положительные целые числа"); +} + +#[test] +fn msup_negative_integers() { + let expr = " + + + - + + "; + test("ru", "ClearSpeak", expr, "отрицательные целые числа"); +} + +#[test] +fn msup_positive_rationals() { + let expr = " + + + + + + "; + test("ru", "ClearSpeak", expr, "положительные рациональные числа"); +} + +#[test] +fn msup_negative_rationals() { + let expr = " + + + - + + "; + test("ru", "ClearSpeak", expr, "отрицательные рациональные числа"); +} + +#[test] +fn empty_set() { + let expr = " + { } + "; + test("ru", "ClearSpeak", expr, "пустое множество"); +} + +#[test] +fn single_element_set() { + let expr = " + { 12} + "; + test("ru", "ClearSpeak", expr, "множество 12"); +} + +#[test] +fn multiple_element_set() { + let expr = " + { 5 , 10 , 15 } + "; + test("ru", "ClearSpeak", expr, "множество 5 запятая, 10 запятая, 15"); +} + +#[test] +fn set_with_colon() { + let expr = " + { x:x>2 } + "; + test("ru", "ClearSpeak", expr, "множество всех x таких, что x больше 2"); +} + +#[test] +fn set_with_bar() { + let expr = " + { x|x>2 } + "; + test("ru", "ClearSpeak", expr, "множество всех x таких, что x больше 2"); +} + +#[test] +fn element_alone() { + let expr = " + 3+2i + "; + test("ru", "ClearSpeak", expr, "3 плюс 2 i, не принадлежит действительным числам"); +} + +#[test] +fn element_under_sum() { + let expr = " + + + i + + + 1 + i 2 + + "; + test("ru", "ClearSpeak", expr, + "сумма по i, принадлежащему целым числам, от; дробь, числитель: 1; знаменатель: i в квадрате"); +} + +#[test] +fn complicated_set_with_colon() { + let expr = " + { + x + + + : + 2 + < + x + < + 7 + } + "; + test("ru", "ClearSpeak", expr, "множество всех x из целых чисел, таких что 2 меньше x меньше 7"); +} + +#[test] +fn complicated_set_with_mtext() { + let expr = " + { + x + | + x is an even number + } + "; + test("ru", "ClearSpeak", expr, + "множество всех x из натуральных чисел, таких что x — чётное число"); +} + +#[test] +fn set_with_bar_member() { + let expr = " + { + x + + + : + x + > + 5 + } + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Member", + expr, "множество всех x, принадлежащих целым числам, таких что x больше 5"); +} + +#[test] +fn element_alone_member() { + let expr = " + 3+2i + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Member", + expr, "3 плюс 2 i, не принадлежит действительным числам"); +} + +#[test] +fn element_under_sum_member() { + let expr = " + + + i + + + 1 + i 2 + + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Member", + expr, "сумма по i, принадлежащему целым числам, от; дробь, числитель: 1; знаменатель: i в квадрате"); +} + +#[test] +fn set_with_bar_element() { + let expr = " + { + x + + + : + x + > + 5 + } + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Element", + expr, "множество всех x, являющихся элементами целых чисел, таких что x больше 5"); +} + +#[test] +fn element_alone_element() { + let expr = " + 3+2i + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Element", + expr, "3 плюс 2 i, не является элементом действительных чисел"); +} + +#[test] +fn element_under_sum_element() { + let expr = " + + + i + + + 1 + i 2 + + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Element", + expr, "сумма по i, являющемуся элементом целых чисел, от; дробь, числитель: 1; знаменатель: i в квадрате"); +} + +#[test] +fn set_with_bar_in() { + let expr = " + { + x + + + : + x + > + 5 + } + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "In", + expr, "множество всех x из целых чисел, таких что x больше 5"); +} + +#[test] +fn element_alone_in() { + let expr = " + 3+2i + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "In", + expr, "3 плюс 2 i, не принадлежит действительным числам"); +} + +#[test] +fn element_under_sum_in() { + let expr = " + + + i + + + 1 + i 2 + + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "In", + expr, "сумма по i из целых чисел, от; дробь, числитель: 1; знаменатель: i в квадрате"); +} + +#[test] +fn set_with_bar_belongs() { + let expr = " + { + x + + + : + x + > + 5 + } + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Belongs", + expr, "множество всех x, входящих в целые числа, таких что x больше 5"); +} + +#[test] +fn element_alone_belongs() { + let expr = " + 3+2i + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Belongs", + expr, "3 плюс 2 i, не входит в действительные числа"); +} + +#[test] +fn element_under_sum_belongs() { + let expr = " + + + i + + + 1 + i 2 + + "; + test_ClearSpeak("ru", "ClearSpeak_SetMemberSymbol", "Belongs", + expr, "сумма по i, входящему в целые числа, от; дробь, числитель: 1; знаменатель: i в квадрате"); +} + +#[test] +fn set_member_woall() { + let expr = " + { + x + + + : + x + > + 5 + } + "; + test_ClearSpeak_prefs("ru", vec![("ClearSpeak_SetMemberSymbol", "Member"), ("ClearSpeak_Sets", "woAll")], + expr, "множество x, принадлежащих целым числам, таких что x больше 5"); +} + +#[test] +fn multiple_element_set_woall() { + let expr = " + { 5 , 10 , 15 } + "; + test_ClearSpeak("ru", "ClearSpeak_Sets", "woAll", expr, "множество 5 запятая, 10 запятая, 15"); +} + +#[test] +fn multiple_element_set_silent_bracket() { + let expr = " + { 5 , 10 , 15 } + "; + test_ClearSpeak("ru", "ClearSpeak_Sets", "SilentBracket", expr, "5 запятая, 10 запятая, 15"); +} + +#[test] +fn silent_bracket() { + let expr = " + {x|x>2} + "; + test_ClearSpeak("ru", "ClearSpeak_Sets", "SilentBracket", expr, + "множество всех x таких, что x больше 2"); +} + diff --git a/tests/Languages/ru/ClearSpeak/symbols_and_adornments.rs b/tests/Languages/ru/ClearSpeak/symbols_and_adornments.rs new file mode 100644 index 00000000..d2824ab7 --- /dev/null +++ b/tests/Languages/ru/ClearSpeak/symbols_and_adornments.rs @@ -0,0 +1,330 @@ +use crate::common::*; + +#[test] +fn multiplication() { + let expr = " + 2×3 + "; + test("ru", "ClearSpeak", expr, "2 умножить на 3"); +} + +#[test] +fn multiplication_by() { + let expr = " + 2×3 + "; + test_ClearSpeak("ru", "ClearSpeak_MultSymbolX", "By", expr, "2 на 3"); +} + +#[test] +fn multiplication_cross() { + let expr = " + u×v + "; + test_ClearSpeak("ru", "ClearSpeak_MultSymbolX", "Cross", expr, "u векторное произведение v"); +} + +#[test] +fn ellipses_auto_start() { + let expr = " + , + -2,-1,0 + "; + test("ru", "ClearSpeak", expr, "многоточие запятая, минус 2 запятая, минус 1 запятая, 0"); +} + +#[test] +fn ellipses_auto_end() { + let expr = " + 1 + , + 2 + , + 3 + , + + "; + test_ClearSpeak("ru", "ClearSpeak_Ellipses", "Auto", expr, "1 запятая, 2 запятая, 3 запятая, многоточие"); +} + +#[test] +fn ellipses_auto_middle() { + let expr = " + + 1 + , + 2 + , + 3 + , + + , + 20 + + "; + test_ClearSpeak("ru", "ClearSpeak_Ellipses", "Auto", expr, + "1 запятая, 2 запятая, 3 запятая, многоточие запятая, 20"); +} + +#[test] +fn ellipses_auto_both() { + let expr = " + , + -2,-1,0,1,2 + , + "; + test_ClearSpeak("ru", "ClearSpeak_Ellipses", "Auto", expr, + "многоточие запятая, минус 2 запятая, минус 1 запятая, 0 запятая, 1 запятая, 2 запятая, многоточие"); +} + +#[test] +fn ellipses_and_so_on_start() { + let expr = " + , + -2,-1,0 + "; + test_ClearSpeak("ru", "ClearSpeak_Ellipses", "AndSoOn", expr, "многоточие запятая, минус 2 запятая, минус 1 запятая, 0"); +} + +#[test] +fn ellipses_and_so_on_end() { + let expr = " + 1 + , + 2 + , + 3 + , + + "; + test_ClearSpeak("ru", "ClearSpeak_Ellipses", "AndSoOn", expr, "1 запятая, 2 запятая, 3 и так далее"); +} + +#[test] +fn ellipses_and_so_on_middle() { + let expr = " + + 1 + , + 2 + , + 3 + , + + , + 20 + + "; + test_ClearSpeak("ru", "ClearSpeak_Ellipses", "AndSoOn", expr, + "1 запятая, 2 запятая, 3 и так далее до 20"); +} + +#[test] +fn ellipses_and_so_on_both() { + let expr = " + , + -2,-1,0,1,2 + , + "; + test_ClearSpeak("ru", "ClearSpeak_Ellipses", "AndSoOn", expr, + "многоточие запятая, минус 2 запятая, минус 1 запятая, 0 запятая, 1 запятая, 2 запятая, многоточие"); +} + +#[test] +fn vertical_line_auto() { + let expr = " + 3|6 + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Auto", expr, + "3 делит 6"); +} + +#[test] +fn vertical_line_divides() { + let expr = " + 3|6 + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Divides", expr, + "3 делит 6"); +} + +#[test] +fn vertical_line_given() { + let expr = " + 3|6 + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Given", expr, + "3 при условии 6"); +} + +#[test] +fn vertical_line_probability_given() { + let expr = " + P + + ( + + A + | + B + + ) + + "; + test_ClearSpeak_prefs("ru", vec![("ClearSpeak_VerticalLine", "Given"), ("ClearSpeak_ImpliedTimes", "None")], + expr, "пэ большое, открывается скобка, эй большое при условии бэ большое, закрывается скобка"); +} + +#[test] +fn vertical_line_set() { + let expr = " + { + + x + | + x + > + 0 + + } + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Auto", expr, + "множество всех x таких, что x больше 0"); +} + +#[test] +fn vertical_line_set_such_that() { + let expr = " + { + + x + | + x + > + 0 + + } + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "SuchThat", expr, + "множество всех x таких, что x больше 0"); +} + +#[test] +fn vertical_line_set_given() { + let expr = " + { + + x + | + x + > + 0 + + } + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Given", expr, + "множество всех x таких, что x больше 0"); +} + +#[test] +fn vertical_line_set_and_abs() { + let expr = " + { + + x + | + + | + x + | + + > + 2 + + } + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Auto", expr, + "множество всех x таких, что абсолютное значение x; больше 2"); +} + +#[test] +fn vertical_line_evaluated_at() { + let expr = " + f + + ( + x + ) + + + | + + x + = + 5 + + + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Auto", expr, + "эф от икс, вычисленное при, x равно 5"); +} + +#[test] +fn vertical_line_evaluated_at_both() { + let expr = " + + x + 2 + + + + x + + | + 0 + 1 + + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Auto", expr, + "икс в квадрате плюс икс, вычисленное при 1 минус то же выражение, вычисленное при 0"); +} + +#[test] +fn vertical_line_evaluated_at_divides() { + let expr = " + f + + ( + x + ) + + + | + + x + = + 5 + + + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Divides", expr, + "эф от икс, вычисленное при, x равно 5"); +} + +#[test] +fn vertical_line_evaluated_at_both_given() { + let expr = " + + x + 2 + + + + x + + | + 0 + 1 + + "; + test_ClearSpeak("ru", "ClearSpeak_VerticalLine", "Given", expr, + "икс в квадрате плюс икс, вычисленное при 1 минус то же выражение, вычисленное при 0"); +} \ No newline at end of file diff --git a/tests/Languages/ru/SimpleSpeak/functions.rs b/tests/Languages/ru/SimpleSpeak/functions.rs new file mode 100644 index 00000000..660e27a7 --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/functions.rs @@ -0,0 +1,332 @@ +/// Tests for: +/// * functions including trig functions, logs, and functions to powers +/// * implied times/functional call and explicit times/function call +/// * parens +/// These are all intertwined, so they are in one file +use crate::common::*; + +#[test] +fn trig_names() { + let expr = " + sinx+ + cosy+ + tanz+ + secα+ + cscϕ+ + cotφ + "; + test("ru", "SimpleSpeak", expr, "синус икс плюс косинус игрек плюс тангенс зет плюс секанс альфа, плюс косеканс фи, плюс котангенс фи"); +} + +#[test] +fn hyperbolic_trig_names() { + let expr = " + sinhx+ + coshy+ + tanhz+ + sechα+ + cschϕ+ + cothφ + "; + test("ru", "SimpleSpeak", expr, "гиперболический синус икс, плюс \ + гиперболический косинус игрек, плюс \ + гиперболический тангенс зет, плюс \ + гиперболический секанс альфа, плюс \ + гиперболический косеканс фи, плюс \ + гиперболический котангенс фи"); +} + +#[test] +fn inverse_trig() { + let expr = "sin-1x"; + test("ru", "SimpleSpeak", expr, "арксинус икс"); +} + +#[test] +fn trig_squared() { + let expr = "sin2x"; + test("ru", "SimpleSpeak", expr, "синус в квадрате икс"); +} + +#[test] +fn trig_cubed() { + let expr = "tan3x"; + test("ru", "SimpleSpeak", expr, "тангенс в кубе икс"); +} + +#[test] +fn trig_fourth() { + let expr = "sec4x"; + test("ru", "SimpleSpeak", expr, "секанс в четвертой степени икс"); +} + +#[test] +fn trig_power_other() { + let expr = "sinh>n-1x"; + test("ru", "SimpleSpeak", expr, "гиперболический синус икс в степени n минус 1"); +} + +#[test] +fn simple_log() { + let expr = " logx "; + test("ru", "SimpleSpeak", expr, "логарифм икс"); +} + +#[test] +fn normal_log() { + let expr = "log(x+y)"; + test("ru", "SimpleSpeak", expr, "логарифм от, скобка открывается икс плюс игрек, скобка закрывается"); +} + +#[test] +fn simple_log_with_base() { + let expr = " logbx "; + test("ru", "SimpleSpeak", expr, "логарифм по основанию бэ от икс"); +} + +#[test] +fn normal_log_with_base() { + let expr = "logb(x+y)"; + test("ru", "SimpleSpeak", expr, "логарифм по основанию бэ от, скобка открывается икс плюс игрек, скобка закрывается"); +} + +#[test] +fn normal_ln() { + let expr = "ln(x+y)"; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "эл эн, открывается икс плюс игрек закрывается"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], + expr, "натуральный логарифм от, скобка открывается икс плюс игрек, скобка закрывается"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], + expr, "натуральный логарифм от, скобка открывается икс плюс игрек, скобка закрывается"); +} + +#[test] +fn simple_ln() { + let expr = " lnx "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "эл эн икс"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], + expr, "натуральный логарифм икс"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], + expr, "натуральный логарифм икс"); +} + +#[test] +fn other_names() { + let expr = " Covx "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "Cov икс"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], + expr, "ковариация икс"); + let expr = " exp(x) "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "эксп от икс"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], + expr, "экспонента от икс"); +} + +#[test] +fn explicit_function_call_with_parens() { + let expr = "t(x)"; + test("ru", "SimpleSpeak", expr, "тэ от икс"); +} + +#[test] +fn explicit_times_with_parens() { + let expr = "t(x)"; + test("ru", "SimpleSpeak", expr, "тэ умножить на икс"); +} + +#[test] +fn explicit_function_call() { + let expr = "tx"; + test("ru", "SimpleSpeak", expr, "тэ от икс"); +} + +#[test] +fn explicit_times() { + let expr = "tx"; + test("ru", "SimpleSpeak", expr, "тэ икс"); +} + +/* + * Tests for times + */ +#[test] +fn no_times_binomial() { + let expr = "x y"; + test("ru", "SimpleSpeak", expr, "икс игрек"); +} + +#[test] +fn times_following_paren() { + let expr = " + 2 + ( 3 ) + "; + test("ru", "SimpleSpeak", expr, "2 умножить на 3"); +} + +#[test] +fn times_preceding_paren() { + let expr = " + ( 2 ) + 3 + "; + test("ru", "SimpleSpeak", expr, "2 умножить на 3"); +} + +#[test] +fn no_times_sqrt() { + let expr = " + a + b + = + ab + "; + test("ru", "SimpleSpeak", expr, + "квадратный корень из а; умножить на квадратный корень из бэ; равно, квадратный корень из а бэ конец корня"); + test_prefs("ru", "SimpleSpeak", vec![("Impairment", "LearningDisability")], expr, + "квадратный корень из а; умножить на квадратный корень из бэ; равно, квадратный корень из а бэ"); +} + +/* + * Tests for parens + */ +#[test] +fn no_parens_number() { + let expr = " + ( + 25 + ) + x + "; + test("ru", "SimpleSpeak", expr, "25 умножить на икс"); +} + +#[test] +fn no_parens_monomial() { + let expr = " + b + ( + xy + ) + "; + test("ru", "SimpleSpeak", expr, "бэ, скобка открывается икс игрек скобка закрывается"); +} + +#[test] +fn no_parens_negative_number() { + let expr = " + 2+ + ( + 2 + ) + "; + test("ru", "SimpleSpeak", expr, "2 плюс минус 2"); +} + +#[test] +fn no_parens_negative_number_with_var() { + let expr = " + ( + 2x + ) + +1 + "; + test("ru", "SimpleSpeak", expr, "минус 2 икс, плюс 1"); +} + +#[test] +fn parens_superscript() { + let expr = " + + + + ( + 2x + ) + 2 + + + "; + test("ru", "SimpleSpeak", expr, "скобка открывается 2 икс скобка закрывается в квадрате"); +} + +#[test] +fn no_parens_fraction() { + let expr = " + 2 + + + + ( + 12 + ) + "; + test("ru", "SimpleSpeak", expr, "2 плюс одна вторая"); +} + +// Tests for the four types of intervals in SimpleSpeak +#[test] +fn parens_interval_open_open() { + let expr = " + ( + (c,d) + ) + "; + test("ru", "SimpleSpeak", expr, "открытый интервал от цэ до дэ"); +} + +#[test] +fn parens_interval_closed_open() { + let expr = " + [ + [(]c,d) + ) + "; + test("ru", "SimpleSpeak", expr, "закрыто-открытый интервал от цэ до дэ"); +} + +#[test] +fn parens_interval_open_closed() { + let expr = " + ( + (c,d] + ] + "; + test("ru", "SimpleSpeak", expr, "открыто-закрытый интервал от цэ до дэ"); +} + +#[test] +fn parens_interval_closed_closed() { + let expr = " + [ + [(]c,d] + ] + "; + test("ru", "SimpleSpeak", expr, "закрытый интервал от цэ до дэ"); +} + +#[test] +fn parens_interval_neg_infinity_open_open() { + let expr = " + ( + - ,d) + ) + "; + test("ru", "SimpleSpeak", expr, + "открытый интервал от минус бесконечности до дэ"); +} + +#[test] +fn parens_interval_neg_infinity_open_closed() { + let expr = " + ( + - ,d] + ] + "; + test("ru", "SimpleSpeak", expr, + "открыто-закрытый интервал от минус бесконечности до дэ"); +} + diff --git a/tests/Languages/ru/SimpleSpeak/geometry.rs b/tests/Languages/ru/SimpleSpeak/geometry.rs new file mode 100644 index 00000000..522fa04e --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/geometry.rs @@ -0,0 +1,27 @@ +/// Tests for geometry listed in intent +/// ABC as mtext and as separated letters +use crate::common::*; + +#[test] +fn arc() { + let expr = " BC "; + test("ru", "SimpleSpeak", expr, "дуга бэ большое цэ большое"); +} + +#[test] +fn ray() { + let expr = " XY¯ "; + test("ru", "SimpleSpeak", expr, "отрезок икс большое игрек большое"); +} + +#[test] +fn arc_mtext() { + let expr = " BC "; + test("ru", "SimpleSpeak", expr, "дуга бэ большое цэ большое"); +} + +#[test] +fn ray_mtext() { + let expr = " XY "; + test("ru", "SimpleSpeak", expr, "луч икс большое игрек большое"); +} diff --git a/tests/Languages/ru/SimpleSpeak/large_ops.rs b/tests/Languages/ru/SimpleSpeak/large_ops.rs new file mode 100644 index 00000000..1131fa09 --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/large_ops.rs @@ -0,0 +1,201 @@ +use crate::common::*; + +#[test] +fn sum_both() { + let expr = " + + + n=1 + 10 + + n + "; + test("ru", "SimpleSpeak", expr, "сумма от n равно 1 до 10 от n"); +} + +#[test] +fn sum_under() { + let expr = " + + + S + + i + "; + test("ru", "SimpleSpeak", expr, "сумма по эс большое от i"); +} + +#[test] +fn sum_both_msubsup() { + let expr = " + + + n=1 + 10 + + n + "; + test("ru", "SimpleSpeak", expr, "сумма от n равно 1 до 10 от n"); +} + +#[test] +fn sum_sub() { + let expr = " + + + S + + i + "; + test("ru", "SimpleSpeak", expr, "сумма по эс большое от i"); +} + +#[test] +fn sum() { + let expr = " + + ai + "; + test("ru", "SimpleSpeak", expr, "сумма а с индексом i"); +} + +#[test] +fn product_both() { + let expr = " + + + n=1 + 10 + + n + "; + test("ru", "SimpleSpeak", expr, "произведение от n равно 1 до 10 от n"); +} + +#[test] +fn product_under() { + let expr = " + + + S + + i + "; + test("ru", "SimpleSpeak", expr, "произведение по эс большое от i"); +} + +#[test] +fn product() { + let expr = " + + ai + "; + test("ru", "SimpleSpeak", expr, "произведение а с индексом i"); +} + +#[test] +fn intersection_both() { + let expr = " + + + i=1 + 10 + + Si + "; + test("ru", "SimpleSpeak", expr, "пересечение от i равно 1 до 10 от; эс большое с индексом i"); +} + +#[test] +fn intersection_under() { + let expr = " + + + C + + Si + "; + test("ru", "SimpleSpeak", expr, "пересечение по цэ большое от, эс большое с индексом i"); +} + +#[test] +fn intersection() { + let expr = " + + Si + "; + test("ru", "SimpleSpeak", expr, "пересечение эс большое с индексом i"); +} + +#[test] +fn union_both() { + let expr = " + + + i=1 + 10 + + Si + "; + test("ru", "SimpleSpeak", expr, "объединение от i равно 1 до 10 от; эс большое с индексом i"); +} + +#[test] +fn union_under() { + let expr = " + + + C + + Si + "; + test("ru", "SimpleSpeak", expr, "объединение по цэ большое от, эс большое с индексом i"); +} + +#[test] +fn union() { + let expr = " + + Si + "; + test("ru", "SimpleSpeak", expr, "объединение эс большое с индексом i"); +} + +#[test] +fn integral_both() { + let expr = " + + + + 0 + 1 + + f(x ) + + dx + "; + test("ru", "SimpleSpeak", expr, "интеграл от 0 до 1 от, эф от икс; д икс"); +} + +#[test] +fn integral_under() { + let expr = " + + + + + f(x ) + dx + "; + test("ru", "SimpleSpeak", expr, "интеграл по действительным числам от; эф от икс д икс"); +} + +#[test] +fn integral() { + let expr = " + + f(x ) + dx + "; + test("ru", "SimpleSpeak", expr, "интеграл от эф от икс д икс"); +} \ No newline at end of file diff --git a/tests/Languages/ru/SimpleSpeak/linear_algebra.rs b/tests/Languages/ru/SimpleSpeak/linear_algebra.rs new file mode 100644 index 00000000..d495b3df --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/linear_algebra.rs @@ -0,0 +1,92 @@ +use crate::common::*; + +#[test] +fn transpose() { + let expr = " MT "; + test("ru", "SimpleSpeak", expr, "эм большое транспонированная"); +} + +#[test] +fn trace() { + let expr = " TrM "; + test("ru", "SimpleSpeak", expr, "след от эм большое"); +} + +#[test] +fn dimension() { + let expr = " DimM "; + test("ru", "SimpleSpeak", expr, "размерность эм большое"); +} + +#[test] +fn homomorphism() { + let expr = " Hom(M) "; + test("ru", "SimpleSpeak", expr, "гомоморфизм от эм большое"); +} + +#[test] +fn kernel() { + let expr = " ker(L) "; + test("ru", "SimpleSpeak", expr, "ядро от эль большое"); +} + +#[test] +fn norm() { + let expr = " + + + f + + + +"; + test("ru", "SimpleSpeak", expr, "норма от эф"); +} + +#[test] +fn norm_non_simple() { + let expr = " + + + x + + + y + + + +"; + test("ru", "SimpleSpeak", expr, "норма от икс плюс игрек конец нормы"); +} + +#[test] +fn norm_subscripted() { + let expr = " + + + + f + + + p + + +"; + test("ru", "SimpleSpeak", expr, "p-норма от эф"); +} + +#[test] +fn not_gradient() { + // the nabla is at the end, so it can't be gradient because it doesn't operate on anything + let expr = r#" + ( + b + + + + + ) + a + +"#; + test("ru", "SimpleSpeak", expr, "скобка открывается, бэ умножить на набла, скобка закрывается; умножить на а"); +} \ No newline at end of file diff --git a/tests/Languages/ru/SimpleSpeak/mfrac.rs b/tests/Languages/ru/SimpleSpeak/mfrac.rs new file mode 100644 index 00000000..a8bf0ec7 --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/mfrac.rs @@ -0,0 +1,276 @@ +/// Tests for fractions +/// includes simple fractions and more complex fractions +/// also tests mixed fractions (implicit and explicit) +use crate::common::*; + +#[test] +fn common_fraction_half() { + let expr = " + 1 2 + "; + test("ru", "SimpleSpeak", expr, "одна вторая"); +} + +#[test] +fn common_fraction_thirds() { + let expr = " + 2 3 + "; + test("ru", "SimpleSpeak", expr, "две третьих"); +} + +#[test] +fn common_fraction_tenths() { + let expr = " + 17 10 + "; + test("ru", "SimpleSpeak", expr, "семнадцать десятых"); +} + +#[test] +#[allow(non_snake_case)] +fn not_SimpleSpeak_common_fraction_tenths() { + let expr = " + 89 10 + "; + test("ru", "SimpleSpeak", expr, "89 на 10"); +} + +#[test] +fn non_simple_fraction() { + let expr = " + + + + x+y + + x-y + + + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: икс плюс игрек, знаменатель: икс минус игрек, конец дроби"); +} + +#[test] +fn nested_fraction() { + let expr = " + + + + x+ 1y + + x-y + + + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: икс плюс, дробь, числитель: 1, знаменатель: игрек, конец дроби; знаменатель: икс минус игрек, конец дроби"); +} + +#[test] +fn deeply_nested_fraction_msqrt() { + let expr = " + + + + x+ 1y + + x-y + + + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: икс плюс, квадратный корень из 1 на игрек, конец корня; знаменатель: икс минус игрек, конец дроби"); +} + +#[test] +fn deeply_nested_fraction_mrow_msqrt() { + let expr = " + + + + x+ 2+1y + + x-y + + + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: икс плюс, квадратный корень из 2 плюс 1 на игрек, конец корня; знаменатель: икс минус игрек, конец дроби"); +} + +#[test] +fn numerator_simple_fraction() { + let expr = " + + + + x + + x-y + + + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: икс, знаменатель: икс минус игрек, конец дроби"); +} + +#[test] +fn denominator_simple_fraction() { + let expr = " + + + x-y + x + + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: икс минус игрек, знаменатель: икс, конец дроби"); +} + +#[test] +fn frac_with_units() { + let expr = " + + + 62 + + mi + hr + + + "; + test("ru", "SimpleSpeak", expr, "62 мили в час"); +} + +#[test] +fn singular_frac_with_units() { + let expr = " + + + 1 + + gal + mi + + + "; + test("ru", "SimpleSpeak", expr, "1 галлон на милю"); +} + +#[test] +fn mixed_number() { + let expr = " + 3 + 1 2 + "; + test("ru", "SimpleSpeak", expr, "3 целых и одна вторая"); +} + +#[test] +fn explicit_mixed_number() { + let expr = " + 3 + + 1 8 + "; + test("ru", "SimpleSpeak", expr, "3 целых и одна восьмая"); +} + +#[test] +fn mixed_number_big() { + let expr = " + 3 + 7 83 + "; + test("ru", "SimpleSpeak", expr, "3 целых и семь восемьдесят третьих"); +} + +#[test] +fn simple_text() { + let expr = " + rise run + "; + test("ru", "SimpleSpeak", expr, "подъём на длину"); +} + +#[test] +fn number_and_text() { + let expr = " + + + 2miles + + 3gallons + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: 2 мили, знаменатель: 3 галлона, конец дроби"); +} + +#[test] +fn nested_simple_fractions() { + let expr = " + + + + + 1 + 2 + + + + + 2 + 3 + + + + + "; + test("ru", "SimpleSpeak", expr, "дробь, числитель: одна вторая, знаменатель: две третьих, конец дроби"); +} + +#[test] +fn binomial() { + let expr = " + 2 + ( + 7 3 + ) + "; + test("ru", "SimpleSpeak", expr, "2 умножить на число сочетаний из 7 по 3"); +} + +#[test] +fn binomial_non_simple_top() { + let expr = " + 2 + ( + n+7 3 + ) + "; + test("ru", "SimpleSpeak", expr, "2 умножить на, число сочетаний из n плюс 7 по 3"); +} + +#[test] +fn binomial_non_simple_bottom() { + let expr = " + 2 + ( + 7 k+3 + ) + "; + test("ru", "SimpleSpeak", expr, "2 умножить на, число сочетаний из 7 по k плюс 3 конец числа сочетаний"); +} + +#[test] +fn binomial_non_simple_top_and_bottom() { + let expr = " + 2 + ( + n+7 k+3 + ) + "; + test("ru", "SimpleSpeak", expr, "2 умножить на, число сочетаний из n плюс 7 по k плюс 3 конец числа сочетаний"); +} diff --git a/tests/Languages/ru/SimpleSpeak/msup.rs b/tests/Languages/ru/SimpleSpeak/msup.rs new file mode 100644 index 00000000..cb5d6f42 --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/msup.rs @@ -0,0 +1,333 @@ +/// Tests for superscripts +/// simple superscripts +/// complex/nested superscripts +use crate::common::*; + +#[test] +fn squared() { + let expr = " + x 2 + "; + test("ru", "SimpleSpeak", expr, "икс в квадрате"); +} + +#[test] +fn cubed() { + let expr = " + x 3 + "; + test("ru", "SimpleSpeak", expr, "икс в кубе"); +} + +#[test] +fn ordinal_power() { + let expr = " + x 4 + "; + test("ru", "SimpleSpeak", expr, "икс в четвёртой степени"); +} + +#[test] +fn simple_mi_power() { + let expr = " + x n + "; + test("ru", "SimpleSpeak", expr, "икс в степени эн"); +} + +#[test] +fn zero_power() { + let expr = " + x 0 + "; + test("ru", "SimpleSpeak", expr, "икс в нулевой степени"); +} + +#[test] +fn decimal_power() { + let expr = " + x 2.0 + "; + test("ru", "SimpleSpeak", expr, "икс в степени 2.0"); +} + +#[test] +fn non_simple_power() { + let expr = " + + + 3 + + y+2 + + + "; + test("ru", "SimpleSpeak", expr, "3 в степени игрек плюс 2"); +} + +#[test] +fn negative_power() { + let expr = " + + x + - 2 + + "; + test("ru", "SimpleSpeak", expr, "икс в степени минус 2"); +} + +#[test] +fn simple_fraction_power() { + let expr = " + + x + 13 + + "; + test("ru", "SimpleSpeak", expr, "икс в степени одна третья"); +} + +#[test] +fn nested_squared_power_with_coef() { + let expr = " + + + 3 + + 2 + + x + 2 + + + + + "; + test("ru", "SimpleSpeak", expr, "3 в степени 2 икс в квадрате"); +} + +#[test] +fn nested_squared_power_with_neg_coef() { + let expr = " + + + 3 + + - + 2 + + x + 2 + + + + + "; + test("ru", "SimpleSpeak", expr, "3 в степени минус 2 икс в квадрате"); +} + +#[test] +fn nested_cubed_power() { + let expr = " + + y + + 45 + 3 + + + "; + test("ru", "SimpleSpeak", expr, "игрек в степени четыре пятых в кубе"); +} + +#[test] +fn nested_cubed_power_with_neg_base() { + let expr = " + + y + + - + + 45 + 3 + + + + "; + test("ru", "SimpleSpeak", expr, "игрек в степени минус четыре пятых в кубе"); +} + +#[test] +fn nested_number_times_squared() { + let expr = " + + + e + + + 1 + 2 + + + x + 2 + + + + + "; + test("ru", "SimpleSpeak", expr, "e в степени одна вторая икс в квадрате"); +} + +#[test] +fn nested_negative_number_times_squared() { + let expr = " + + + e + + + 1 + 2 + + + x + 2 + + + + + "; + test("ru", "SimpleSpeak", expr, "e в степени минус одна вторая икс в квадрате"); +} + +#[test] +fn nested_expr_to_tenth() { + let expr = " + + + 3 + + + 3 + + 10 + + + + + "; + test("ru", "SimpleSpeak", expr, "3 в степени 3 в десятой степени"); +} + +#[test] +fn nested_non_simple_squared_exp() { + let expr = " + + + 3 + + + + ( + + x+1 + ) + 2 + + + + + "; + test("ru", "SimpleSpeak", expr, "3 в степени скобка открывается икс плюс 1, скобка закрывается в квадрате"); +} + +#[test] +fn nested_simple_power() { + let expr = " + + t + + 45 + n + + + "; + test("ru", "SimpleSpeak", expr, "тэ в степени четыре пятых в степени эн"); +} + +#[test] +fn nested_end_exponent_power() { + let expr = " + + t + + 45 + n+1 + + + "; + test("ru", "SimpleSpeak", expr, "тэ в степени четыре пятых в степени n плюс 1, конец показателя"); + test_prefs("ru", "SimpleSpeak", vec![("Impairment", "LearningDisability")], expr, + "тэ в степени четыре пятых в степени n плюс 1"); +} + +#[test] +fn nested_end_exponent_neg_power() { + let expr = " + + t + + 45 + -3 + + + "; + test("ru", "SimpleSpeak", expr, "тэ в степени четыре пятых в степени минус 3, конец показателя"); +} + +#[test] +fn nested_complex_power() { + let expr = " + + + e + + + 1 + 2 + + + + ( + + + + xμ + σ + + + ) + 2 + + + + + "; + test("ru", "SimpleSpeak", expr, + "e в степени минус одна вторая умножить на; скобка открывается, дробь, числитель: икс минус мю, знаменатель: сигма, конец дроби; скобка закрывается в квадрате"); +} + +#[test] +fn default_power() { + let expr = " + + t + + b+1 + 3 + + + "; + test("ru", "SimpleSpeak", expr, "тэ в степени дробь, числитель: бэ плюс 1, знаменатель: 3, конец дроби"); +} diff --git a/tests/Languages/ru/SimpleSpeak/multiline.rs b/tests/Languages/ru/SimpleSpeak/multiline.rs new file mode 100644 index 00000000..6e6daf10 --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/multiline.rs @@ -0,0 +1,75 @@ +use crate::common::*; + +#[test] +fn case_1() { + let expr = " + + f( + x + )={ + + + + + 1 if x<0 + + + + + + 0 if x=0 + + + + + + 1 if x>0 + + + + + "; + test("ru", "SimpleSpeak", expr, "эф от икс равно; 3 случая; \ + случай 1; минус 1, если икс; меньше 0; \ + случай 2; 0, если икс, равно 0; \ + случай 3; 1, если икс, больше 0"); +} + +#[test] +fn equation_1() { + let expr = " + + + + + + x+y + + + = + + + 7 + + + + + + 2x+3y + + + = + + + + 17 + + + + + + "; + test("ru", "SimpleSpeak", expr, "2 уравнения; \ + уравнение 1; икс плюс игрек равно 7; \ + уравнение 2; 2 икс плюс 3 игрек равно 17"); +} diff --git a/tests/Languages/ru/SimpleSpeak/sets.rs b/tests/Languages/ru/SimpleSpeak/sets.rs new file mode 100644 index 00000000..06b1f867 --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/sets.rs @@ -0,0 +1,235 @@ +use crate::common::*; + +#[test] +fn complex() { + let expr = " + + "; + test("ru", "SimpleSpeak", expr, "комплексные числа"); +} + +#[test] +fn natural() { + let expr = " + + "; + test("ru", "SimpleSpeak", expr, "натуральные числа"); +} + +#[test] +fn rationals() { + let expr = " + + "; + test("ru", "SimpleSpeak", expr, "рациональные числа"); +} + +#[test] +fn reals() { + let expr = " + + "; + test("ru", "SimpleSpeak", expr, "действительные числа"); +} + +#[test] +fn integers() { + let expr = " + + "; + test("ru", "SimpleSpeak", expr, "целые числа"); +} + +#[test] +fn msup_complex() { + let expr = " + + + 2 + + "; + test("ru", "SimpleSpeak", expr, "цэ 2"); +} + +#[test] +fn msup_natural() { + let expr = " + + + 2 + + "; + test("ru", "SimpleSpeak", expr, "эн 2"); +} + +#[test] +fn msup_rationals() { + let expr = " + + + 2 + + "; + test("ru", "SimpleSpeak", expr, "ку 2"); +} + +#[test] +fn msup_reals() { + let expr = " + + + 3 + + "; + test("ru", "SimpleSpeak", expr, "эр 3"); +} + +#[test] +fn msup_integers() { + let expr = " + + + 4 + + "; + test("ru", "SimpleSpeak", expr, "зэт 4"); +} + +#[test] +fn msup_positive_integers() { + let expr = " + + + + + + "; + test("ru", "SimpleSpeak", expr, "положительные целые числа"); +} + +#[test] +fn msup_negative_integers() { + let expr = " + + + - + + "; + test("ru", "SimpleSpeak", expr, "отрицательные целые числа"); +} + +#[test] +fn msup_positive_rationals() { + let expr = " + + + + + + "; + test("ru", "SimpleSpeak", expr, "положительные рациональные числа"); +} + +#[test] +fn msup_negative_rationals() { + let expr = " + + + - + + "; + test("ru", "SimpleSpeak", expr, "отрицательные рациональные числа"); +} + +#[test] +fn empty_set() { + let expr = " + { } + "; + test("ru", "SimpleSpeak", expr, "пустое множество"); +} + +#[test] +fn single_element_set() { + let expr = " + { 12} + "; + test("ru", "SimpleSpeak", expr, "множество 12"); +} + +#[test] +fn multiple_element_set() { + let expr = " + { 5 , 10 , 15 } + "; + test("ru", "SimpleSpeak", expr, "множество 5 запятая, 10 запятая, 15"); +} + +#[test] +fn set_with_colon() { + let expr = " + { x:x>2 } + "; + test("ru", "SimpleSpeak", expr, "множество всех x таких, что x больше 2"); +} + +#[test] +fn set_with_bar() { + let expr = " + { x|x>2 } + "; + test("ru", "SimpleSpeak", expr, "множество всех икс таких, что икс больше 2"); +} + +#[test] +fn element_alone() { + let expr = " + 3+2i + "; + test("ru", "SimpleSpeak", expr, "3 плюс 2 и, не является элементом действительных чисел"); +} + +#[test] +fn element_under_sum() { + let expr = " + + + i + + + 1 + i 2 + + "; + test("ru", "SimpleSpeak", expr, + "сумма по i, являющемуся элементом целых чисел, от; дробь, числитель: 1, знаменатель: и в квадрате, конец дроби"); +} + +#[test] +fn complicated_set_with_colon() { + let expr = " + { + x + + + : + 2 + < + x + < + 7 + } + "; + test("ru", "SimpleSpeak", expr, "множество всех икс из целых чисел, таких что 2 меньше икс меньше 7"); +} + +#[test] +fn complicated_set_with_mtext() { + let expr = " + { + x + | + x  is an even number + } + "; + test("ru", "SimpleSpeak", expr, + "множество всех икс из натуральных чисел, таких что x — четное число"); +} diff --git a/tests/Languages/ru/SimpleSpeak/subscripts.rs b/tests/Languages/ru/SimpleSpeak/subscripts.rs new file mode 100644 index 00000000..ea389089 --- /dev/null +++ b/tests/Languages/ru/SimpleSpeak/subscripts.rs @@ -0,0 +1,49 @@ +use crate::common::*; + +#[test] +fn msub_simple() { + let expr = " x 1 "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "икс 1"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], expr, "икс с индексом 1"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "икс с индексом 1"); +} + +#[test] +fn msub_not_simple() { + let expr = " x 1.2 "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "икс с индексом 1.2"); +} + +#[test] +fn msubsup_not_simple() { + let expr = " x 1.2 3 "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "икс с индексом 1.2, в кубе"); +} + +#[test] +fn msub_simple_mi() { + let expr = " x i "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "икс с индексом i"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "икс с индексом i"); +} + +#[test] +fn msub_simple_number_follows() { + let expr = " x 1 102 "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "икс 1, 10 в квадрате"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "икс с индексом 1, 10 в квадрате"); +} + +#[test] +fn msub_simple_non_number_follows() { + let expr = " x 1 2 "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "икс 1, в квадрате"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "икс с индексом 1, в квадрате"); +} + +#[test] +fn msubsup_simple() { + let expr = " x 1 x2 "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "икс 1, икс в квадрате"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "икс с индексом 1, икс в квадрате"); +} \ No newline at end of file diff --git a/tests/Languages/ru/alphabets.rs b/tests/Languages/ru/alphabets.rs new file mode 100644 index 00000000..0e5fb3b7 --- /dev/null +++ b/tests/Languages/ru/alphabets.rs @@ -0,0 +1,340 @@ +/// Тесты для правил, общих для различных стилей речи: +/// * здесь собраны тесты, посвящённые различным алфавитам +use crate::common::*; + +#[test] +fn special_alphabet_chars() { + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "фрактурная заглавная аш, фрактурная заглавная цэ"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "двойная заглавная аш, двойная заглавная пи"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "рукописная заглавная и, рукописная заглавная эм"); +} + +#[test] +fn greek() { + let expr = " Α,Ω"; + test("ru", "SimpleSpeak", expr, "заглавная альфа, заглавная омега"); + let expr = " α,ω"; + test("ru", "SimpleSpeak", expr, "альфа, омега"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "двойная заглавная дельта, двойная заглавная ипсилон"); + let expr = " α,ω"; + test("ru", "SimpleSpeak", expr, "альфа, омега"); +} + +#[test] +fn cap_cyrillic() { + let expr = " А,Я"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная я"); +} + +#[test] +fn parenthesized() { + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "а в скобках, зет в скобках"); +} + +#[test] +fn circled() { + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "заглавная а в кружке, заглавная зет в кружке"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "а в кружке, зет в кружке"); +} + +#[test] +fn fraktur() { + let expr = " 𝔄,𝔜"; + test("ru", "SimpleSpeak", expr, "фрактурная заглавная а, фрактурная заглавная игрек"); + let expr = " 𝔞,𝔷"; + test("ru", "SimpleSpeak", expr, "фрактурная а, фрактурная зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "фрактурная заглавная а, фрактурная заглавная игрек"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "фрактурная а, фрактурная зет"); +} + +#[test] +fn bold_fraktur() { + let expr = " 𝕬,𝖅"; + test("ru", "SimpleSpeak", expr, "фрактурная жирная заглавная а, фрактурная жирная заглавная зет"); + let expr = " 𝖆,𝖟"; + test("ru", "SimpleSpeak", expr, "фрактурная жирная а, фрактурная жирная зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "фрактурная жирная заглавная а, фрактурная жирная заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "фрактурная жирная а, фрактурная жирная зет"); +} + +#[test] +fn double_struck() { + let expr = " 𝔸,𝕐"; + test("ru", "SimpleSpeak", expr, "двойная заглавная а, двойная заглавная игрек"); + let expr = " 𝕒,𝕫"; + test("ru", "SimpleSpeak", expr, "двойная а, двойная зет"); + let expr = " 𝟘,𝟡"; + test("ru", "SimpleSpeak", expr, "двойной ноль, двойная девять"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "двойная заглавная а, двойная заглавная игрек"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "двойная а, двойная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "двойной ноль, двойная девять"); +} + +#[test] +fn script() { + let expr = " 𝒜,𝒵"; + test("ru", "SimpleSpeak", expr, "рукописная заглавная а, рукописная заглавная зет"); + let expr = " 𝒶,𝓏"; + test("ru", "SimpleSpeak", expr, "рукописная а, рукописная зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "рукописная заглавная а, рукописная заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "рукописная а, рукописная зет"); +} + +#[test] +fn bold_script() { + let expr = " 𝓐,𝓩"; + test("ru", "SimpleSpeak", expr, "рукописная жирная заглавная а, рукописная жирная заглавная зет"); + let expr = " 𝓪,𝔃"; + test("ru", "SimpleSpeak", expr, "рукописная жирная а, рукописная жирная зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "рукописная жирная заглавная а, рукописная жирная заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "рукописная жирная а, рукописная жирная зет"); +} + +#[test] +fn bold() { + let expr = " 𝐀,𝐙"; + test("ru", "SimpleSpeak", expr, "жирная заглавная а, жирная заглавная зет"); + let expr = " 𝐚,𝐳"; + test("ru", "SimpleSpeak", expr, "жирная а, жирная зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная заглавная а, жирная заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная а, жирная зет"); +} + +#[test] +fn italic() { + let expr = " 𝐴,𝑍"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " 𝑎,𝑧"; + test("ru", "SimpleSpeak", expr, "а, зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "а, зет"); +} + +#[test] +fn sans_serif() { + let expr = " 𝖠,𝖹"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " 𝖺,𝗓"; + test("ru", "SimpleSpeak", expr, "а, зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "а, зет"); +} + +#[test] +fn sans_serif_bold() { + let expr = " 𝗔,𝗭"; + test("ru", "SimpleSpeak", expr, "жирная заглавная а, жирная заглавная зет"); + let expr = " 𝗮,𝘇"; + test("ru", "SimpleSpeak", expr, "жирная а, жирная зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная заглавная а, жирная заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная а, жирная зет"); +} + +#[test] +fn sans_serif_italic() { + let expr = " 𝘈,𝘡"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " 𝘢,𝘻"; + test("ru", "SimpleSpeak", expr, "а, зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "а, зет"); +} + +#[test] +fn sans_serif_bold_italic() { + let expr = " 𝘼,𝙕"; + test("ru", "SimpleSpeak", expr, "жирная заглавная а, жирная заглавная зет"); + let expr = " 𝙖,𝙯"; + test("ru", "SimpleSpeak", expr, "жирная а, жирная зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная заглавная а, жирная заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная а, жирная зет"); +} + +#[test] +fn monospace() { + let expr = " 𝙰,𝚉"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " 𝚊,𝚣"; + test("ru", "SimpleSpeak", expr, "а, зет"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "а, зет"); +} + +#[test] +fn bold_greek() { + let expr = " 𝚨,𝛀"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " 𝛂,𝛚"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); +} + +#[test] +fn bold_greek_others() { + let expr = " 𝛛,𝛡"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); +} + +#[test] +fn italic_greek() { + let expr = " 𝛢,𝛺"; + test("ru", "SimpleSpeak", expr, "заглавная альфа, заглавная омега"); + let expr = " 𝛼,𝜔"; + test("ru", "SimpleSpeak", expr, "альфа, омега"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "заглавная альфа, заглавная омега"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "альфа, омега"); +} + +#[test] +fn italic_greek_others() { + let expr = " 𝜕,𝜛"; + test("ru", "SimpleSpeak", expr, "частная производная, пи"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "частная производная, пи"); +} + +#[test] +fn bold_italic_greek() { + let expr = " 𝜜,𝜴"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " 𝜶,𝝎"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); +} + +#[test] +fn bold_italic_greek_others() { + let expr = " 𝝏,𝝕"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); +} + +#[test] +fn sans_serif_bold_greek() { + let expr = " 𝝖,𝝮"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " 𝝰,𝞈"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); +} + +#[test] +fn sans_serif_bold_greek_others() { + let expr = " 𝞉,𝞏"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); +} + +#[test] +fn sans_serif_bold_italic_greek() { + let expr = " 𝞐,𝞨"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " 𝞪,𝟂"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная заглавная альфа, жирная заглавная омега"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная альфа, жирная омега"); +} + +#[test] +fn sans_serif_bold_italic_greek_others() { + let expr = " 𝟃,𝟉"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); + // Версии из частной области MathType + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "жирная частная производная, жирное пи"); +} + +#[test] +fn pua_regular() { + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "заглавная а, заглавная зет"); +} + +#[test] +fn turned() { + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "перевернутая заглавная эф, перевернутая заглавная игрек без засечек"); +} + +#[test] +fn enclosed_numbers() { + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "один в кружке, девять в кружке"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "один в скобках, девять в скобках"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "один с точкой, девять с точкой"); + let expr = " ,"; + test("ru", "SimpleSpeak", expr, "один в двойном кружке, девять в двойном кружке"); +} diff --git a/tests/Languages/ru/chemistry.rs b/tests/Languages/ru/chemistry.rs new file mode 100644 index 00000000..10d24b90 --- /dev/null +++ b/tests/Languages/ru/chemistry.rs @@ -0,0 +1,721 @@ +/// Тесты для правил, общих для различных стилей речи: +/// * модифицированная переменная +use crate::common::*; + +#[test] +fn salt() { + let expr = "NaCl"; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "заглавная эн а, заглавная цэ эль"); +} + +#[test] +fn water() { + let expr = "H2O"; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Terse")], expr, "заглавная аш, 2 заглавная о"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium")], expr, "заглавная аш, нижний индекс 2 заглавная о"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose")], expr, "заглавная аш, нижний индекс 2, заглавная о"); +} + +#[test] +fn carbon() { + let expr = "C"; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "заглавная цэ"); +} + +#[test] +fn sulfate() { + let expr = " + [SO4] + 2 + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium")], expr, "открывающая квадратная скобка, заглавная эс, заглавная о, нижний индекс 4; закрывающая квадратная скобка, верхний индекс 2 минус"); +} + +#[test] +fn aluminum_sulfate() { + let expr = "Al2 + (SO4)3"; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Terse")], expr, "заглавная а эль, 2, открыть заглавная эс, заглавная о, 4, закрыть 3"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium")], expr, "заглавная а эль, нижний индекс 2; открывающая круглая скобка, заглавная эс, заглавная о, нижний индекс 4; закрывающая круглая скобка, нижний индекс 3"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose")], expr, "заглавная а эль, нижний индекс 2; открывающая круглая скобка, заглавная эс, заглавная о, нижний индекс 4; закрывающая круглая скобка, нижний индекс 3"); +} + +#[test] +fn ethanol_bonds() { + let expr = " + + C + H 3 + + C + H 2 + + O + H + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Terse")], expr, "заглавная цэ, заглавная аш, 3 одинарная связь заглавная цэ, заглавная аш, 2 одинарная связь заглавная о, заглавная аш"); +} + +#[test] +fn dichlorine_hexoxide() { + let expr = " + + [ClO2] + + + + + [ClO4] + - + + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "открывающая квадратная скобка, заглавная цэ эль, заглавная о, 2, закрывающая квадратная скобка плюс; открывающая квадратная скобка, заглавная цэ эль, заглавная о, 4, закрывающая квадратная скобка минус"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], + expr, "открывающая квадратная скобка, заглавная цэ эль, заглавная о, нижний индекс 2; закрывающая квадратная скобка, верхний индекс плюс; открывающая квадратная скобка, заглавная цэ эль, заглавная о, нижний индекс 4; закрывающая квадратная скобка, верхний индекс минус"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], + expr, "открывающая квадратная скобка, заглавная цэ эль, заглавная о, нижний индекс 2; закрывающая квадратная скобка, верхний индекс плюс; открывающая квадратная скобка, заглавная цэ эль, заглавная о, нижний индекс 4; закрывающая квадратная скобка, верхний индекс минус"); +} + +#[test] +fn ethylene_with_bond() { + let expr = " + H2C + = + CH2 + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "заглавная аш, 2 заглавная цэ, двойная связь заглавная цэ, заглавная аш, 2"); +} + +#[test] +fn ferric_chloride_aq() { + let expr = " + Fe + Cl3 + (aq) + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "заглавная эф е, заглавная цэ эль, 3 водный"); +} + +#[test] +fn ethylene_with_colon_bond() { + let expr = " + H2C + :: + CH2 + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "заглавная аш, 2 заглавная цэ, двойная связь заглавная цэ, заглавная аш, 2"); +} + +#[test] +fn beta_decay() { + let expr = " + + C + + 6 + 14 + + + + N + + 7 + 14 + + + + + e + + + + 1 + + 0 + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Terse")], expr, + "14, 6, заглавная цэ; образует, 14, 7, заглавная эн; плюс 0, минус 1, е"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium")], expr, + "верхний индекс 14, нижний индекс 6, заглавная цэ; реагирует с образованием; верхний индекс 14, нижний индекс 7, заглавная эн; плюс верхний индекс 0, нижний индекс минус 1, е"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose")], expr, + "верхний индекс 14, нижний индекс 6, заглавная цэ; реагирует с образованием; верхний индекс 14, нижний индекс 7, заглавная эн; плюс, верхний индекс 0, нижний индекс минус 1, е"); +} + +#[test] +fn mhchem_beta_decay() { + let expr = " + + + + + + + A + + + + + + + + + 6 + + + + + + + + + 14 + + + + + + + + + + + + A + + + + + + + + + 2 + + + + + + + + 6 + + + + + + + + + + + + 2 + + + + + + + + 14 + + + + + + C + + + + + + + + + + + + A + + + + + + + + + 7 + + + + + + + + + 14 + + + + + + + + + + + + A + + + + + + + + + 2 + + + + + + + + 7 + + + + + + + + + + + + 2 + + + + + + + + 14 + + + + + + N + + + + + + + + + + + A + + + + + + + + + + 1 + + + + + + + + + 0 + + + + + + + + + + + + A + + + + + + + + + 2 + + + + + + + + + 1 + + + + + + + + + + + + 2 + + + + + + + + 0 + + + + + + e + + + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Terse")], expr, + "14, 6, заглавная цэ; образует, 14, 7, заглавная эн; плюс 0, минус 1, е"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium")], expr, + "верхний индекс 14, нижний индекс 6, заглавная цэ; реагирует с образованием; верхний индекс 14, нижний индекс 7, заглавная эн; плюс верхний индекс 0, нижний индекс минус 1, е"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose")], expr, + "верхний индекс 14, нижний индекс 6, заглавная цэ; реагирует с образованием; верхний индекс 14, нижний индекс 7, заглавная эн; плюс, верхний индекс 0, нижний индекс минус 1, е"); +} + +#[test] +fn hcl_na_yields() { + let expr = " + 2HCl+2Na + + 2NaCl+ + H 2 + + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, + "2, заглавная аш, заглавная цэ эль; плюс 2 заглавная эн а; реагирует с образованием; 2, заглавная эн а, заглавная цэ эль; плюс заглавная аш, нижний индекс 2"); +} + +#[test] +fn mhchem_so4_2plus() { + let expr = " + + + SO + + + + + + + A + + + + + + + + 4 + + + + + + + + + + A + + + + + + 2 + + + + + + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "заглавная эс; заглавная о, 4, 2 плюс"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], expr, "заглавная эс; заглавная о, нижний индекс 4, верхний индекс 2 плюс"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "заглавная эс; заглавная о, нижний индекс 4, верхний индекс 2 плюс"); +} + +#[test] +fn mhchem_hcl_aq_etc() { + let expr = " + + 2 + + + + + HCl + + + ( + + aq + + ) + + + + + 2 + + + + + Na + + + ( + + s + + ) + + + + + + 2 + + + + + NaCl + + + ( + + aq + + ) + + + + + + H + + + + + + + A + + + + + + + + 2 + + + + + + ( + + g + + ) + + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "2, заглавная аш, заглавная цэ эль, водный; плюс, 2, заглавная эн а, твердый; образует; 2, заглавная эн а, заглавная цэ эль, водный; плюс, заглавная аш, 2, газ"); +} + +#[test] +fn mhchem_barbed_equilibrium() { + let expr = " + + + + H + 2 + + + + + ( + g + ) + + + + + + + + I + 2 + + + + + ( + g + ) + + + + + + + - + + + - + + + + + 2 + + + H + + I + + + ( + g + ) + + + + + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "заглавная аш, 2, газ; плюс; заглавная и, 2, газ; находится в равновесии с, 2, заглавная аш, заглавная и, газ"); +} + +#[test] +fn mhchem_roman_in_superscript() { + let expr = " + + + Fe + + II + + + + Fe + + III + + + + O + 4 + + + + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "заглавная эф е, 2; заглавная эф е, 3; заглавная о, 4"); +} + +#[test] +fn dropped_msubsup_bug_358() { + let expr = r#" + + + 2 + + + SO + + 2 + + + + + + + + + O + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + SO + + 3 + + + + + + + + "#; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "2, заглавная эс, заглавная о, 2; плюс; заглавная о, 2 находится в равновесии с, 2, заглавная эс, заглавная о, 3"); +} + + diff --git a/tests/Languages/ru/intent.rs b/tests/Languages/ru/intent.rs new file mode 100644 index 00000000..3865f5ff --- /dev/null +++ b/tests/Languages/ru/intent.rs @@ -0,0 +1,116 @@ +/// Тесты для правил, общих для различных стилей речи: +/// * здесь собраны тесты, посвящённые различным алфавитам +use crate::common::*; + +#[test] +fn silent_intent() { + let expr = " 2 x "; + test("ru", "SimpleSpeak", expr, "2 икс"); + test("ru", "LiteralSpeak", expr, "2 икс"); +} + +#[test] +fn prefix_intent() { + let expr = r#" x T "#; + test("ru", "SimpleSpeak", expr, "икс"); +} + +#[test] +fn postfix_intent() { + let expr = r#" x T "#; + test("ru", "SimpleSpeak", expr, "икс"); +} + +#[test] +fn infix_intent() { + let expr = r#" + x + y + z + "#; + test("ru", "SimpleSpeak", expr, "икс игрек зет 2"); +} + +#[test] +fn infix_intent_no_args() { + // this is illegal intent, so it is just an mrow with one child + let expr = r#" + x + "#; + test("ru", "SimpleSpeak", expr, "икс"); +} + +#[test] +fn infix_intent_one_arg() { + let expr = r#" + x + "#; + // Note: we say the intent name because there are infix plus/minus with a single arg due to continued rows or combined columns + test("ru", "SimpleSpeak", expr, "икс"); +} + +#[test] +fn function_intent() { + let expr = r#" + x + y + z + "#; + test("ru", "SimpleSpeak", expr, "икс запятая, игрек запятая, зет запятая, 2"); +} + +#[test] +fn function_no_args_intent() { + // this is illegal intent, so it is just an mrow with one child + let expr = r#" + x + "#; + test("ru", "SimpleSpeak", expr, "икс"); +} + +#[test] +fn function_one_arg_intent() { + let expr = r#" + x + "#; + test("ru", "SimpleSpeak", expr, "икс"); +} + +#[test] +fn silent_intent_mi() { + let expr = " 2 x"; + test("ru", "SimpleSpeak", expr, "2"); + test("ru", "ClearSpeak", expr, "2"); +} + +#[test] +fn silent_intent_msup() { + let expr = " + + H + 2 + "; + test("ru", "SimpleSpeak", expr, "заглавная аш 2"); + test("ru", "ClearSpeak", expr, "заглавная аш 2"); +} + +#[test] +fn silent_intent_underscore() { + let expr = " + + H + 2 + "; + test("ru", "SimpleSpeak", expr, "заглавная аш 2"); + test("ru", "ClearSpeak", expr, "заглавная аш 2"); +} + +#[test] +fn intent_prob_x() { + let expr = " + + x + P + "; + test("ru", "ClearSpeak", expr, "вероятность икс"); +} \ No newline at end of file diff --git a/tests/Languages/ru/mtable.rs b/tests/Languages/ru/mtable.rs new file mode 100644 index 00000000..9de995f8 --- /dev/null +++ b/tests/Languages/ru/mtable.rs @@ -0,0 +1,1084 @@ +use crate::common::*; + +#[test] +fn matrix_1x1() { + let expr = " + + + ( + + 3 + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица 1 на 1 с элементом 3"); + test("ru", "SimpleSpeak", expr, "матрица 1 на 1 с элементом 3"); +} + +#[test] +fn determinant_1x1() { + let expr = " + + + | + + 3 + + | + + "; + test("ru", "ClearSpeak", expr, "определитель 1 на 1 с элементом 3"); + test("ru", "SimpleSpeak", expr, "определитель 1 на 1 с элементом 3"); +} + + +#[test] +fn matrix_1x2() { + let expr = " + + + ( + + + + 3 + + + 5 + + + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица-строка 1 на 2; 3, 5"); + test("ru", "SimpleSpeak", expr, "матрица-строка 1 на 2; 3, 5"); +} + + +#[test] +fn matrix_1x3() { + let expr = " + + + ( + + + + -x + + + 5 + + + 12 + + + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица-строка 1 на 3; минус икс, 5, 12"); + test("ru", "SimpleSpeak", expr, "матрица-строка 1 на 3; минус икс, 5, 12"); +} + +#[test] +fn matrix_2x1_not_simple() { + let expr = " + + + ( + + + + + x+1 + + + + + + + x-1 + + + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица-столбец 2 на 1; строка 1; икс плюс 1; строка 2; икс минус 1"); + test("ru", "SimpleSpeak", expr, "матрица-столбец 2 на 1; строка 1; икс плюс 1; строка 2; икс минус 1"); +} +#[test] +fn matrix_3x1_not_simple() { + let expr = " + + + ( + + + + + x + + + + + + + a + + + + + + + x + + x+1 + + + + + + ) + "; + test("ru", "SimpleSpeak", expr, "матрица-столбец 3 на 1; \ + строка 1; икс; \ + строка 2; а; \ + строка 3; дробь, икс делить на, икс плюс 1, конец дроби"); + test("ru", "ClearSpeak", expr, "матрица-столбец 3 на 1; \ + строка 1; икс; \ + строка 2; а; \ + строка 3; дробь, числитель икс; знаменатель икс плюс 1"); +} + +#[test] +fn determinant_2x2() { + let expr = " + + | + + + + 2 + + + 1 + + + + + 7 + + + 5 + + + + + | + "; + test("ru", "ClearSpeak", expr, "определитель 2 на 2; строка 1; 2, 1; строка 2; 7, 5"); + test("ru", "SimpleSpeak", expr, "определитель 2 на 2; строка 1; 2, 1; строка 2; 7, 5"); +} + +#[test] +fn matrix_2x3() { + let expr = " + + + [ + + + + 3 + + + 1 + + + 4 + + + + + 0 + + + 2 + + + 6 + + + + ] + + "; + test("ru", "ClearSpeak", expr, "матрица 2 на 3; строка 1; 3, 1, 4; строка 2; 0, 2, 6"); + test("ru", "SimpleSpeak", expr, "матрица 2 на 3; строка 1; 3, 1, 4; строка 2; 0, 2, 6"); +} + +#[test] +fn matrix_2x3_labeled() { + let expr = " + + + [ + + + + (3.1) + + + 3 + + + 1 + + + 4 + + + + + 0 + + + 2 + + + 6 + + + + ] + + "; + test("ru", "ClearSpeak", expr, + "матрица 2 на 3; строка 1 с меткой (3.1); столбец 2; 3, столбец 3; 1, столбец 4; 4; \ + строка 2; столбец 1; 0, столбец 2; 2, столбец 3; 6"); + test("ru", "SimpleSpeak", expr, + "матрица 2 на 3; строка 1 с меткой (3.1); столбец 2; 3, столбец 3; 1, столбец 4; 4; \ + строка 2; столбец 1; 0, столбец 2; 2, столбец 3; 6"); +} + +#[test] +fn matrix_3x1() { + let expr = " + + + [ + + + + 1 + + + + + 2 + + + + + 3 + + + ] + + "; + test("ru", "ClearSpeak", expr, "матрица-столбец 3 на 1; 1; 2; 3"); + test("ru", "SimpleSpeak", expr, "матрица-столбец 3 на 1; 1; 2; 3"); +} + +#[test] +fn matrix_4x1() { + let expr = " + + + ( + + + + 3 + + + + + 6 + + + + + 1 + + + + + 2 + + + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица-столбец 4 на 1; строка 1; 3; строка 2; 6; строка 3; 1; строка 4; 2"); + test("ru", "SimpleSpeak", expr, "матрица-столбец 4 на 1; строка 1; 3; строка 2; 6; строка 3; 1; строка 4; 2"); +} + +#[test] +fn matrix_4x1_labeled() { + let expr = " + + + ( + + + + 3 + + + + + 6 + + + + + 1 + + + + + (3.1) + + + 2 + + + + ) + + "; + test("ru", "ClearSpeak", expr, + "матрица-столбец 4 на 1; строка 1; 3; строка 2; 6; строка 3; 1; строка 4 с меткой (3.1); 2"); + test("ru", "SimpleSpeak", expr, + "матрица-столбец 4 на 1; строка 1; 3; строка 2; 6; строка 3; 1; строка 4 с меткой (3.1); 2"); +} + +#[test] +fn matrix_1x4() { + let expr = " + + + ( + + + + 3 + + + 6 + + + 1 + + + 2 + + + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица-строка 1 на 4; столбец 1; 3, столбец 2; 6, столбец 3; 1, столбец 4; 2"); + test("ru", "SimpleSpeak", expr, "матрица-строка 1 на 4; столбец 1; 3, столбец 2; 6, столбец 3; 1, столбец 4; 2"); +} + +#[test] +fn matrix_4x4() { + let expr = " + + + ( + + + + 0 + + + 3 + + + 4 + + + 3 + + + + + 2 + + + 1 + + + 0 + + + 9 + + + + + 3 + + + 0 + + + 2 + + + 1 + + + + + 6 + + + 2 + + + 9 + + + 0 + + + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица 4 на 4; \ + строка 1; столбец 1; 0, столбец 2; 3, столбец 3; 4, столбец 4; 3; \ + строка 2; столбец 1; 2, столбец 2; 1, столбец 3; 0, столбец 4; 9; \ + строка 3; столбец 1; 3, столбец 2; 0, столбец 3; 2, столбец 4; 1; \ + строка 4; столбец 1; 6, столбец 2; 2, столбец 3; 9, столбец 4; 0"); + test("ru", "SimpleSpeak", expr, "матрица 4 на 4; \ + строка 1; столбец 1; 0, столбец 2; 3, столбец 3; 4, столбец 4; 3; \ + строка 2; столбец 1; 2, столбец 2; 1, столбец 3; 0, столбец 4; 9; \ + строка 3; столбец 1; 3, столбец 2; 0, столбец 3; 2, столбец 4; 1; \ + строка 4; столбец 1; 6, столбец 2; 2, столбец 3; 9, столбец 4; 0");} + +#[test] +fn matrix_4x2() { + let expr = " + + + ( + + + + 1 + + + 3 + + + + + 4 + + + 2 + + + + + 2 + + + 1 + + + + + 0 + + + 5 + + + + + ) + + "; + test("ru", "ClearSpeak", expr, "матрица 4 на 2; \ + строка 1; столбец 1; 1, столбец 2; 3; \ + строка 2; столбец 1; 4, столбец 2; 2; \ + строка 3; столбец 1; 2, столбец 2; 1; \ + строка 4; столбец 1; 0, столбец 2; 5\ + "); + test("ru", "SimpleSpeak", expr, "матрица 4 на 2; \ + строка 1; столбец 1; 1, столбец 2; 3; \ + строка 2; столбец 1; 4, столбец 2; 2; \ + строка 3; столбец 1; 2, столбец 2; 1; \ + строка 4; столбец 1; 0, столбец 2; 5\ + ");} + +// поместим тест для абсолютной величины сюда, так как он связан с определителем и слишком мал для отдельного файла +#[test] +fn simple_absolute_value() { + let expr = " + | x | + "; + test("ru", "SimpleSpeak", expr, "абсолютная величина икс"); + test("ru", "ClearSpeak", expr, "абсолютная величина икс"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Terse"), ("ClearSpeak_AbsoluteValue", "Auto")], expr, "абсолютная величина икс"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Verbose"), ("ClearSpeak_AbsoluteValue", "AbsEnd")], + expr, "абсолютная величина икс, конец абсолютной величины"); +} + +#[test] +fn absolute_value_plus_1() { +let expr = " + | + x+1 + | + "; + test("ru", "ClearSpeak", expr, "абсолютная величина икс плюс 1"); + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Terse"), ("ClearSpeak_AbsoluteValue", "AbsEnd")], + expr, "абсолютная величина икс плюс 1, конец абсолютной величины"); +} + +#[test] +fn simple_cardinality_value() { + let expr = " + | S | + "; + test_prefs("ru", "ClearSpeak", vec![("Verbosity", "Medium"), ("ClearSpeak_AbsoluteValue", "Cardinality")], expr, + "мощность заглавная эс"); +} + +// Тестирование предпочтений +#[test] +fn simple_matrix_speak_col_num() { +let expr = " + + ( + + + + 2 + 1 + + + 7 + 5 + + + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Matrix", "SpeakColNum", + expr, "матрица 2 на 2; строка 1; столбец 1; 2, столбец 2; 1; строка 2; столбец 1; 7, столбец 2; 5"); +} + +#[test] +fn col_matrix_3x1_speak_col_num() { +let expr = " + + ( + + + + 1 + + + 2 + + + 3 + + + ) + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "SpeakColNum", + expr, "матрица-столбец 3 на 1; строка 1; 1; строка 2; 2; строка 3; 3"); +} + +#[test] +fn row_matrix_1x2_speak_col_num() { +let expr = " + + [ + + + + 1 2 + + + ] + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "SpeakColNum", + expr, "матрица-строка 1 на 2; столбец 1; 1, столбец 2; 2"); +} + +#[test] +fn matrix_2x2_speak_col_num() { +let expr = "( + + + b11 + b12 + + + b21 + b22 + + + )"; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "SpeakColNum", + expr, "матрица 2 на 2; строка 1; столбец 1; бэ нижний индекс 1 1; столбец 2; бэ нижний индекс 1 2; \ + строка 2; столбец 1; бэ нижний индекс 2 1; столбец 2; бэ нижний индекс 2 2"); +} + + +#[test] +fn simple_matrix_silent_col_num() { +let expr = " + + ( + + + + 2 + 1 + + + 7 + 5 + + + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Matrix", "SilentColNum", + expr, "матрица 2 на 2; строка 1; 2, 1; строка 2; 7, 5"); +} + +#[test] +fn col_matrix_3x1_silent_col_num() { +let expr = " + + ( + + + + 1 + + + 2 + + + 3 + + + ) + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "SilentColNum", + expr, "матрица-столбец 3 на 1; 1; 2; 3"); +} + +#[test] +fn row_matrix_1x2_silent_col_num() { +let expr = " + + [ + + + + 1 2 + + + ] + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "SilentColNum", + expr, "матрица-строка 1 на 2; 1, 2"); +} + +#[test] +fn matrix_2x2_silent_col_num() { +let expr = "( + + + b11 + b12 + + + b21 + b22 + + + )"; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "SilentColNum", + expr, "матрица 2 на 2; строка 1; бэ нижний индекс 1 1; бэ нижний индекс 1 2; \ + строка 2; бэ нижний индекс 2 1; бэ нижний индекс 2 2"); +} + + +#[test] +fn simple_matrix_end_matrix() { +let expr = " + + ( + + + + 2 + 1 + + + 7 + 5 + + + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndMatrix", + expr, "матрица 2 на 2; строка 1; 2, 1; строка 2; 7, 5; конец матрицы"); +} + +#[test] +fn col_matrix_3x1_end_matrix() { +let expr = " + + ( + + + + 1 + + + 2 + + + 3 + + + ) + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndMatrix", + expr, "матрица-столбец 3 на 1; 1; 2; 3; конец матрицы"); +} + +#[test] +fn row_matrix_1x2_end_matrix() { +let expr = " + + [ + + + + 1 2 + + + ] + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndMatrix", + expr, "матрица-строка 1 на 2; 1, 2; конец матрицы"); +} + +#[test] +fn matrix_2x2_end_matrix() { +let expr = "( + + + b11 + b12 + + + b21 + b22 + + + )"; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndMatrix", + expr, "матрица 2 на 2; строка 1; столбец 1; бэ нижний индекс 1 1; столбец 2; бэ нижний индекс 1 2; \ + строка 2; столбец 1; бэ нижний индекс 2 1; столбец 2; бэ нижний индекс 2 2; конец матрицы"); +} + + +#[test] +fn simple_matrix_vector() { +let expr = " + + ( + + + + 2 + 1 + + + 7 + 5 + + + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Matrix", "Vector", + expr, "матрица 2 на 2; строка 1; 2, 1; строка 2; 7, 5"); +} + +#[test] +fn col_matrix_3x1_vector() { +let expr = " + + ( + + + + 1 + + + 2 + + + 3 + + + ) + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "Vector", + expr, "вектор-столбец 3 на 1; 1; 2; 3"); +} + +#[test] +fn row_matrix_1x2_vector() { +let expr = " + + [ + + + + 1 2 + + + ] + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "Vector", + expr, "вектор-строка 1 на 2; 1, 2"); +} + +#[test] +fn matrix_2x2_vector() { +let expr = "( + + + b11 + b12 + + + b21 + b22 + + + )"; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "Vector", + expr, "матрица 2 на 2; строка 1; столбец 1; бэ нижний индекс 1 1; столбец 2; бэ нижний индекс 1 2; \ + строка 2; столбец 1; бэ нижний индекс 2 1; столбец 2; бэ нижний индекс 2 2"); +} + + +#[test] +fn simple_matrix_end_vector() { +let expr = " + + ( + + + + 2 + 1 + + + 7 + 5 + + + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndVector", + expr, "матрица 2 на 2; строка 1; 2, 1; строка 2; 7, 5; конец матрицы"); +} + +#[test] +fn col_matrix_3x1_end_vector() { +let expr = " + + ( + + + + 1 + + + 2 + + + 3 + + + ) + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndVector", + expr, "вектор-столбец 3 на 1; 1; 2; 3; конец вектора"); +} + +#[test] +fn row_matrix_1x2_end_vector() { +let expr = " + + [ + + + + 1 2 + + + ] + "; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndVector", + expr, "вектор-строка 1 на 2; 1, 2; конец вектора"); +} + +#[test] +fn matrix_2x2_end_vector() { +let expr = "( + + + b11 + b12 + + + b21 + b22 + + + )"; +test_ClearSpeak("ru", "ClearSpeak_Matrix", "EndVector", + expr, "матрица 2 на 2; строка 1; столбец 1; бэ нижний индекс 1 1; столбец 2; бэ нижний индекс 1 2; \ + строка 2; столбец 1; бэ нижний индекс 2 1; столбец 2; бэ нижний индекс 2 2; конец матрицы"); +} + + + +#[test] +fn matrix_binomial() { + let expr = " + ( + 32 + ) + "; + test_ClearSpeak("ru", "ClearSpeak_Matrix", "Combinatorics", expr, "число сочетаний из 3 по 2"); +} + +#[test] +fn matrix_times() { + let expr = " + 1234 + abcd + "; + test("ru", "SimpleSpeak", expr, + "матрица 2 на 2; строка 1; 1, 2; строка 2; 3, 4; умножить на, матрица 2 на 2; строка 1; а, б; строка 2; цэ, дэ"); +} + +#[test] +fn unknown_mtable_property() { + let expr = " + + + + a + + + = + + + + b + + + c + + d + + + + + + + + + + e + + f + + + + "; + test("ru", "ClearSpeak", expr, + "2 строки; строка 1; а равно b плюс цэ минус дэ; строка 2; плюс e минус f"); +} + + +#[test] +fn zero_matrix() { + let expr = " + [ + + 00 + 00 + + ] + "; + test("ru", "SimpleSpeak", expr, + "нулевая матрица 2 на 2"); +} + +#[test] +fn identity_matrix() { + let expr = " + ( + + 100 + 010 + 001 + + ) + "; + test("ru", "SimpleSpeak", expr, + "единичная матрица 3 на 3"); +} + +#[test] +fn diagonal_matrix() { + let expr = " + ( + + 200 + 010 + 00x2 + + ) + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], + expr, "диагональная матрица 3 на 3; столбец 1; 2; столбец 2; 1; столбец 3; икс в квадрате"); + // test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], + // expr, "диагональная матрица 3 на 3; строка 1, столбец 1, 2; строка 2, столбец 2, 1; строка 3, столбец 3, икс в квадрате"); +} diff --git a/tests/Languages/ru/shared.rs b/tests/Languages/ru/shared.rs new file mode 100644 index 00000000..8282ec2c --- /dev/null +++ b/tests/Languages/ru/shared.rs @@ -0,0 +1,451 @@ +/// Тесты для правил, общих для различных стилей речи: +/// * модифицированная переменная +use crate::common::*; + +#[test] +fn modified_vars() { + let expr = " + a ` + b ~ + c ̆ + b ̌ + c ` + + r ˇ + + x . + y ˙ + z ¨ + u + v + + x ^ + + t + "; + test("ru", "SimpleSpeak", expr, + "а гравис, б тильда, цэ брэвэ, б гачек, цэ гравис; плюс \ + эр гачек; плюс икс точка, игрек точка, зет две точки, у три точки, вэ четыре точки; плюс икс циркумфлекс, плюс вектор тэ"); +} + +#[test] +fn limit() { + let expr = " + + lim + x 0 + + + + sin x + x + + + "; + test("ru", "SimpleSpeak", expr, "предел при x стремящемся к 0, от, дроби, синус икс, делить на, икс, конец дроби"); + test_prefs("ru", "SimpleSpeak", vec![("Impairment", "LearningDisability")], expr, + "предел при x стремящемся к 0, от; синус икс, делить на икс"); +} + +#[test] +fn limit_from_below() { + let expr = " + + lim + x 0 + + + sin x + + "; + test("ru", "SimpleSpeak", expr, "предел при x стремящемся к 0 снизу, от синус икс"); +} + +#[test] +fn binomial_mmultiscripts() { + let expr = "Cmn"; + test("ru", "SimpleSpeak", expr, "число сочетаний из n по m"); +} + +#[test] +fn binomial_mmultiscripts_other() { + let expr = "Cmn"; + test("ru", "SimpleSpeak", expr, "число сочетаний из n по m"); +} + +#[test] +fn binomial_subscript() { // C_{n,k} + let expr = "Cn,m"; + test("ru", "SimpleSpeak", expr, "число сочетаний из n по m"); +} + +#[test] +fn permutation_mmultiscripts() { + let expr = "Pkn"; + test("ru", "SimpleSpeak", expr, "число размещений из n по k"); +} + +#[test] +fn permutation_mmultiscripts_sup() { + let expr = "Pkn"; + test("ru", "SimpleSpeak", expr, "число размещений из n по k"); +} + +#[test] +fn permutation_msubsup() { + let expr = "Pkn"; + test("ru", "SimpleSpeak", expr, "число размещений из n по k"); +} + +#[test] +fn tensor_mmultiscripts() { + let expr = " + R i j k l + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, + "заглавная эр с 4 индексами после, нижний индекс i верхний индекс j нижний индекс k нижний индекс l"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Medium")], expr, + "заглавная эр с 4 индексами после, нижний i верхний j нижний k нижний l"); +} + +#[test] +fn huge_num_mmultiscripts() { + let expr = " + R i j k l m + I J K L + "; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, + "заглавная эр с 4 индексами перед, перед нижний заглавная и, перед верхний заглавная джей и далее перед нижний заглавная ка перед нижний заглавная эль, и с 5 индексами после, нижний индекс i верхний индекс j нижний индекс k нижний индекс l и далее нижний индекс m"); +} + +#[test] +fn prime() { + let expr = " x "; + test("ru", "SimpleSpeak", expr, "икс штрих"); +} + +#[test] +fn given() { + let expr = "P(A|B)"; + test("ru", "SimpleSpeak", expr, "заглавная пэ, открывающая круглая скобка, заглавная а при условии заглавная бэ, закрывающая круглая скобка"); + test("ru", "ClearSpeak", expr, "заглавная пэ, открывающая круглая скобка, заглавная а при условии заглавная бэ, закрывающая круглая скобка"); +} + +#[test] +fn simple_msubsup() { + let expr = " + + + x + + k + + + i + + + + "; + test("ru", "ClearSpeak", expr, "икс нижний индекс k, в степени i"); +} + +#[test] +fn non_simple_msubsup() { + let expr = "ij2k"; + test("ru", "SimpleSpeak", expr, "и нижний индекс j минус 2, в степени k"); + test("ru", "ClearSpeak", expr, "и нижний индекс j минус 2, в степени k"); + test_prefs("ru", "SimpleSpeak", vec![("Impairment", "LearningDisability")], expr, + "и нижний индекс j минус 2, в степени k"); +} + +#[test] +fn presentation_mathml_in_semantics() { + let expr = " + + {\\displaystyle x_k^i} + + + x + + k + + + i + + + + + "; + test("ru", "ClearSpeak", expr, "икс нижний индекс k, в степени i"); +} + +#[test] +fn ignore_period() { + let expr = " + + {\\displaystyle x_k^i} + + + + P + ( + A + + +  and  + + + B + ) + = + P + ( + A + + B + ) + = + P + ( + A + ) + P + ( + B + ) + . + + + + + "; + test("ru", "SimpleSpeak", expr, "заглавная пэ; открывающая круглая скобка, заглавная а и заглавная бэ; закрывающая круглая скобка; равно; заглавная пэ, открывающая круглая скобка, заглавная а пересечение заглавная бэ; закрывающая круглая скобка; равно, заглавная пэ от заглавной а, заглавная пэ от заглавной бэ"); +} + +#[test] +fn ignore_mtext_period() { + let expr = "{2}."; + test("ru", "SimpleSpeak", expr, "множество 2"); +} + +#[test] +fn ignore_comma() { + let expr = " + + + ϕ + ( + x + ) + = + c + + e + + + + h + + 2 + + + + x + + 2 + + + + + , + + +"; + test("ru", "SimpleSpeak", expr, "фи от икс равно; цэ, e в степени минус аш в квадрате, икс в квадрате"); +} + +#[test] +#[ignore] // issue #14 +fn ignore_period_and_space() { + let expr = " + + + P + ( + A + + B + ) + = + + + + P + ( + A + + B + ) + + + P + ( + B + ) + + + + . + + + +"; + test("ru", "ClearSpeak", expr, "фи от икс равно; цэ, e в степени минус аш в квадрате икс в квадрате"); +} + +#[test] +fn bug_199_2pi() { + let expr = " + + [ + + 0 + + , + + 2 + π + + ) + + "; + test("ru", "SimpleSpeak",expr, "полуинтервал от 0 до 2 пи"); +} + +#[test] +fn caret_and_hat() { + let expr = "x^2+y^"; + test("ru", "SimpleSpeak",expr, "икс крышка 2 плюс игрек циркумфлекс"); +} + +#[test] +fn mn_with_space() { + let expr = "1 234 567"; + test_prefs("ru", "SimpleSpeak", vec![("DecimalSeparators", "."), ("BlockSeparators", " ,")], expr, "1234567"); +} + +#[test] +fn mn_with_block_and_decimal_separators() { + let expr = "1,234.56"; + test_prefs("ru", "SimpleSpeak", vec![("DecimalSeparators", "."), ("BlockSeparators", " ,")], expr, "1234.56"); +} + +#[test] +fn divergence() { + let expr = "·F"; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "див заглавная эф"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "дивергенция заглавной эф"); +} + +#[test] +fn curl() { + let expr = "×F"; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "ротор заглавная эф"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "ротор заглавной эф"); +} + +#[test] +fn gradient() { + let expr = "F"; + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Terse")], expr, "набла заглавная эф"); + test_prefs("ru", "SimpleSpeak", vec![("Verbosity", "Verbose")], expr, "градиент заглавной эф"); +} + +#[test] +fn literal_speak() { + let expr = r#" + + + A + + + + + B + + + + "#; + test("ru", "LiteralSpeak", expr, "заглавная а со стрелкой, перпендикулярно, заглавная бэ со стрелкой"); +} + +#[test] +fn literal_speak_with_name() { + let expr = r#" + + f + + + ( + + x + ! + + ) + + + "#; + test("ru", "LiteralSpeak", expr, "форсид эф, открывающая круглая скобка икс восклицательный знак, закрывающая круглая скобка"); +} + +#[test] +fn literal_speak_with_property() { + let expr = r#" + + f + + + ( + + x + ! + + ) + + + "#; + test("ru", "LiteralSpeak", expr, "эф, открывающая круглая скобка икс восклицательный знак, закрывающая круглая скобка"); +} + +#[test] +fn literal_intent_property() { + let expr = r#" + + + A + + + + + B + + + + "#; + test("ru", "SimpleSpeak", expr, "заглавная а со стрелкой, перпендикулярно, заглавная бэ со стрелкой"); +} + +#[test] +fn literal_intent_property_with_name() { + let expr = r#" + + f + + + ( + + x + ! + + ) + + + "#; + test("ru", "SimpleSpeak", expr, "форсид эф, открывающая круглая скобка икс восклицательный знак, закрывающая круглая скобка"); +} diff --git a/tests/Languages/ru/units.rs b/tests/Languages/ru/units.rs new file mode 100644 index 00000000..ec468894 --- /dev/null +++ b/tests/Languages/ru/units.rs @@ -0,0 +1,489 @@ +/// Тесты для правил, общих для различных стилей речи: +/// * модифицированная переменная +use crate::common::*; + +// Основная структура тестов: +// 1. Проход по всем приставкам СИ +// 2. Проход по каждой группе единиц СИ +// a) как в единственном, так и во множественном числе без приставок +// b) как в единственном, так и во множественном числе с одной приставкой +// 3. Проход по каждой группе единиц, не принимающих приставки СИ +// Они разбиты на части, чтобы легче было видеть ошибки, когда они есть. + +#[test] +fn prefix_sweep() { + let expr = r#" + Qg, + Rg, + Yg, + Zg, + Eg, + Pg, + Tg, + Gg, + Mg, + kg, + hg, + dag, + dg, + cg, + mg, + µg, + ng, + pg, + fg, + ag, + zg, + yg, + rg, + qg + "#; + test("ru", "SimpleSpeak", expr, + "кветта-граммы, запятая, \ + ронна-граммы, запятая, \ + иотта-граммы, запятая, \ + зетта-граммы, запятая, \ + экса-граммы, запятая, \ + пета-граммы, запятая, \ + тера-граммы, запятая, \ + гига-граммы, запятая, \ + мега-граммы, запятая, \ + кило-граммы, запятая, \ + гекто-граммы, запятая, \ + дека-граммы, запятая, \ + деци-граммы, запятая, \ + санти-граммы, запятая, \ + милли-граммы, запятая, \ + микро-граммы, запятая, \ + нано-граммы, запятая, \ + пико-граммы, запятая, \ + фемто-граммы, запятая, \ + атто-граммы, запятая, \ + зепто-граммы, запятая, \ + иокто-граммы, запятая, \ + ронто-граммы, запятая, \ + квекто-граммы"); +} + +#[test] +fn si_base() { + let expr = r#" + 1A,2A, + 1cd,2cd, + 1K,2K, + 1,2, + 1g,2g, + 1m,2m, + 1mol,2mol, + 1s,2s, + 1,2, + 1",2", + 1sec,2sec + "#; + test("ru", "SimpleSpeak", expr, + "1 ампер, запятая, 2 ампера, запятая, \ + 1 кандела, запятая; 2 канделы, запятая, \ + 1 кельвин, запятая, 2 кельвина, запятая, \ + 1 кельвин, запятая, 2 кельвина, запятая, \ + 1 грамм, запятая, 2 грамма, запятая, \ + 1 метр, запятая, 2 метра, запятая, \ + 1 моль, запятая, 2 моля, запятая, \ + 1 секунда, запятая, 2 секунды, запятая, \ + 1 секунда, запятая, 2 секунды, запятая, \ + 1 секунда, запятая, 2 секунды, запятая, \ + 1 секунда, запятая, 2 секунды"); +} + +#[test] +fn si_base_with_prefixes() { + let expr = r#" + 1QA,2RA, + 1Ycd,2Zcd, + 1EK,2PK, + 1TK,2GK, + 1Mg,2kg, + 1hm,2dam, + 1dmol,2cmol, + 1ms,2µs, + 1nsec,2psec + "#; + test("ru", "SimpleSpeak", expr, + "1 кветта-ампер, запятая; 2 ронна-ампера, запятая; \ + 1 иотта-кандела, запятая; 2 зетта-канделы, запятая; \ + 1 экса-кельвин, запятая; 2 пета-кельвина, запятая; \ + 1 тера-кельвин, запятая; 2 гига-кельвина, запятая; \ + 1 мега-грамм, запятая; 2 кило-грамма, запятая; \ + 1 гекто-метр, запятая; 2 дека-метра, запятая; \ + 1 деци-моль, запятая; 2 санти-моля, запятая; \ + 1 милли-секунда, запятая; 2 микро-секунды, запятая; \ + 1 нано-секунда, запятая; 2 пико-секунды"); +} + +#[test] +fn si_derived_1() { + let expr = r#" + 1Bq,2Bq, + 1C,2C, + 1°C,2°C, + 1,2, + 1F,2F, + 1Gy,2Gy, + 1H,2H, + 1Hz,2Hz, + 1J,2J, + 1kat,2kat, + 1lm,2lm, + 1lx,2lx + "#; + test("ru", "SimpleSpeak", expr, + "1 беккерель, запятая; 2 беккереля, запятая, \ + 1 кулон, запятая; 2 кулона, запятая; \ + 1 градус Цельсия, запятая; 2 градуса Цельсия, запятая; \ + 1 градус Цельсия, запятая; 2 градуса Цельсия, запятая, \ + 1 фарад, запятая, 2 фарада, запятая, \ + 1 грей, запятая, 2 грея, запятая, \ + 1 генри, запятая, 2 генри, запятая, \ + 1 герц, запятая, 2 герца, запятая, \ + 1 джоуль, запятая, 2 джоуля, запятая, \ + 1 катал, запятая, 2 катала, запятая, \ + 1 люмен, запятая, 2 люмена, запятая, \ + 1 люкс, запятая, 2 люкс"); +} + +#[test] +fn si_derived_1_with_prefixes() { + let expr = r#" + 1QBq,2RBq, + 1YC,2ZC, + 1EF,2PF, + 1TGy,2GGy, + 1MH,2kH, + 1daHz,2dHz, + 1cJ,2mJ, + 1µkat,2nkat, + 1plm,2flm, + 1alx,2zlx, + 1m°C,2µ°C, + 1p℃,2n℃ + "#; + test("ru", "SimpleSpeak", expr, + "1 кветта-беккерель, запятая; 2 ронна-беккереля; запятая; \ + 1 иотта-кулон, запятая; 2 зетта-кулона, запятая; \ + 1 экса-фарад, запятая; 2 пета-фарада, запятая; \ + 1 тера-грей, запятая; 2 гига-грея, запятая; \ + 1 мега-генри, запятая; 2 кило-генри, запятая; \ + 1 дека-герц, запятая; 2 деци-герца, запятая; \ + 1 санти-джоуль, запятая; 2 милли-джоуля, запятая; \ + 1 микро-катал, запятая; 2 нано-катала, запятая; \ + 1 пико-люмен, запятая; 2 фемто-люмена, запятая; \ + 1 атто-люкс, запятая; 2 зепто-люкс, запятая; \ + 1 милли-градус Цельсия; запятая; 2 микро-градуса Цельсия; запятая; \ + 1 пико-градус Цельсия; запятая; 2 нано-градуса Цельсия"); +} + +#[test] +fn si_derived_2() { + let expr = r#" + 1N,2N, + 1Ω,2Ω, + 1,2, + 1Pa,2Pa, + 1S,2S, + 1Sv,2Sv, + 1T,2T, + 1V,2V, + 1W,2W, + 1Wb,2Wb + "#; + test("ru", "SimpleSpeak", expr, + "1 ньютон, запятая, 2 ньютона, запятая, \ + 1 ом, запятая, 2 ома, запятая, \ + 1 ом, запятая, 2 ома, запятая, \ + 1 паскаль, запятая, 2 паскаля, запятая, \ + 1 сименс, запятая, 2 сименс, запятая, \ + 1 зиверт, запятая; 2 зиверта, запятая, \ + 1 тесла, запятая, 2 теслы, запятая, \ + 1 вольт, запятая, 2 вольта, запятая, \ + 1 ватт, запятая, 2 ватта, запятая, \ + 1 вебер, запятая, 2 вебера"); +} + +#[test] +fn si_derived_2_with_prefixes() { + let expr = r#" + 1qN,2rN, + 1,2, + 1aΩ,2fΩ, + 1pPa,2nPa, + 1µS,2mS, + 1cSv,2dSv, + 1daT,2hT, + 1kV,2MV, + 1GW,2TW, + 1PWb,2EWb + "#; + test("ru", "SimpleSpeak", expr, + "1 квекто-ньютон, запятая; 2 ронто-ньютона, запятая; \ + 1 иокто-ом, запятая; 2 зепто-ома, запятая; \ + 1 атто-ом, запятая; 2 фемто-ома, запятая; \ + 1 пико-паскаль, запятая; 2 нано-паскаля, запятая; \ + 1 микро-сименс, запятая; 2 милли-сименс, запятая; \ + 1 санти-зиверт, запятая; 2 деци-зиверта, запятая; \ + 1 дека-тесла, запятая; 2 гекто-теслы, запятая; \ + 1 кило-вольт, запятая; 2 мега-вольта, запятая; \ + 1 гига-ватт, запятая; 2 тера-ватта, запятая; \ + 1 пета-вебер, запятая; 2 экса-вебера"); +} + +#[test] +fn si_accepted() { + let expr = r#" + 1l,2l, + 1L,2L, + 1,2, + 1t,2t, + 1Da,2Da, + 1Np,2Np, + 1u,2u, + 1eV,2eV, + 1rad,2rad, + 1sr,2sr, + 1a,2a, + 1as,2as, + 1b,2b, + 1B,2B, + 1Bd,2Bd + "#; + test("ru", "SimpleSpeak", expr, + "1 литр, запятая, 2 литра, запятая, \ + 1 литр, запятая, 2 литра, запятая, \ + 1 литр, запятая, 2 литра, запятая, \ + 1 тонна, запятая; 2 тонны, запятая, \ + 1 дальтон, запятая, 2 дальтона, запятая, \ + 1 непер, запятая, 2 непера, запятая; \ + 1 атомная единица массы, запятая; 2 атомные единицы массы, запятая; \ + 1 электронвольт, запятая; 2 электронвольта, запятая, \ + 1 радиан, запятая, 2 радиана, запятая, \ + 1 стерадиан, запятая; 2 стерадиана, запятая, \ + 1 год, запятая, 2 года, запятая, \ + 1 угловая секунда, запятая; 2 угловые секунды, запятая, \ + 1 бит, запятая, 2 бита, запятая, \ + 1 байт, запятая, 2 байта, запятая, \ + 1 бод, запятая, 2 бода"); +} + +#[test] +fn si_accepted_with_prefixes() { + let expr = r#" + 1Ql,2Rl, + 1YL,2ZL, + 1Eℓ,2Pℓ, + 1Tt,2Gt, + 1MDa,2kDa, + 1dNp,2cNp, + 1hu,2dau, + 1meV,2µeV, + 1nrad,2prad, + 1fsr,2asr, + 1Ga,2Ma, + 1zas,2yas, + 1kb,2Mb, + 1GB,2TB, + 1TBd,2EBd + "#; + test("ru", "SimpleSpeak", expr, + "1 кветта-литр, запятая; 2 ронна-литра, запятая; \ + 1 иотта-литр, запятая; 2 зетта-литра, запятая; \ + 1 экса-литр, запятая; 2 пета-литра, запятая; \ + 1 тера-тонна, запятая; 2 гига-тонны; запятая; \ + 1 мега-дальтон, запятая; 2 кило-дальтона, запятая; \ + 1 деци-непер, запятая; 2 санти-непера, запятая; \ + 1 гекто-атомная единица массы; запятая; 2 дека-атомные единицы массы; запятая; \ + 1 милли-электронвольт, запятая; 2 микро-электронвольта; запятая; \ + 1 нано-радиан, запятая; 2 пико-радиана, запятая; \ + 1 фемто-стерадиан, запятая; 2 атто-стерадиана; запятая; \ + 1 гига-год, запятая; 2 мега-года, запятая; \ + 1 зепто-угловая секунда, запятая; 2 иокто-угловые секунды; запятая; \ + 1 кило-бит, запятая; 2 мега-бита, запятая; \ + 1 гига-байт, запятая; 2 тера-байта, запятая; \ + 1 тера-бод, запятая; 2 экса-бода"); +} + +#[test] +fn without_prefix_time() { + let expr = r#" + 1,2, + 1",2", + 1,2, + 1',2', + 1min,2min, + 1h,2h, + 1hr,2hr, + 1Hr,2Hr, + 1d,2d, + 1dy,2dy, + 1w,2w, + 1wk,2wk, + 1y,2y, + 1yr,2yr + "#; + test("ru", "SimpleSpeak", expr, + "1 секунда, запятая, 2 секунды, запятая, \ + 1 секунда, запятая, 2 секунды, запятая, \ + 1 минута, запятая, 2 минуты, запятая, \ + 1 минута, запятая, 2 минуты, запятая, \ + 1 минута, запятая, 2 минуты, запятая, \ + 1 час, запятая, 2 часа, запятая, \ + 1 час, запятая, 2 часа, запятая, \ + 1 час, запятая, 2 часа, запятая, \ + 1 день, запятая, 2 дня, запятая, \ + 1 день, запятая, 2 дня, запятая, \ + 1 неделя, запятая, 2 недели, запятая, \ + 1 неделя, запятая, 2 недели, запятая, \ + 1 год, запятая, 2 года, запятая, \ + 1 год, запятая, 2 года"); +} + +#[test] +fn without_prefix_angles() { + let expr = r#" + 1°,2°, + 1deg,2deg, + 1arcmin,2arcmin, + 1amin,2amin, + 1am,2am, + 1MOA,2MOA, + 1arcsec,2arcsec, + 1asec,2asec + "#; + test("ru", "SimpleSpeak", expr, + "1 градус, запятая, 2 градуса, запятая, \ + 1 градус, запятая, 2 градуса, запятая, \ + 1 угловая минута, запятая; 2 угловые минуты, запятая, \ + 1 угловая минута, запятая; 2 угловые минуты, запятая, \ + 1 угловая минута, запятая; 2 угловые минуты, запятая, \ + 1 угловая минута, запятая; 2 угловые минуты, запятая, \ + 1 угловая секунда, запятая; 2 угловые секунды, запятая, \ + 1 угловая секунда, запятая; 2 угловые секунды"); +} + +#[test] +fn without_prefix_distance() { + let expr = r#" + 1au,2au, + 1ltyr,2ltyr, + 1pc,2pc, + 1Å,2Å, + 1,2, + 1fm,2fm + "#; + test("ru", "SimpleSpeak", expr, + "1 астрономическая единица, запятая; 2 астрономические единицы, запятая, \ + 1 световой год, запятая; 2 световых года, запятая, \ + 1 парсек, запятая, 2 парсека, запятая, \ + 1 ангстрем, запятая; 2 ангстрема, запятая, \ + 1 ангстрем, запятая; 2 ангстрема, запятая, \ + 1 ферми, запятая, 2 ферми"); +} + +#[test] +fn without_prefix_other() { + let expr = r#" + 1ha,2ha, + 1dB,2dB, + 1atm,2atm, + 1amu,2amu, + 1bar,2bar, + 1cal,2cal, + 1Ci,2Ci, + 1grad,2grad, + 1M,2M, + 1R,2R, + 1rpm,2rpm, + 1,2, + 1dyn,2dyn, + 1erg,2erg + "#; + test("ru", "SimpleSpeak", expr, + "1 гектар, запятая; 2 гектара, запятая, \ + 1 децибел, запятая; 2 децибела, запятая, \ + 1 атмосфера, запятая; 2 атмосферы, запятая; \ + 1 атомная единица массы, запятая; 2 атомные единицы массы, запятая, \ + 1 бар, запятая, 2 бара, запятая, \ + 1 калория, запятая; 2 калории, запятая, \ + 1 кюри, запятая, 2 кюри, запятая, \ + 1 град, запятая; 2 града, запятая, \ + 1 моляр, запятая, 2 моляра, запятая, \ + 1 рентген, запятая; 2 рентгена, запятая; \ + 1 оборот в минуту, запятая; 2 оборота в минуту, запятая, \ + 1 эм-аш-о, запятая, 2 эм-аш-о, запятая, \ + 1 дина, запятая, 2 дины, запятая, \ + 1 эрг, запятая, 2 эрга"); +} + +#[test] +fn without_prefix_powers_of_2() { + let expr = r#" + 1Kib,2Kib, + 1Mib,2Mib, + 1Gib,2Gib, + 1Tib,2Tib, + 1Pib,2Pib, + 1Eib,2Eib, + 1Zib,2Zib, + 1Yib,2Yib, + 1KiB,2KiB, + 1MiB,2MiB, + 1GiB,2GiB, + 1TiB,2TiB, + 1PiB,2PiB, + 1EiB,2EiB, + 1ZiB,2ZiB, + 1YiB,2YiB + "#; + test("ru", "SimpleSpeak", expr, + "1 кибибит, запятая; 2 кибибита, запятая, \ + 1 мебибит, запятая; 2 мебибита, запятая, \ + 1 гибибит, запятая; 2 гибибита, запятая, \ + 1 тебибит, запятая; 2 тебибита, запятая, \ + 1 пебибит, запятая; 2 пебибита, запятая, \ + 1 эксбибит, запятая; 2 эксбибита, запятая, \ + 1 зебибит, запятая; 2 зебибита, запятая, \ + 1 йобибит, запятая; 2 йобибита, запятая, \ + 1 кибибайт, запятая; 2 кибибайта, запятая, \ + 1 мебибайт, запятая; 2 мебибайта, запятая, \ + 1 гибибайт, запятая; 2 гибибайта, запятая, \ + 1 тебибайт, запятая; 2 тебибайта, запятая, \ + 1 пебибайт, запятая; 2 пебибайта, запятая, \ + 1 эксбибайт, запятая; 2 эксбибайта, запятая, \ + 1 зебибайт, запятая; 2 зебибайта, запятая, \ + 1 йобибайт, запятая; 2 йобибайта"); +} + +#[test] +fn si_other_numbers() { + let expr = r#"1.0l, + 2.0 m, + x ms, + yµs, + dag, + 1235daN, + 2.5µsec, + 32.34mol"#; + test("ru", "SimpleSpeak", expr, + "1.0 литра, запятая; 2.0 метра, запятая; икс миллисекунд, запятая; игрек микросекунд, запятая, \ + дека-граммы, запятая; 1235 дека-ньютонов; запятая; 2.5 микросекунды; запятая; 32.34 моля"); +} + +#[test] +fn test_mtext_inference() { + let expr = r#"[ + 1t, + 2PA, + 3Pa, + 4.5mT + ]"#; + test("ru", "SimpleSpeak", expr, + "открывающая квадратная скобка; 1 тонна, запятая; 2 пета-ампера, запятая, \ + 3 паскаля, запятая; 4.5 милли-теслы; закрывающая квадратная скобка"); +} diff --git a/tests/languages.rs b/tests/languages.rs index 4d5c890a..4952d935 100644 --- a/tests/languages.rs +++ b/tests/languages.rs @@ -6,6 +6,7 @@ mod Languages { mod intent; mod zh; mod en; + mod ru; mod fi; mod sv; mod nb;