Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions Rules/Braille/Russian/Russian_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
- x: "*[2]"

-
name: gost-58511-small-font
name: small-font
tag: [mrow, mstyle, semantics]
match: "@data-braille-typeform='small' or contains(@intent, ':small-font')"
replace:
Expand All @@ -345,7 +345,7 @@
- t: "⠔"

-
name: gost-58511-letter-spacing
name: letter-spacing
tag: [mrow, mstyle, semantics]
match: "@data-braille-typeform='letter-spacing' or contains(@intent, ':letter-spacing')"
replace:
Expand All @@ -354,7 +354,7 @@
- t: "⠌"

-
name: gost-58511-insertion
name: insertion
tag: [mrow, mstyle, semantics]
match: "@data-braille-typeform='insertion' or contains(@intent, ':insertion')"
replace:
Expand Down Expand Up @@ -1558,26 +1558,36 @@
-
name: contextual-square-bracket-recognition-point
tag: mo
variables:
- PreviousLeaf: "(preceding-sibling::*/descendant-or-self::*[not(*) and not(self::m:mo[translate(., '\u2061\u2062\u2063\u2064', '')=''])] |
ancestor::m:mrow[parent::m:mrow or parent::m:math or parent::m:mtd]/preceding-sibling::*/descendant-or-self::*[not(*) and not(self::m:mo[translate(., '\u2061\u2062\u2063\u2064', '')=''])])[last()]"
- NextLeaf: "(following-sibling::*/descendant-or-self::*[not(*) and not(self::m:mo[translate(., '\u2061\u2062\u2063\u2064', '')=''])] |
ancestor::m:mrow[parent::m:mrow or parent::m:math or parent::m:mtd]/following-sibling::*/descendant-or-self::*[not(*) and not(self::m:mo[translate(., '\u2061\u2062\u2063\u2064', '')=''])])[1]"
match:
- "parent::*[IsBracketed(., '[', ']')] and"
- "((.='[' and not(preceding-sibling::*) and following-sibling::*[1][self::m:mi or self::m:mtext]) or"
- " (.=']' and not(following-sibling::*) and preceding-sibling::*[1][self::m:mi or self::m:mtext]))"
- "(.='[' or .=']') and"
- "$PreviousLeaf[self::m:mi or self::m:mtext] and"
- "contains('бвгджзйклмнпрстфхцчшщъьБВГДЖЗЙКЛМНПРСТФХЦЧШЩЪЬbcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZβγδζθκλμνξπρστφχψΒΓΔΖΘΚΛΜΝΞΠΡΣΤΦΧΨ',"
- " substring($PreviousLeaf, string-length($PreviousLeaf), 1)) and"
- "not($NextLeaf[self::m:mn or self::m:mo[contains('.,!?;:…', .)]])"
replace:
- T: "⠠"
- x: "text()"

-
name: contextual-angle-bracket-recognition-point
tag: mo
variables:
- LeftEdge: "(parent::*/*[position() > 1 and position() < last()]/descendant-or-self::*[not(*) and not(self::m:mo[translate(., '\u2061\u2062\u2063\u2064', '')=''])])[1]"
- RightEdge: "(parent::*/*[position() > 1 and position() < last()]/descendant-or-self::*[not(*) and not(self::m:mo[translate(., '\u2061\u2062\u2063\u2064', '')=''])])[last()]"
match:
- "parent::*[IsBracketed(., '⟨', '⟩')] and"
- "((.='⟨' and not(preceding-sibling::*)) or (.='⟩' and not(following-sibling::*))) and"
- "(parent::*/*[2][self::m:mi or self::m:mtext] or"
- " parent::*/*[last()-1][self::m:mi or self::m:mtext])"
- "(parent::*[IsBracketed(., '⟨', '⟩')] or parent::*[IsBracketed(., '〈', '〉')]) and"
- "(((.='⟨' or .='〈') and not(preceding-sibling::*)) or ((.='⟩' or .='〉') and not(following-sibling::*))) and"
- "($LeftEdge[self::m:mi or self::m:mtext] or"
- " $RightEdge[self::m:mi or self::m:mtext])"
replace:
- T: "⠈"
- test:
- if: ".='⟨'"
- if: ".='⟨' or .='〈'"
then: [T: "⠪"]
else: [T: "⠕"]

Expand Down Expand Up @@ -1613,7 +1623,7 @@
- "ancestor::m:mtr[preceding-sibling::*] and"
- "translate(., '0123456789', '')=''"
replace:
- x: "BrailleChars(translate(., '0123456789', '\ue020\ue021\ue022\ue023\ue024\ue025\ue026\ue027\ue028\ue029'), 'Russian')"
- x: "BrailleChars(translate(., '0123456789', '\ue040\ue041\ue042\ue043\ue044\ue045\ue046\ue047\ue048\ue049'), 'Russian')"

-
name: periodic-decimal-period-digits
Expand All @@ -1624,7 +1634,7 @@
- "following-sibling::*[1][self::m:mo and .=')'] and"
- "preceding-sibling::*[2][self::m:mn and contains(., ',')]"
replace:
- x: "BrailleChars(translate(., '0123456789', '\ue020\ue021\ue022\ue023\ue024\ue025\ue026\ue027\ue028\ue029'), 'Russian')"
- x: "BrailleChars(translate(., '0123456789', '\ue030\ue031\ue032\ue033\ue034\ue035\ue036\ue037\ue038\ue039'), 'Russian')"

-
name: periodic-decimal
Expand All @@ -1633,9 +1643,9 @@
replace:
- x: "BrailleChars(substring-before(., ','), 'Russian')"
- t: "⠂"
- x: "BrailleChars(translate(substring-before(substring-after(., ','), '('), '0123456789', '\ue020\ue021\ue022\ue023\ue024\ue025\ue026\ue027\ue028\ue029'), 'Russian')"
- x: "BrailleChars(translate(substring-before(substring-after(., ','), '('), '0123456789', '\ue030\ue031\ue032\ue033\ue034\ue035\ue036\ue037\ue038\ue039'), 'Russian')"
- t: "⠣"
- x: "BrailleChars(translate(substring-before(substring-after(., '('), ')'), '0123456789', '\ue020\ue021\ue022\ue023\ue024\ue025\ue026\ue027\ue028\ue029'), 'Russian')"
- x: "BrailleChars(translate(substring-before(substring-after(., '('), ')'), '0123456789', '\ue030\ue031\ue032\ue033\ue034\ue035\ue036\ue037\ue038\ue039'), 'Russian')"
- t: "⠜"

-
Expand All @@ -1645,7 +1655,7 @@
replace:
- x: "BrailleChars(substring-before(., ','), 'Russian')"
- t: "⠂"
- x: "BrailleChars(translate(substring-after(., ','), '0123456789', '\ue020\ue021\ue022\ue023\ue024\ue025\ue026\ue027\ue028\ue029'), 'Russian')"
- x: "BrailleChars(translate(substring-after(., ','), '0123456789', '\ue030\ue031\ue032\ue033\ue034\ue035\ue036\ue037\ue038\ue039'), 'Russian')"

-
name: default
Expand Down
95 changes: 87 additions & 8 deletions Rules/Braille/Russian/unicode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
- "<": [t: "⠀⠪⠀"]
- "%": [t: "⠼⠴"]
- "‰": [t: "⠼⠴⠴"]
- "±": [t: "⠀⠖⠤"]
- "÷": [T: "⠀⠲"]
- "±": [T: "⠖⠤"]
- ";": [t: "⠠⠢"]
- "Ϳ": [t: "⠰⠊"]
- "·": [t: "⠰"]
Expand Down Expand Up @@ -98,6 +99,7 @@
- "‴": [t: "⠔⠔⠔"]
- "°": [t: "⠨⠴"]
- "℃": [t: "⠨⠴⠨⠉"]
- "℉": [T: "⠨⠴⠨⠋"]
- "∀": [t: "⠫⠄"]
- "∂": [t: "⠹"]
- "∃": [t: "⠫⠢"]
Expand All @@ -111,9 +113,10 @@
- "∏": [t: "⠸⠏"]
- "∑": [t: "⠸⠎"]
- "−": [t: "⠀⠤"]
- "∓": [t: "⠀⠤⠖"]
- "∓": [T: "⠤⠖"]
- "∔": [t: "⠈⠖"]
- "∕": [t: "⠠⠌"]
- "∕": [T: "⠴"]
- "⁄": [T: "⠳"]
- "∖": [t: "⠀⠰⠤"]
- "∗": [t: "⠔"]
- "·": [t: "⠄"]
Expand Down Expand Up @@ -166,7 +169,8 @@
- "\uE138": [t: "⠖"]
- "\uE139": [t: "⠤"]
- "\uE13A": [t: "⠠⠢"]
- "\uE13B": [t: "⠦⠶"]
- "\uE13B": [T: "⠐⠒"]
- "\uE02A": [T: "𝒢"] # internal Russian digit-group separator
- "\ue020": [t: "⠚"]
- "\ue021": [t: "⠁"]
- "\ue022": [t: "⠃"]
Expand All @@ -177,12 +181,33 @@
- "\ue027": [t: "⠛"]
- "\ue028": [t: "⠓"]
- "\ue029": [t: "⠊"]
- "\ue030": [t: "⠚"]
- "\ue031": [t: "⠁"]
- "\ue032": [t: "⠃"]
- "\ue033": [t: "⠉"]
- "\ue034": [t: "⠙"]
- "\ue035": [t: "⠑"]
- "\ue036": [t: "⠋"]
- "\ue037": [t: "⠛"]
- "\ue038": [t: "⠓"]
- "\ue039": [t: "⠊"]
- "\ue040": [t: "⠚"]
- "\ue041": [t: "⠁"]
- "\ue042": [t: "⠃"]
- "\ue043": [t: "⠉"]
- "\ue044": [t: "⠙"]
- "\ue045": [t: "⠑"]
- "\ue046": [t: "⠋"]
- "\ue047": [t: "⠛"]
- "\ue048": [t: "⠓"]
- "\ue049": [t: "⠊"]
- "∘": [t: "⠴"]
- "√": [t: "⠩⠱"]
- "∛": [t: "⠩⠒⠱"]
- "∜": [t: "⠩⠲⠱"]
- "∞": [t: "⠻"]
- "∠": [t: "⠸⠪"]
- "⌒": [T: "⠸⠜"]
- "∣": [t: "⠸"]
- "∤": [t: "⠀⠼⠀"]
- "∥": [t: "⠸⠸#"]
Expand Down Expand Up @@ -230,6 +255,7 @@
- "⊇": [t: "⠀⠹⠶"]
- "⊕": [t: "⠀⠰⠖"]
- "⊥": [t: "⠼⠄"]
- "⟂": [T: "⠼⠄"]
- "⊨": [t: "⠼⠎"]
- "⊼": [t: "⠰⠌"]
- "⊽": [t: "⠘⠡"]
Expand All @@ -240,17 +266,29 @@
- "⋰": [t: "⠠⠲⠲⠲"]
- "⋱": [t: "⠠⠲⠲⠲"]
- "△": [t: "⠸⠙"]
- "〈": [T: "⠪"]
- "〉": [T: "⠕"]
- "⟨": [T: "⠪"]
- "⟩": [T: "⠕"]
- "¬": [T: "⠩"]
- "~": [T: "⠢"]
- "↑": [T: "⠰⠌"]
- "↓": [T: "⠘⠡"]
- "→": [t: "⠀⠒⠕"]
- "⟶": [t: "⠀⠒⠕"]
- "←": [t: "⠀⠦⠶"]
- "⟵": [t: "⠀⠦⠶"]
- "↔": [T: "⠪⠒⠕"]
- "↕": [T: "⠹⠄"]
- "↖": [T: "⠐⠢"]
- "↗": [T: "⠔⠂"]
- "↘": [T: "⠢⠄"]
- "↙": [T: "⠠⠔"]
- "→": [T: "⠀⠒⠕⠀"]
- "⟶": [T: "⠀⠒⠕⠀"]
- "←": [T: "⠀⠪⠒⠀"]
- "⟵": [T: "⠀⠪⠒⠀"]
- "⇒": [t: "⠀⠶⠜"]
- "⇐": [t: "⠀⠦⠶"]
- "⇔": [t: "⠀⠦⠶⠜"]
- "⇑": [T: "⠌⠌"]
- "⇓": [T: "⠡⠡"]
- "◻": [t: "⠶"]
- "♮": [t: "⠻⠨⠝⠻"]

Expand Down Expand Up @@ -330,6 +368,47 @@
- "\ue008": [t: "⠦"]
- "\ue009": [t: "⠔"]

# Precomposed Unicode fractions and script digits, verified against liblouis.
- "¼": [T: "⠼⠁⠲"]
- "½": [T: "⠼⠁⠆"]
- "¾": [T: "⠼⠉⠲"]
- "⅐": [T: "⠼⠁⠶"]
- "⅑": [T: "⠼⠁⠔"]
- "⅒": [T: "⠼⠁⠂⠴"]
- "⅓": [T: "⠼⠁⠒"]
- "⅔": [T: "⠼⠃⠒"]
- "⅕": [T: "⠼⠁⠢"]
- "⅖": [T: "⠼⠃⠢"]
- "⅗": [T: "⠼⠉⠢"]
- "⅘": [T: "⠼⠙⠢"]
- "⅙": [T: "⠼⠁⠖"]
- "⅚": [T: "⠼⠑⠖"]
- "⅛": [T: "⠼⠁⠦"]
- "⅜": [T: "⠼⠉⠦"]
- "⅝": [T: "⠼⠑⠦"]
- "⅞": [T: "⠼⠛⠦"]
- "↉": [T: "⠼⠚⠒"]
- "⁰": [T: "⠴"]
- "¹": [T: "⠂"]
- "²": [T: "⠆"]
- "³": [T: "⠒"]
- "⁴": [T: "⠲"]
- "⁵": [T: "⠢"]
- "⁶": [T: "⠖"]
- "⁷": [T: "⠶"]
- "⁸": [T: "⠦"]
- "⁹": [T: "⠔"]
- "₀": [T: "⠴"]
- "₁": [T: "⠂"]
- "₂": [T: "⠆"]
- "₃": [T: "⠒"]
- "₄": [T: "⠲"]
- "₅": [T: "⠢"]
- "₆": [T: "⠖"]
- "₇": [T: "⠶"]
- "₈": [T: "⠦"]
- "₉": [T: "⠔"]

# Russian literary braille letters for mtext and Cyrillic identifiers.
- "а": [t: "⠁"]
- "А": [t: "C⠁"]
Expand Down
6 changes: 3 additions & 3 deletions Rules/Languages/hu/navigate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
then: [set_variables: [Prefix: "'teljes nagyítás'", CommandOffset: "5"]] # phrase('zoom in all of the way')
- else: [set_variables: [Prefix: "'nagyítás'", CommandOffset: "5"]] # phrase('zoom' in to see more details)
- else_if: "starts-with($NavCommand, 'Move')"
then: [set_variables: [Prefix: "'ugrás'", CommandOffset: "5"]] # phrase('move' to next entry in table)
then: [set_variables: [Prefix: "'ugrás'", CommandOffset: "5"]] # phrase('move' to next entry in table)
- else_if: "starts-with($NavCommand, 'Read')"
then:
# "olvasás jelenlegi" is not Hungarian; the whole phrase is chosen here (no suffix word needed for 'Current')
- test:
- if: "$NavCommand = 'ReadCurrent'"
then: [set_variables: [Prefix: "'az aktuális elem felolvasása'", CommandOffset: "5"]] # phrase('read current')
- else: [set_variables: [Prefix: "'olvasás'", CommandOffset: "5"]] # phrase('read' to next entry in table)
- else: [set_variables: [Prefix: "'olvasás'", CommandOffset: "5"]] # phrase('read' to next entry in table)
- else_if: "starts-with($NavCommand, 'Describe')"
then:
- test:
Expand Down Expand Up @@ -1236,7 +1236,7 @@
- T: "nem tud jobbra" # phrase('cannot' move 'right' in expression)
- test:
- if: "$NavCommand = 'MoveNext'"
then: [T: "mozogni"] # phrase('move' to next entry in table)
then: [T: "mozogni"] # phrase('move' to next entry in table)
- else_if: "$NavCommand = 'ReadNext'"
then: [T: "olvasni"] # phrase('read' next entry in table)
else: [T: "leírni"] # phrase('describe' next entry in table)
Expand Down
Loading
Loading