From 79ff6f5f578b8b2848c2aaeca012309f2b61691c Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Thu, 21 May 2026 16:15:15 +0800 Subject: [PATCH 1/8] copy english version of navigate.yaml from NVDA2026.1 and translate --- Rules/Languages/zh/tw/definitions.yaml | 38 +- Rules/Languages/zh/tw/navigate.yaml | 1072 +++++++++++------------- 2 files changed, 506 insertions(+), 604 deletions(-) diff --git a/Rules/Languages/zh/tw/definitions.yaml b/Rules/Languages/zh/tw/definitions.yaml index 93460509a..f9c453621 100644 --- a/Rules/Languages/zh/tw/definitions.yaml +++ b/Rules/Languages/zh/tw/definitions.yaml @@ -48,28 +48,28 @@ } - NavigationParts: { - "large-op": "base; lower limit; upper limit", - "mfrac": "numerator;denominator", - "fraction": "numerator;denominator", - "msqrt": "root", - "square-root": "root", - "mroot": "root;root index", - "root": "root;root index", - "msub": "base;subscript", - "sub": "base;subscript", - "msup": "base;superscript", - "say-super": "base;superscript", - "skip-super": "base;superscript", - "power": "base;exponent", - "msubsup": "base;subscript;superscript", - "munder": "base;under limit", - "mover": "base;upper limit", - "munderover": "base;under limit;upper limit", + "large-op": "基底; 下限; 上限", + "mfrac": "分子;分母", + "fraction": "分子;分母", + "msqrt": "根號", + "square-root": "根號", + "mroot": "根號;根次數", + "root": "根號;根次數", + "msub": "基底;下標", + "sub": "基底;下標", + "msup": "基底;上標", + "say-super": "基底;上標", + "skip-super": "基底;上標", + "power": "基底;指數", + "msubsup": "基底;下標;上標", + "munder": "基底;下限", + "mover": "基底;上限", + "munderover": "基底;下限;上限", # words for moving into and out of one of the parts (e.g., "move right 'out of' numerator, 'in' denominator") # it's a hack to put them here, but at least they are grouped with the other navigation parts - "in": "in", - "out": "out of", + "in": "放大", + "out": "縮小", } diff --git a/Rules/Languages/zh/tw/navigate.yaml b/Rules/Languages/zh/tw/navigate.yaml index a41067957..613cc7b0b 100644 --- a/Rules/Languages/zh/tw/navigate.yaml +++ b/Rules/Languages/zh/tw/navigate.yaml @@ -3,9 +3,9 @@ # # The general form for many rules is: # 1. Say the command if this is first rule to fire (MatchCounter) and depending upon "NavVerbosity"s value +# This will increment MatchCounter so that the command won't be spoken again # 2. Say info about moving into/out of 2D structures # 3. Set some variables and possibly recurse. -# If recursing, "MatchCounter" should be incremented. # If stopping, "NavNode" should be set. # # The meaning of NavVerbosity: @@ -33,119 +33,80 @@ # ReadZoomLevel -- -1 for Enhanced, otherwise the distance from leaf the rules should maintain # PlaceMarkerIndex +# Note: the rules for saying a command and announcing what is said when moving in/out of a 2d exprs are hacks +# They depend upon special variables "SayCommand" and "Move2D" being set and if they are, the rules are activated. +# If/when functions can be defined in a rules file, it is likely these would be much better done via those functions +# as they would likely be much more efficient and also cleaner. -# Rules for speaking what happens when moving into or out of a notation -- name: into-or-out-of - tag: mfrac - match: "$Move2D != ''" - replace: - - x: "$Move2D" - - test: - if: "count($Child2D/preceding-sibling::*)=0" - then: - test: - if: "$Child2D/..[@linethickness='0']" - then: [T: "全"] # phrase(the 'numerator' of a fraction) - else: [T: "分子"] - else: - test: - if: "$Child2D/..[@linethickness='0']" - then: [T: "選"] - else: [T: "分母"] # phrase(the 'denominator' of a fraction) - - pause: "medium" - -- name: into-or-out-of - tag: msqrt - match: "$Move2D != ''" - replace: - - x: "$Move2D" - - T: "平方根內" # phrase(the 'square root' of x) - - pause: "medium" - -- name: into-or-out-of - tag: mroot - match: "$Move2D != ''" - replace: - - x: "$Move2D" - - 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) - - pause: "medium" - -- name: into-or-out-of - tag: msub - match: "$Move2D != ''" - replace: - - x: "$Move2D" - - test: - if: "count($Child2D/preceding-sibling::*)=0" - then: [T: "基本"] # phrase(the 'base' of the power) - else: [T: "下標"] # phrase(x with 'subscript' 2) - - pause: "medium" - -- name: into-or-out-of - tag: msup - match: "$Move2D != ''" +# Rules for announcing the command +- name: say-command + tag: "!*" + match: "$SayCommand != ''" # value should be '', 'true', or 'false' + variables: [Prefix: "''"] replace: - - x: "$Move2D" - test: - if: "count($Child2D/preceding-sibling::*)=0" - 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 - tag: msubsup - match: "$Move2D != ''" - replace: - - x: "$Move2D" - - test: - - if: "count($Child2D/preceding-sibling::*)=0" - then: [T: "基本"] # phrase(the 'base' of the power) - - else_if: "count($Child2D/preceding-sibling::*)=1" - 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 - tag: munder - match: "$Move2D != ''" - replace: - - x: "$Move2D" - - test: - if: "count($Child2D/preceding-sibling::*)=0" - then: [T: "基本"] # phrase(the 'base' of the power) - else: [T: "下層"] # phrase(the 'lower limit' of the function is zero) - - pause: "medium" - -- name: into-or-out-of - tag: mover - match: "$Move2D != ''" - replace: - - x: "$Move2D" - - test: - if: "count($Child2D/preceding-sibling::*)=0" - then: [T: "基本"] # phrase(the 'base' of the power) - else: [T: "上層"] # phrase(the 'upper limit' of the function is zero) - - pause: "medium" + - if: "$MatchCounter = 0 and $SayCommand = 'true'" + then_test: + - if: "self::m:math and starts-with($NavCommand, 'ZoomOut')" + then: [t: "已完全縮小", pause: "medium"] + - else_if: "IsNode(., 'leaf') and starts-with($NavCommand, 'ZoomIn')" + then: [t: "已完全放大", pause: "medium"] + else: + - test: + - if: "starts-with($NavCommand, 'Zoom')" + then: [set_variables: [Prefix: "''"]] # phrase('zoom' in to see more details) #hjy -- 'zoom' is a bit weird in Chinese, so skip it. + - else_if: "starts-with($NavCommand, 'Move')" + then: [set_variables: [Prefix: "'移動'"]] # phrase('move' to next entry in table) + - else_if: "starts-with($NavCommand, 'Read')" + then: [set_variables: [Prefix: "'讀出'"]] # phrase('read' to next entry in table) + - else_if: "starts-with($NavCommand, 'Describe')" + 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: "放大"] # 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) + - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Out'" + 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) + - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Next'" + then: [t: "往右"] # phrase(move to the 'right') + - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Previous'" + then: [t: "往左"] # phrase(move to the 'left') + - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Current'" + 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') + - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'LineEnd'" + then: [t: "到行尾"] # phrase(move 'to end of line') + - pause: "medium" + - set_variables: [MatchCounter: "$MatchCounter + 1"] + +- name: into-or-out-of-silent + tag: "*" + # saying "out of row n" is not very useful, so skip it + match: "$Move2D != '' and (not(@data-from-mathml) or @data-from-mathml = name(.)) and + (name(.)='mrow' or name(.) = 'mtr' or name(.) = 'mlabeledtr' or @data-from-mathml = 'mtable')" + replace: [] -- name: into-or-out-of - tag: munderover - match: "$Move2D != ''" +- name: into-or-out-of-mtr + tag: [mtr, mlabeledtr] + match: "$Move2D = '放大'" replace: - - x: "$Move2D" - - test: - - if: "count($Child2D/preceding-sibling::*)=0" - 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) + - t: "欄" + - x: "count($Child2D/preceding-sibling::*)+1" - pause: "medium" -- name: into-or-out-of - tag: mmultiscripts - match: "$Move2D != ''" +- name: into-or-out-of-mmultiscripts + tag: "*" + match: "$Move2D != '' and (@data-from-mathml='mmultiscripts' or self::m:mmultiscripts)" replace: - test: if: "name($Child2D)!='none'" @@ -157,36 +118,44 @@ - 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: "下標"] # phrase(x with 'subscript' 2) - else: [T: "上標"] # phrase(x with 'superscript' 2) + if: "$NumPrecedingSiblings mod 2 = 0" + then: [t: "前下標"] # phrase(x with 'subscript' 2) + else: [t: "前上標"] # phrase(x with 'superscript' 2) else: - test: if: "$NumPrecedingSiblings mod 2 = 0" - then: [T: "上標"] # phrase(x with 'superscript' 2) - else: [T: "下標"] # phrase(x with '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 - tag: mtd - match: "$Move2D = '進入'" - replace: - - x: "$Move2D" - - T: "行" # phrase(the first 'column' in the table) - - x: "count($Child2D/preceding-sibling::*)+1" - - pause: "medium" - -- name: into-or-out-of - tag: [mtr, mlabeledtr] - match: "$Move2D = '進入'" +# Rules for speaking what happens when moving into or out of a notation +- name: into-or-out-of-default + tag: "*" + # saying "out of row n" is not very useful, so skip it + # match: "$Move2D != '' and @data-from-mathml and @data-from-mathml != name(.) and count(*)>1 and @data-from-mathml != 'mtable'" + match: "$Move2D != '' and not(self::m:math or @data-from-mathml = 'mtable' or @data-from-mathml = 'mtd') " replace: - - x: "$Move2D" - - x: "count($Child2D/preceding-sibling::*)+1" - - pause: "medium" + - with: + variables: + - PartNumber: "count($Child2D/preceding-sibling::*)" + - PartName: "GetNavigationPartName(name(.), $PartNumber)" + replace: + - x: "$Move2D" + - test: + - if: "$PartName != ''" + then: [x: "$PartName"] + - else_if: "count(*) = 1" + then_test: + if: "$NavVerbosity = 'Verbose'" + then: [x: "translate(name(.), '-_', ' ')"] # e.g., "in absolute value" + else: + - t: "部" # phrase(the 'part' of the expression) + - x: "count($Child2D/preceding-sibling::*) + 1" + - pause: "medium" - name: default-move # nothing to do (not 2D) -- need to catch $Move2D though so rules based on NavCommand don't trigger @@ -207,20 +176,20 @@ then: - test: - if: "$PreviousNavCommand = 'ZoomIn'" - then: [T: "撤消放大"] # 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: "long" + then: [t: "沒有先前的指令"] # phrase('no previous command') + - pause: "medium" - set_variables: [NavNode: "@id"] # many times, for typographic reasons, people include punctuation at the end of a math expr @@ -242,40 +211,32 @@ 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: - set_variables: [ReadZoomLevel: "0"] - set_variables: [NavNode: "@id"] -# special case of zooming into a matrix or determinant -- move to the first row -- name: zoom-in-matrix - - tag: mrow - match: - - "$NavCommand = 'ZoomIn' and count(*)=3 and " - - "*[2][self::m:mtable and (IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|'))]" - replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "放大", pause: "long"] # phrase('zoom in') - - set_variables: [NavNode: "*[2]/*[1]/@id"] - -# special case of zooming into a table -- move to the first row +# special case of zooming into a table -- move to the first row (if only one row, first column) - name: zoom-in-table - tag: mtable - match: "$NavCommand = 'ZoomIn'" + tag: "*" + match: "$NavCommand = 'ZoomIn' and (name(.) = 'mtable' or (count(*)=1 and *[1][@data-from-mathml='mtable']))" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "放大", pause: "long"] # phrase('zoom in') - - set_variables: [NavNode: "*[1]/@id"] + if: "count(*)=1" + then: + - set_variables: [NavNode: "*[1]/*[1]/@id"] + else: + - set_variables: [NavNode: "*[1]/@id"] - name: zoom-in-mrow-in-math - # Moving to first or last is meaningless the 'math' has only an 'mrow' inside -- dig inside and do it again + # zooming in only once is meaningless because 'math' has only a single child and it was spoken at the math level -- dig inside and do it again tag: math - match: "count(*)=1 and ($NavCommand = 'ZoomIn' or $NavCommand = 'MoveNextZoom' or $NavCommand = 'MovePreviousZoom')" + match: "$NavCommand = 'ZoomIn' or $NavCommand = 'MoveNextZoom' or $NavCommand = 'MovePreviousZoom'" replace: - test: if: "$NavCommand = 'MovePreviousZoom'" @@ -289,117 +250,119 @@ match: - "($NavCommand = 'ZoomIn' or " - " ($NavCommand = 'MoveNextZoom' or $NavCommand = 'MovePreviousZoom') and $NavMode='Enhanced') and " - - "count(*)=1 and (*[1][self::m:mrow] and not(self::m:msqrt or self::m:menclose))" + - "count(*)=1 and + (*[1][self::m:mrow or @data-from-mathml='mrow'] and + not(@data-from-mathml='msqrt' or self::m:msqrt or @data-from-mathml='menclose' or self::m:menclose))" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "放大", pause: "long"] # phrase('zoom in') - with: - variables: [MatchCounter: "$MatchCounter + 1"] - replace: - - test: - if: "$NavCommand = 'MovePreviousZoom'" - then: [x: "*[last()]"] - else: [x: "*[1]"] + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] + - test: + if: "name(*[1]) != 'mrow'" + then: + - with: + variables: [Move2D: "'放大'", Child2D: "IfThenElse(count(*)=0, $Move2D, $Move2D)"] # phrase('in' the denominator) + replace: [x: "IfThenElse($NavCommand = 'MovePreviousZoom', 1, $Child2D)"] + - test: + if: "$NavCommand = 'MovePreviousZoom'" + then: [x: "*[last()]"] + else: [x: "*[1]"] - name: zoom-in-enhanced - tag: "*" match: "$NavCommand = 'ZoomIn' and $NavMode='Enhanced'" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "放大", pause: "long"] # phrase('zoom in') + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - if: "self::m:mtr or self::m:mlabeledtr" then: - with: - variables: [Move2D: "'在'", Child2D: "*[1]/*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "*[1]/*[1]"] # phrase('in' the denominator) replace: [x: "."] - set_variables: [NavNode: "*[1]/*[1]/@id"] # skip mtd - - else_if: "*[1][self::m:mrow and IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false)]" # auto zoom + - else_if: "*[1][self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" # auto zoom then: - with: - variables: [Move2D: "'在'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - set_variables: [NavNode: "*[1]/*[2]/@id"] # skip parens/brackets else: - with: - variables: [Move2D: "'在'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - set_variables: [NavNode: "*[1]/@id"] -- name: zoom-in-2D-not-enhanced + +- name: zoom-in-simple tag: "*" - match: "$NavCommand = 'ZoomIn' and $NavMode!='Enhanced' and IsNode(., '2D')" + match: "$NavCommand = 'ZoomIn' and $NavMode='Simple'" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "放大", pause: "long"] # phrase('zoom in') - with: - variables: [Move2D: "'在'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] replace: [x: "."] - - with: - variables: [MatchCounter: "$MatchCounter + 1", NavCommand: "'MoveNextZoom'"] - replace: [x: "*[1]"] + - test: + if: "DEBUG($MatchCounter) > 1 and IsNode(., '2D') " + then: [set_variables: [NavNode: "@id"]] # time to stop, not going "in" to next thing, so before "Move2D" + else: + - with: + variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + replace: [x: "."] + - x: "*[1]" -- name: zoom-in-default + # At this point, we are zooming in on a non-2D element, non-leaf in Character mode +- name: zoom-in-2D-character tag: "*" - match: "$NavCommand = 'ZoomIn'" + match: "$NavCommand = 'ZoomIn' and (IsNode(., '2D') or not(IsNode(., 'mathml')))" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "放大", pause: "long"] # phrase('zoom in') - with: - variables: [Move2D: "'在'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] + - with: + variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - test: - if: "$NavMode='Character'" + if: "$NavMode = 'Simple'" then: + - set_variables: [NavNode: "*[1]/@id"] + else: - with: - variables: [MatchCounter: "$MatchCounter + 1"] + variables: [NavCommand: "'MoveNextZoom'"] replace: [x: "*[1]"] - else_test: - if: "self::m:mtd" - then: [x: "*[1]"] - else: - - test: - if: "$ReadZoomLevel!=-1" - then: - - set_variables: [ReadZoomLevel: "DistanceFromLeaf(*[1], true, $NavMode!='Character')"] - - set_variables: [NavNode: "*[1]/@id"] + + # At this point, we are zooming in on a non-2D element, non-leaf in Character mode +- name: zoom-in-default + tag: "*" + match: "$NavCommand = 'ZoomIn'" + replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] + - x: "*[1]" + - name: zoom-in-all-default tag: "*" match: "$NavCommand = 'ZoomInAll'" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "一路放大", pause: "medium"] # phrase('zoom in all the way') - with: - variables: [Move2D: "'在'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] replace: [x: "."] - with: - variables: [MatchCounter: "$MatchCounter + 1"] - replace: [x: "*[1]"] + variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + replace: [x: "."] + - x: "*[1]" - name: zoom-out tag: math match: "$NavCommand = 'ZoomOut' or $NavCommand = 'ZoomOutAll'" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity != 'Terse'" - then: [T: "一路縮小", pause: "long"] # phrase('zoomed out all the the way') + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - set_variables: [NavNode: "*[1]/@id"] # no-op for $NavCommand = 'ZoomOut' -- name: zoom-out-top - tag: "*" - match: - - "($NavCommand = 'ZoomOut' or $NavCommand = 'ZoomOutAll') and" - - "parent::m:math " - replace: - - x: ".." # let math rule deal with it - - name: skip-punct-at-end-zoom-out tag: mrow match: @@ -409,19 +372,25 @@ replace: - x: ".." +- name: zoom-out-top + tag: "*" + match: + - "($NavCommand = 'ZoomOut' or $NavCommand = 'ZoomOutAll') and" + - "parent::m:math " + replace: + - x: ".." # let math rule deal with it + - name: zoom-out-all-default tag: "*" match: "$NavCommand = 'ZoomOutAll'" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity != 'Terse'" - then: [T: "一路縮小", pause: "medium"] # phrase('zoomed out all the the way') - with: - variables: [Move2D: "'離開'", Child2D: "."] - replace: [x: ".."] + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - with: - variables: [MatchCounter: "$MatchCounter + 1"] + variables: [Move2D: "'縮小'", Child2D: "."] replace: [x: ".."] + - x: ".." # deal with internal zooming: MoveNextZoom and MovePreviousZoom @@ -432,12 +401,12 @@ - "($NavCommand = 'MoveNextZoom' or $NavCommand = 'MovePreviousZoom') and " - "$NavMode = 'Enhanced'" replace: - # don't bother with MatchCounter since we only get here if > 1 - with: - variables: [Move2D: "'在'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - test: - - if: "count(*)> 1 or IsNode(., 'leaf') or self::m:msqrt or self::m:menclose" + - if: "count(*)> 1 or IsNode(., 'leaf') or + @data-from-mathml='msqrt' or self::m:msqrt or @data-from-mathml='menclose' or self::m:menclose" then: [set_variables: [NavNode: "@id"]] else: [x: "*[1]"] @@ -448,7 +417,7 @@ replace: #don't bother with MatchCounter since we only get here if > 1 - test: - if: "$ReadZoomLevel >= DistanceFromLeaf(., false, $NavMode!='Character')" + if: "IsNode(., 'leaf') or $ReadZoomLevel >= DistanceFromLeaf(., false, $NavMode!='Character')" then: # - with: # variables: [Move2D: "'in'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) @@ -456,7 +425,7 @@ - set_variables: [NavNode: "@id"] else: - with: - variables: [Move2D: "'在'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - x: "*[1]" @@ -475,7 +444,7 @@ - set_variables: [NavNode: "@id"] else: - with: - variables: [Move2D: "'在'", Child2D: "*[last()]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "*[last()]"] # phrase('in' the denominator) replace: [x: "."] - x: "*[last()]" @@ -486,14 +455,14 @@ tag: mtd match: "$Move2D = '' and ($NavCommand = 'ZoomOut')" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: [T: "縮小", pause: "medium"] # phrase('zoom out' of expression) + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] # we need to speak it here - - 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 + # - t: "row" # 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 - set_variables: [NavNode: "../@id"] - name: zoom-out @@ -502,26 +471,23 @@ match: "$NavCommand = 'ZoomOut'" replace: - with: - variables: [MatchCounter: "$MatchCounter + 1"] - replace: - - test: - if: "$MatchCounter = 1 and $NavVerbosity = 'Verbose'" - then: [T: "縮小", pause: "medium"] # phrase('zoom out' of the expression) + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] + - test: + if: "$NavMode='Enhanced' and parent::*[self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" + then: [x: ".."] # auto-zoom: move out a level and retry + else: + - with: + variables: [Move2D: "'縮小'", Child2D: "."] + replace: [x: ".."] - test: - if: "$NavMode='Enhanced' and parent::*[self::m:mrow and IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false)]" - then: [x: ".."] # auto-zoom: move out a level and retry + if: "parent::m:mtd" + then: [x: ".."] else: - - with: - variables: [Move2D: "'離開'", Child2D: "."] - replace: [x: ".."] - test: - if: "parent::m:mtd" - then: [x: ".."] - else: - - test: - if: "$ReadZoomLevel!=-1" - then: [set_variables: [ReadZoomLevel: "DistanceFromLeaf(.., true, $NavMode!='Character')"]] - - set_variables: [NavNode: "../@id"] + if: "$ReadZoomLevel!=-1" + then: [set_variables: [ReadZoomLevel: "DistanceFromLeaf(.., true, $NavMode!='Character')"]] + - set_variables: [NavNode: "../@id"] # ********* MoveStart/End *************** - name: math-move-to-start-or-end @@ -536,42 +502,56 @@ 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'" then: # move inside of the mrow inside of 'math' or inside the fraction, etc (hence two levels down) + # Note: an apparent bug in the xpath code doesn't let me use IfThenElse for the 2 if: then: below - with: variables: [NavCommand: "'MoveNextZoom'"] - replace: [x: "*[1]/*[1]"] + replace: + - test: + if: "*[1]/*[1]" # could be a x, so no grandchild + then: [x: "*[1]/*[1]"] + else: [x: "*[1]"] else: - with: variables: [NavCommand: "'MovePreviousZoom'"] - replace: [x: "*[last()]/*[last()]"] + replace: + - test: + if: "*[last()]/*[last()]" # could be a x, so no grandchild + then: [x: "*[last()]/*[last()]"] + else: [x: "*[last()]"] # We stop when the parent is 2d (e.g., frac), but not if in leaf base of msub/msup/msubsup/mmultiscripts because that's really on the same line - name: move-to-start-or-end-2d tag: "*" match: - "($NavCommand = 'MoveLineStart' or $NavCommand = 'MoveLineEnd') and IsNode(.., '2D') and" - - "not( IsNode(., 'leaf') and (parent::m:msub or parent::m:msup or parent::m:msubsup or parent::m:mmultiscripts) )" + - "not( IsNode(., 'leaf') and" + - " parent::*[1][self::m:msub or self::m:msup or self::m:msubsup or self::m:mmultiscripts or" + - " @data-from-mathml and" + - " (@data-from-mathml='msub' or @data-from-mathml='msup' or" + - " @data-from-mathml='msubsup' or @data-from-mathml='mmultiscripts')" + - " ] )" replace: - test: if: "$NavVerbosity = 'Verbose'" 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" + if: "self::m:mrow or @data-from-mathml = 'mrow'" then_test: if: "$NavCommand = 'MoveLineStart'" then: @@ -604,7 +584,7 @@ - "$NavCommand='MoveColumnStart' or $NavCommand='MoveColumnEnd' or" - "$NavCommand='ReadCellCurrent'" replace: - - T: "不在表中" # phrase('not in table') + - t: "不在表格內" # phrase('not in table') - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -618,12 +598,12 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "向左移" # phrase('move left') + - t: "移動往左" # phrase('move left') - pause: short - test: if: "$NavVerbosity != 'Terse'" then: - - T: "行" # phrase(the first 'column' of the table) + - t: "欄" # phrase(the first 'column' of the table) - x: "count(preceding-sibling::*)" - pause: medium - test: @@ -635,7 +615,7 @@ else: - set_variables: [NavNode: "preceding-sibling::*[1]/*[1]/@id"] else: - - T: "沒有前一行" # phrase('no previous column' in the table) + - t: "沒有上一欄" # phrase('no previous column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-next @@ -648,12 +628,12 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "向右移" # phrase('move right') + - t: "移動往右" # phrase('move right') - pause: short - test: if: "$NavVerbosity != 'Terse'" then: - - T: "行" # phrase(the first 'column' in the table) + - t: "欄" # phrase(the first 'column' in the table) - x: "count(preceding-sibling::*)+2" - pause: medium - test: @@ -665,7 +645,7 @@ else: - set_variables: [NavNode: "following-sibling::*[1]/*[1]/@id"] else: - - T: "沒有下一行" # phrase('no next column' in the table) + - t: "沒有下一欄" # phrase('no next column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-up @@ -681,15 +661,15 @@ - 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'" then: - - T: "列" # phrase(the previous 'row' in the table) + - t: "列" # phrase(the previous 'row' in the table) - x: "count(../preceding-sibling::*)" - pause: short - - T: "行" # phrase(the previous 'column' in the table) + - t: "欄" # phrase(the previous 'column' in the table) - x: "count(preceding-sibling::*)+1" - pause: medium - test: @@ -701,7 +681,7 @@ else: - set_variables: [NavNode: "../preceding-sibling::*[1]/*[$Column]/*[1]/@id"] else: - - T: "沒有前一列" # phrase('no previous row' in the table) + - t: "沒有前一列" # phrase('no previous row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-down @@ -717,15 +697,15 @@ - 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'" then: - - T: "列" # phrase(the next 'row' in the table) + - t: "列" # phrase(the next 'row' in the table) - x: "count(../preceding-sibling::*)+2" - pause: short - - T: "行" # phrase(the next 'column' in the table) + - t: "欄" # phrase(the next 'column' in the table) - x: "count(preceding-sibling::*)+1" - pause: medium - test: @@ -737,27 +717,21 @@ else: - set_variables: [NavNode: "../following-sibling::*[1]/*[$Column]/*[1]/@id"] else: - - T: "沒有下一列" # phrase('no next row' in the table) + - t: "沒有下一列" # phrase('no next row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-up tag: [mtr, mlabeledtr] match: "$NavCommand='MoveCellUp'" replace: + - test: + if: "$NavVerbosity = 'Verbose'" + then: + - t: "移到前一列" # phrase('move to previous row' to the previous row in the table) + - pause: medium - test: if: "preceding-sibling::*" then: - - test: - if: "$NavVerbosity = 'Verbose'" - then: - - T: "向上移動" # phrase('move up' to the previous row in the table) - - pause: medium - - test: - if: "$NavVerbosity != 'Terse'" - then: - - T: "列" # phrase(the previous 'row' in the table) - - x: "count(preceding-sibling::*)" - - pause: medium - test: if: "$NavMode='Character'" then: @@ -767,27 +741,21 @@ else: - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] else: - - T: "沒有前一列" # phrase('no previous row' in the table) + - t: "沒有前一列" # phrase('no previous row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-down tag: [mtr, mlabeledtr] match: "$NavCommand='MoveCellDown'" replace: + - test: + if: "$NavVerbosity = 'Verbose'" + then: + - t: "移到下一列" # phrase('move to next row' to the next row in the table) + - pause: medium - test: if: "following-sibling::*" then: - - test: - if: "$NavVerbosity = 'Verbose'" - then: - - T: "向下移動" # phrase('move down' to the next row in the table) - - pause: medium - - test: - if: "$NavVerbosity != 'Terse'" - then: - - T: "列" # phrase(the previous 'row' in the table) - - x: "count(preceding-sibling::*)+2" - - pause: medium - test: if: "$NavMode='Character'" then: @@ -797,9 +765,35 @@ else: - set_variables: [NavNode: "following-sibling::*[1]/@id"] else: - - T: "沒有下一列" # phrase('no next row' in the table) + - t: "沒有下一列" # phrase('no next row' in the table) - set_variables: [SpeakExpression: "'false'"] +- name: move-cell-previous + # if a row is selected, there is no previous/next column, so this is trivial + tag: [mtr, mlabeledtr] + match: "$NavCommand='MoveCellPrevious'" + replace: + - test: + if: "$NavVerbosity = 'Verbose'" + then: + - t: "移到前一欄" # phrase('move to previous column' to the previous row in the table) + - pause: medium + - t: "沒有前一欄" # phrase('no previous column' in the table) + - set_variables: [SpeakExpression: "'false'"] + +- name: move-cell-next + # if a row is selected, there is no previous/next column, so this is trivial + tag: [mtr, mlabeledtr] + match: "$NavCommand='MoveCellNext'" + replace: + - test: + if: "$NavVerbosity = 'Verbose'" + then: + - t: "移到下一欄" # phrase('move to next column' to the next row in the table) + - pause: medium + - t: "沒有下一欄" # phrase('no next column' in the table) + - set_variables: [SpeakExpression: "'false'"] + - name: default-read-cell tag: "*" match: "$NavCommand='ReadCellCurrent'" @@ -813,19 +807,20 @@ - 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'" then: - - T: "列" # phrase(the previous 'row' in the table) + - t: "列" # phrase(the previous 'row' in the table) - x: "count($MTD[1]/../preceding-sibling::*)+1" - - T: "行" # phrase(the previous 'column' in the table) + - pause: short + - t: "欄" # phrase(the previous 'column' in the table) - x: "count($MTD[1]/preceding-sibling::*)+1" - pause: short - set_variables: [NavNode: "$MTD[1]/*[1]/@id"] else: - - T: "不在表中" # phrase('not in table' or matrix) + - t: "not in table" # phrase('not in table' or matrix) - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1065,7 +1060,7 @@ then: - x: "ancestor::m:mtd[1]" # try again on an mtd node else: - - T: "不在表中" # phrase('not in table' or matrix) + - t: "不在表內" # phrase('not in table' or matrix) - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1087,7 +1082,7 @@ then: [x: "$Following"] else: - with: - variables: [Move2D: "'在'", Child2D: "$Following"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "$Following"] # phrase('in' the denominator) replace: [x: ".."] - with: variables: [NavCommand: "'MoveNextZoom'"] @@ -1109,7 +1104,7 @@ then: [x: "$Preceding"] else: - with: - variables: [Move2D: "'在'", Child2D: "$Preceding"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "$Preceding"] # phrase('in' the denominator) replace: [x: ".."] - with: variables: [NavCommand: "'MovePreviousZoom'"] @@ -1124,24 +1119,14 @@ - "($NavCommand = 'MoveNext' or $NavCommand = 'ReadNext' or $NavCommand = 'DescribeNext') and" - "following-sibling::*[1][name(.)='mo' and translate(., '\u2061\u2062\u2063\u2064', '')='']" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: - - 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') # phrase(move 'right') - - pause: short - with: - variables: [MatchCounter: "$MatchCounter + 1"] - replace: - - test: - if: "following-sibling::*[1][.='\u2062' or .='\u2064'] and $NavMode='Enhanced'" # invisible times and plus - then: [set_variables: [NavNode: "following-sibling::*[1]/@id"]] - else: [x: "following-sibling::*[1]"] + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] + - test: + if: "following-sibling::*[1][.='\u2062' or .='\u2064'] and + ($NavMode='Enhanced' or ($NavMode='Simple' and following-sibling::*[2][not(IsNode(., 'mathml'))]))" # invisible times and plus + then: [set_variables: [NavNode: "following-sibling::*[1]/@id"]] + else: [x: "following-sibling::*[1]"] - name: move-next-no-auto-zoom-at-edge # at edge of 2D and in a mode where moving right isn't an option @@ -1150,11 +1135,15 @@ match: "$NavCommand = 'MoveNext' and $NavMode!='Character' and not($AutoZoomOut) and $EdgeNode/@id!=@id" replace: - test: - if: "$MatchCounter = 0 and $NavVerbosity != 'Terse' and $NavCommand = 'MoveNext'" + if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - T: "無法往右移動" # phrase('cannot move right') + - t: "不能移動往右" # phrase('cannot move right') + - pause: medium - with: - variables: [Move2D: "'結束'", Child2D: "$EdgeNode/*[last()]"] + variables: + - Move2D: "'end of'" + - Child2D: "$EdgeNode/*[last()]" + - MatchCounter: $MatchCounter + 1 replace: [x: "$EdgeNode"] - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1167,17 +1156,19 @@ - "(self::m:math or name(EdgeNode(., 'right', 'math'))='math')" # at edge of math replace: - test: - if: "$MatchCounter = 0 and $NavVerbosity != 'Terse'" + 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) + 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, end of math') - - pause: long + 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') + - pause: long - set_variables: [SpeakExpression: "'false'"] - name: move-next-auto-zoom-up-one-level @@ -1192,50 +1183,36 @@ - " )" - ")" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" + if: "following-sibling::*" then: - - 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') # phrase(move 'right') - - pause: short - - with: - variables: [MatchCounter: "$MatchCounter + 1", NavCommand: "'MoveNext'"] - replace: - - test: - if: "following-sibling::*" - then: - - with: - variables: [Move2D: "'在'", Child2D: "."] # phrase('in' the denominator) - replace: [x: ".."] - else: - - with: - variables: [Move2D: "'離開'", Child2D: "."] - replace: [x: ".."] - - test: - if: "following-sibling::*" - then: - - x: ".." # move out of parens - else: - - x: ".." + - with: + variables: [Move2D: "'放大'", Child2D: "."] # phrase('in' the denominator) + replace: [x: ".."] + else: + - with: + variables: [Move2D: "'縮小'", Child2D: "."] + replace: [x: ".."] + - x: ".." # At this point, if XXXNext, then we know there is must be a right sibling - name: move-next-default tag: mtd match: "$Move2D = '' and ($NavCommand = 'MoveNext' or $NavCommand = 'ReadNext' or $NavCommand = 'DescribeNext')" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - # can't get here with MatchCounter=0, so no need to echo command if: "following-sibling::*" then: - test: - if: "$NavVerbosity != 'Terse'" + if: "$NavVerbosity = 'Verbose'" then: - - T: "行" # phrase(the previous 'column' in the table) + - t: "欄" # phrase(the previous 'column' in the table) - x: "count(preceding-sibling::*)+2" - pause: short - test: @@ -1250,25 +1227,21 @@ - name: move-next-default tag: [mtr, mlabeledtr] - match: "$Move2D = '' and ($NavCommand = 'MoveNext' or $NavCommand = 'ReadNext' or $NavCommand = 'DescribeNext')" + match: "$Move2D = '' and + ($NavCommand = 'MoveNext' or $NavCommand = 'ReadNext' or $NavCommand = 'DescribeNext') and + following-sibling::*" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - # can't get here with MatchCounter=0, so no need to echo command - if: "following-sibling::*" + if: "$NavMode = 'Character'" then: - - T: "列" # phrase(the previous 'row' in the table) - - x: "count(preceding-sibling::*)+2" - - T: "第 1 行" # phrase('column 1' in the table) - - pause: medium - - test: - if: "$NavMode = 'Character'" - then: - - with: - variables: [NavCommand: "'MoveNextZoom'"] - replace: [x: "following-sibling::*[1]"] - else: - - set_variables: [NavNode: "following-sibling::*[1]/*[1]/*[1]/@id"] - else: [x: ".."] # try again for after + - with: + variables: [NavCommand: "'MoveNextZoom'"] + replace: [x: "following-sibling::*[1]"] + else: + - set_variables: [NavNode: "following-sibling::*[1]/@id"] - name: move-next-auto-zoom-parens # auto-zoom into next child if next child is parenthesized expr @@ -1278,20 +1251,12 @@ - "$NavMode='Enhanced' and" - "parent::m:mrow and following-sibling::* and" - "following-sibling::*[1][self::m:mrow and count(*)=3 and " #exclude empty parens - - " (IsBracketed(., '(', ')') or IsBracketed(., '[', ']'))" - - " ]" + - " (IsBracketed(., '(', ')') or IsBracketed(., '[', ']'))" + - " ]" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: - - 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') # phrase(move 'right') - - pause: short + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - set_variables: [NavNode: "following-sibling::*[1]/*[2]/@id"] # normal cases for MoveNext @@ -1302,57 +1267,43 @@ - "($NavCommand = 'MoveNext' or $NavCommand = 'ReadNext' or $NavCommand = 'DescribeNext') and" - "$ReadZoomLevel>=0" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: - - 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') # phrase(move 'right') - - pause: short + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: # if in base (nothing before), we must be moving to a script, so "in" will be said if: "preceding-sibling::* and following-sibling::*[1][name(.)='none']" then: - with: - variables: [Move2D: "'離開'", Child2D: "."] + variables: [Move2D: "'縮小'", Child2D: "."] replace: [x: ".."] - - with: - variables: [MatchCounter: "$MatchCounter + 1"] - replace: [x: "following-sibling::*[1]"] # skip over 'none' + - x: "following-sibling::*[1]" else: - with: - variables: [Move2D: "'在'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - with: - variables: [MatchCounter: "$MatchCounter + 1", NavCommand: "'MoveNextZoom'"] + variables: [NavCommand: "'MoveNextZoom'"] replace: [x: "following-sibling::*[1]"] - name: move-next-default tag: "*" match: "$NavCommand = 'MoveNext' or $NavCommand = 'ReadNext' or $NavCommand = 'DescribeNext'" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: + if: "following-sibling::*[1][@data-from-mathml='none' or @data-from-mathml='mprescripts']" + then: [x: "following-sibling::*[1]"] + else: - 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') # phrase(move 'right') - - pause: short - - test: - if: "IsNode(.., '2D')" - then: - - with: - variables: [Move2D: "'在'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) - replace: [x: ".."] - - set_variables: [NavNode: "following-sibling::*[1]/@id"] + if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))" + then: + - with: + variables: [Move2D: "'放大'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) + replace: [x: ".."] + - set_variables: [NavNode: "following-sibling::*[1]/@id"] # ======== Move/Read/Describe Previous rules ================= @@ -1363,38 +1314,31 @@ - "($NavCommand = 'MovePrevious' or $NavCommand = 'ReadPrevious' or $NavCommand = 'DescribePrevious') and" - "preceding-sibling::*[1][name(.)='mo' and translate(., '\u2061\u2062\u2063\u2064', '')='']" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: - - test: - - if: "$NavCommand = 'MovePrevious'" - then: [T: "移動"] # phrase('move' to next entry in table) - - else_if: "$NavCommand = 'ReadPrevious'" - then: [T: "讀"] # phrase('read' next entry in table) - else: [T: "描述"] # phrase('describe' next entry in table) - - T: "往左" # phrase(move 'left') - - pause: short - with: - variables: [MatchCounter: "$MatchCounter + 1"] - replace: - - test: - if: "preceding-sibling::*[1][.='\u2062' or .='\u2064'] and $NavMode='Enhanced'" # invisible times and plus - then: [set_variables: [NavNode: "preceding-sibling::*[1]/@id"]] - else: [x: "preceding-sibling::*[1]"] + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] + - test: + if: "preceding-sibling::*[1][.='\u2062' or .='\u2064'] and $NavMode='Enhanced'" # invisible times and plus + then: [set_variables: [NavNode: "preceding-sibling::*[1]/@id"]] + else: [x: "preceding-sibling::*[1]"] -# two rules for when can't move right +# two rules for when can't move left - name: move-previous-no-auto-zoom-at-edge - # at edge of 2D and in a mode where moving right isn't an option + # at edge of 2D and in a mode where moving left isn't an option tag: "*" variables: [EdgeNode: "EdgeNode(., 'left', '2D')"] match: "$NavCommand = 'MovePrevious' and $NavMode!='Character' and not($AutoZoomOut) and $EdgeNode/@id!=@id" replace: - test: - if: "$MatchCounter = 0 and $NavVerbosity != 'Terse' and $NavCommand = 'MovePrevious'" + 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: "'離開'", Child2D: "$EdgeNode/*[1]"] + variables: + - Move2D: "'end of'" + - Child2D: "$EdgeNode/*[1]" + - MatchCounter: $MatchCounter + 1 replace: [x: "$EdgeNode"] - pause: long @@ -1405,7 +1349,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'"] @@ -1416,10 +1360,14 @@ - "name(EdgeNode(., 'left', 'math'))='math'" # at edge of math replace: - test: - if: "$MatchCounter = 0 and $NavVerbosity != 'Terse'" + if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - T: "無法向左移動,數學開始" # phrase('cannot move left, start of math') - - pause: long + - t: "不能移動往左" # phrase('cannot move left') + - pause: short + - with: + variables: [Move2D: "'start of'", Child2D: "."] + replace: [x: "."] + - pause: long - set_variables: [SpeakExpression: "'false'"] - name: move-previous-auto-zoom-up-one-level @@ -1434,36 +1382,20 @@ - " )" - ")" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" + if: "preceding-sibling::*" then: - - test: - - if: "$NavCommand = 'MovePrevious'" - then: [T: "移動"] # phrase('move' to next entry in table) - - else_if: "$NavCommand = 'ReadPrevious'" - then: [T: "讀"] # phrase('read' next entry in table) - else: [T: "描述"] # phrase('describe' next entry in table) - - T: "往左" # phrase(move 'left') - - pause: short - - with: - variables: [MatchCounter: "$MatchCounter + 1", NavCommand: "'MovePrevious'"] - replace: - - test: - if: "preceding-sibling::*" - then: - - with: - variables: [Move2D: "'在'", Child2D: "."] # phrase('in' the denominator) - replace: [x: ".."] - else: - - with: - variables: [Move2D: "'離開'", Child2D: "."] - replace: [x: ".."] - - test: - if: "preceding-sibling::*" - then: - - x: .. # move out of parens - else: - - x: ".." + - with: + variables: [Move2D: "'放大'", Child2D: "."] # phrase('in' the denominator) + replace: [x: ".."] + else: + - with: + variables: [Move2D: "'縮小'", Child2D: "."] + replace: [x: ".."] + - x: ".." - name: move-previous-auto-zoom-parens # auto-zoom into previous child if previous child is parenthesized expr @@ -1480,22 +1412,14 @@ - " (IsBracketed(., '(', ')') or IsBracketed(., '[', ']'))" - " ]" replace: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: - - test: - - if: "$NavCommand = 'MovePrevious'" - then: [T: "移動"] # phrase('move' to next entry in table) - - else_if: "$NavCommand = 'ReadPrevious'" - then: [T: "讀"] # phrase('read' next entry in table) - else: [T: "描述"] # phrase('describe' next entry in table) - - T: "往左" # phrase(move 'left') - - pause: short + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: if: "not(parent::m:mrow)" then: - with: - variables: [Move2D: "'在'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - set_variables: [NavNode: "preceding-sibling::*[1]/*[2]/@id"] @@ -1503,44 +1427,37 @@ - name: move-previous-default tag: mtd - match: "$Move2D = '' and ($NavCommand = 'MovePrevious' or $NavCommand = 'ReadPrevious' or $NavCommand = 'DescribePrevious')" + match: "$Move2D = '' and + ($NavCommand = 'MovePrevious' or $NavCommand = 'ReadPrevious' or $NavCommand = 'DescribePrevious') and + preceding-sibling::*" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - # can't get here with MatchCounter=0, so no need to echo command - if: "preceding-sibling::*" + if: "$NavVerbosity = 'Verbose'" then: - - test: - if: "$NavVerbosity != 'Terse'" - then: - - T: "行" # phrase(the first 'column' in the table) - - x: "count(preceding-sibling::*)" - - pause: short - - test: - if: "$NavMode = 'Character'" - then: - - with: - variables: [NavCommand: "'MovePreviousZoom'"] - replace: [x: "preceding-sibling::*[1]"] - else: [set_variables: [NavNode: "preceding-sibling::*[1]/*[last()]/@id"]] - else: - - x: ".." # try again at the row level + - t: "欄" # phrase(the first 'column' in the table) + - x: "count(preceding-sibling::*)" + - pause: short + - test: + if: "$NavMode = 'Character'" + then: + - with: + variables: [NavCommand: "'MovePreviousZoom'"] + replace: [x: "preceding-sibling::*[1]"] + else: [set_variables: [NavNode: "preceding-sibling::*[1]/*[last()]/@id"]] - name: move-previous-default tag: [mtr, mlabeledtr] match: "$Move2D = '' and ($NavCommand = 'MovePrevious' or $NavCommand = 'ReadPrevious' or $NavCommand = 'DescribePrevious')" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - # can't get here with MatchCounter=0, so no need to echo command if: "preceding-sibling::*" then: - - test: - if: "$NavVerbosity != 'Terse'" - then: - - T: "列" # phrase('row' five in table) - - x: "count(preceding-sibling::*)" - - T: "行" # phrase('column' five in table) - - x: "count(*)" - - pause: medium - test: if: "$NavMode = 'Character'" then: @@ -1548,7 +1465,7 @@ variables: [NavCommand: "'MovePreviousZoom'"] replace: [x: "preceding-sibling::*[1]"] else: - - set_variables: [NavNode: "preceding-sibling::*[1]/*[last()]/*[last()]/@id"] + - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] else: [x: ".."] # try again for after - name: move-previous-locked-zoom-level @@ -1558,57 +1475,43 @@ - "($NavCommand = 'MovePrevious' or $NavCommand = 'ReadPrevious' or $NavCommand = 'DescribePrevious') and" - "$ReadZoomLevel>=0" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: # if moving into base (nothing before), we must be moving to the base, so "in" will be said if: "count(preceding-sibling::*) > 2 and preceding-sibling::*[1][name(.)='none']" then: - with: - variables: [Move2D: "'離開'", Child2D: "."] + variables: [Move2D: "'縮小'", Child2D: "."] replace: [x: ".."] - - with: - variables: [MatchCounter: "$MatchCounter + 1"] - replace: [x: "preceding-sibling::*[1]"] # skip over 'none' + - x: "preceding-sibling::*[1]" # skip over 'none' else: - - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: - - test: - - if: "$NavCommand = 'MovePrevious'" - then: [T: "移動"] # phrase('move' to next entry in table) - - else_if: "$NavCommand = 'ReadPrevious'" - then: [T: "讀"] # phrase('read' next entry in table) - else: [T: "描述"] # phrase('describe' next entry in table) - - T: "往左" # phrase(move 'left') - - pause: short - with: - variables: [Move2D: "'在'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'放大'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - with: - variables: [MatchCounter: "$MatchCounter + 1", NavCommand: "'MovePreviousZoom'"] + variables: [NavCommand: "'MovePreviousZoom'"] replace: [x: "preceding-sibling::*[1]"] - name: move-previous-default tag: "*" match: "$NavCommand = 'MovePrevious' or $NavCommand = 'ReadPrevious' or $NavCommand = 'DescribePrevious'" replace: + - with: + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] + replace: [x: "."] - test: - if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" - then: + if: "preceding-sibling::*[1][@data-from-mathml='none' or @data-from-mathml='mprescripts']" + then: [x: "preceding-sibling::*[1]"] + else: - test: - - if: "$NavCommand = 'MovePrevious'" - then: [T: "移動"] # phrase('move' to next entry in table) - - else_if: "$NavCommand = 'ReadPrevious'" - then: [T: "讀"] # phrase('read' next entry in table) - else: [T: "描述"] # phrase('describe' next entry in table) - - T: "往左" # phrase(move 'left') - - pause: short - - test: - if: "IsNode(.., '2D')" - then: - - with: - variables: [Move2D: "'在'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) - replace: [x: ".."] - - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] + if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))" + then: + - with: + variables: [Move2D: "'放大'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) + replace: [x: ".."] + - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] # ********* ReadZoomLevel toggle *************** # These set ::NavMode @@ -1620,16 +1523,16 @@ - 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: - - T: "簡單" # phrase(a 'simple' way to do something) + - t: "簡易" # phrase(a 'simple' way to do something) - set_variables: [NavMode: "'Simple'", ReadZoomLevel: "1"] - else: - - T: "增強" # phrase(an 'enhanced' way to do something) + - t: "增強" # phrase(an 'enhanced' way to do something) - set_variables: [NavMode: "'Enhanced'", ReadZoomLevel: "-1"] - - T: "模式" # phrase(a simple 'mode' of use) + - t: "模式" # phrase(a simple 'mode' of use) - pause: long - test: - if: "$NavMode != 'Enhanced'" # potentially need to zoom to the sibling @@ -1645,16 +1548,16 @@ - test: - if: "$NavMode = 'Enhanced'" then: - - T: "簡單" # phrase(an 'simple' way to do something) + - t: "簡易" # phrase(a 'simple' way to do something) - set_variables: [NavMode: "'Simple'", ReadZoomLevel: "1"] - else_if: "$NavMode = 'Character'" then: - - T: "增強" # phrase(an 'enhanced' way to do something) + - 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) + - t: "模式" # phrase(a simple 'mode' of use) - pause: long - test: - if: "$NavMode != 'Enhanced'" # potentially need to zoom to the sibling @@ -1670,12 +1573,13 @@ - 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'"] - - pause: long - name: current tag: "*" @@ -1686,11 +1590,11 @@ then: - test: - if: "$NavCommand = 'ReadCurrent'" - then: [T: "讀"] # phrase('read' next entry in table) - else: [T: "描述"] # phrase('describe' next entry in table) - - T: "當前的" # phrase('current' entry in table) + then: [t: "讀出"] # phrase('read' next entry in table) + else: [t: "描述"] # phrase('describe' next entry in table) + - t: "當前" # phrase('current' entry in table) + - pause: long - set_variables: [NavNode: "@id"] - - pause: long # this needs to be near the end because we only test for 'Describe', "Read", etc., and we don't want to get 'DescribeNext', etc. - name: placemarker @@ -1706,13 +1610,13 @@ then: - test: - if: "starts-with($NavCommand, 'Read')" - then: [T: "讀"] # phrase('read' next entry in table) + 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) - - T: "佔位符" # phrase('placeholder' for the value) + then: [t: "移到"] # phrase('move to' 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 - set_variables: [NavNode: "$PlaceMarker"] @@ -1724,7 +1628,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"] @@ -1735,8 +1639,6 @@ # Alternatively, it could insert a special token that Rust code does a "replace" on with the speech (e.g. SPEECH_AT{id}) # or a new command "speak" which takes a node id - name: where-am-i-start - - tag: "*" match: "($NavCommand = 'WhereAmI' or $NavCommand = 'WhereAmIAll') and $MatchCounter = 0" replace: @@ -1758,11 +1660,11 @@ - test: if: "$NavCommand = 'WhereAmI'" then: - - T: "內部沒東西" # phrase('inside of nothing more') + - t: "inside of nothing more" # phrase('inside of nothing more') - pause: long - set_variables: [SpeakExpression: "'false'"] else: - - T: "裡面" # phrase('inside' a big expression) + - t: "inside" # phrase('inside' a big expression) - pause: medium - set_variables: [NavNode: "@id"] @@ -1770,10 +1672,10 @@ tag: "*" match: "$NavCommand = 'WhereAmI' or $NavCommand = 'WhereAmIAll'" replace: - - T: "裡面" # phrase('inside' a big expression) + - t: "inside" # phrase('inside' a big expression) - pause: medium - test: - - if: "$NavMode='Enhanced' and parent::*[self::m:mrow and IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false)]" + - if: "$NavMode='Enhanced' and parent::*[self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" then: [x: ".."] # auto-zoom up - else_if: "$NavCommand = 'WhereAmI'" then: [set_variables: [NavNode: "@id"]] From 00da575f3027c0f477a5b178dbb2c3efc6deb3bb Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Mon, 25 May 2026 10:29:42 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20definitions.yaml=20?= =?UTF-8?q?=E8=88=87=20navigate.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rules/Languages/zh/tw/definitions.yaml | 4 +- Rules/Languages/zh/tw/navigate.yaml | 187 +++++++++++++------------ 2 files changed, 99 insertions(+), 92 deletions(-) diff --git a/Rules/Languages/zh/tw/definitions.yaml b/Rules/Languages/zh/tw/definitions.yaml index f9c453621..d5f1b8a28 100644 --- a/Rules/Languages/zh/tw/definitions.yaml +++ b/Rules/Languages/zh/tw/definitions.yaml @@ -68,8 +68,8 @@ # words for moving into and out of one of the parts (e.g., "move right 'out of' numerator, 'in' denominator") # it's a hack to put them here, but at least they are grouped with the other navigation parts - "in": "放大", - "out": "縮小", + "in": "進入", + "out": "退出", } diff --git a/Rules/Languages/zh/tw/navigate.yaml b/Rules/Languages/zh/tw/navigate.yaml index 613cc7b0b..803c462a7 100644 --- a/Rules/Languages/zh/tw/navigate.yaml +++ b/Rules/Languages/zh/tw/navigate.yaml @@ -48,15 +48,15 @@ - 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: "''"]] # phrase('zoom' in to see more details) #hjy -- 'zoom' is a bit weird in Chinese, so skip it. + then: [set_variables: [Prefix: "' '"]] # phrase('zoom' in to see more details) #hjy -- 'zoom' is a bit weird in Chinese, so skip it. - else_if: "starts-with($NavCommand, 'Move')" - then: [set_variables: [Prefix: "'移動'"]] # 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: "'讀出'"]] # phrase('read' to next entry in table) - else_if: "starts-with($NavCommand, 'Describe')" @@ -66,25 +66,31 @@ then: - x: "$Prefix" - test: - - if: "substring($NavCommand, string-length($Prefix)+1) = 'In'" + - if: "substring($NavCommand, 5) = 'In'" then: [t: "放大"] # phrase(zoom 'in' to see more details) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'InAll'" + - else_if: "substring($NavCommand, 5) = '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) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Out'" + then: [t: "完全放大"] # phrase(zoom 'out all the way' to see more details) + - else_if: "substring($NavCommand, 5) = 'Out'" then: [t: "縮小"] # phrase(zoom 'out' to see more details) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'OutAll'" + - else_if: "substring($NavCommand, 5) = '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) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Next'" - then: [t: "往右"] # phrase(move to the 'right') - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Previous'" - then: [t: "往左"] # phrase(move to the 'left') - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Current'" + then: [t: "完全縮小"] # phrase(zoom 'out all the way' to see more details) + - else_if: "substring($NavCommand, 5) = 'Next'" # string-length($Prefix)+1 ###fix by hjy + then: [t: "下一項"] # phrase(move to the 'right') + - else_if: "substring($NavCommand, 9) = 'Next'" # string-length($Prefix)+1 ###fix by hjy for describe + then: [t: "下一項"] # phrase(move to the 'right') + - else_if: "substring($NavCommand, 5) = 'Previous'" #string-length($Prefix)+1 ###fix by hjy + then: [t: "上一項"] # phrase(move to the 'left') + - else_if: "substring($NavCommand, 9) = 'Previous'" #string-length($Prefix)+1 ###fix by hjy for describe + then: [t: "上一項"] # phrase(move to the 'left') + - else_if: "substring($NavCommand, 5) = 'Current'" 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') - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'LineEnd'" + - else_if: "substring($NavCommand, 9) = 'Current'" + then: [t: "目前"] # phrase(who is the 'current' president) + - else_if: "substring($NavCommand, 5) = 'LineStart'" + then: [t: "到行首"] # phrase(move 'to start of line') + - else_if: "substring($NavCommand, 5) = 'LineEnd'" then: [t: "到行尾"] # phrase(move 'to end of line') - pause: "medium" - set_variables: [MatchCounter: "$MatchCounter + 1"] @@ -98,9 +104,9 @@ - name: into-or-out-of-mtr tag: [mtr, mlabeledtr] - match: "$Move2D = '放大'" + match: "$Move2D = '進入'" replace: - - t: "欄" + - t: "行" - x: "count($Child2D/preceding-sibling::*)+1" - pause: "medium" @@ -153,8 +159,9 @@ if: "$NavVerbosity = 'Verbose'" then: [x: "translate(name(.), '-_', ' ')"] # e.g., "in absolute value" else: - - t: "部" # phrase(the 'part' of the expression) + - t: "第" # phrase(the 'part' of the expression) - x: "count($Child2D/preceding-sibling::*) + 1" + - t: "部分" # phrase(the 'part' of the expression) - pause: "medium" - name: default-move @@ -184,11 +191,11 @@ - else_if: "$PreviousNavCommand = 'ZoomOutAll'" 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') + then: [t: "沒有前一指令"] # phrase('no previous command') - pause: "medium" - set_variables: [NavNode: "@id"] @@ -211,7 +218,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: @@ -261,7 +268,7 @@ if: "name(*[1]) != 'mrow'" then: - with: - variables: [Move2D: "'放大'", Child2D: "IfThenElse(count(*)=0, $Move2D, $Move2D)"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "IfThenElse(count(*)=0, $Move2D, $Move2D)"] # phrase('in' the denominator) replace: [x: "IfThenElse($NavCommand = 'MovePreviousZoom', 1, $Child2D)"] - test: if: "$NavCommand = 'MovePreviousZoom'" @@ -279,18 +286,18 @@ - if: "self::m:mtr or self::m:mlabeledtr" then: - with: - variables: [Move2D: "'放大'", Child2D: "*[1]/*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]/*[1]"] # phrase('in' the denominator) replace: [x: "."] - set_variables: [NavNode: "*[1]/*[1]/@id"] # skip mtd - else_if: "*[1][self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" # auto zoom then: - with: - variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - set_variables: [NavNode: "*[1]/*[2]/@id"] # skip parens/brackets else: - with: - variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - set_variables: [NavNode: "*[1]/@id"] @@ -307,7 +314,7 @@ then: [set_variables: [NavNode: "@id"]] # time to stop, not going "in" to next thing, so before "Move2D" else: - with: - variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - x: "*[1]" @@ -320,7 +327,7 @@ variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] replace: [x: "."] - with: - variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - test: if: "$NavMode = 'Simple'" @@ -350,7 +357,7 @@ variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] replace: [x: "."] - with: - variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - x: "*[1]" @@ -388,7 +395,7 @@ variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] replace: [x: "."] - with: - variables: [Move2D: "'縮小'", Child2D: "."] + variables: [Move2D: "'退出'", Child2D: "."] replace: [x: ".."] - x: ".." @@ -402,7 +409,7 @@ - "$NavMode = 'Enhanced'" replace: - with: - variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - test: - if: "count(*)> 1 or IsNode(., 'leaf') or @@ -425,7 +432,7 @@ - set_variables: [NavNode: "@id"] else: - with: - variables: [Move2D: "'放大'", Child2D: "*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[1]"] # phrase('in' the denominator) replace: [x: "."] - x: "*[1]" @@ -444,7 +451,7 @@ - set_variables: [NavNode: "@id"] else: - with: - variables: [Move2D: "'放大'", Child2D: "*[last()]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "*[last()]"] # phrase('in' the denominator) replace: [x: "."] - x: "*[last()]" @@ -478,7 +485,7 @@ then: [x: ".."] # auto-zoom: move out a level and retry else: - with: - variables: [Move2D: "'縮小'", Child2D: "."] + variables: [Move2D: "'退出'", Child2D: "."] replace: [x: ".."] - test: if: "parent::m:mtd" @@ -502,12 +509,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'" @@ -547,8 +554,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'" @@ -598,12 +605,12 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移動往左" # phrase('move left') + - t: "移至上一項" # phrase('move left') - pause: short - test: if: "$NavVerbosity != 'Terse'" then: - - t: "欄" # phrase(the first 'column' of the table) + - t: "行" # phrase(the first 'column' of the table) - x: "count(preceding-sibling::*)" - pause: medium - test: @@ -615,7 +622,7 @@ else: - set_variables: [NavNode: "preceding-sibling::*[1]/*[1]/@id"] else: - - t: "沒有上一欄" # phrase('no previous column' in the table) + - t: "沒有左一行" # phrase('no previous column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-next @@ -628,12 +635,12 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移動往右" # phrase('move right') + - t: "移至下一項" # phrase('move right') - pause: short - test: if: "$NavVerbosity != 'Terse'" then: - - t: "欄" # phrase(the first 'column' in the table) + - t: "行" # phrase(the first 'column' in the table) - x: "count(preceding-sibling::*)+2" - pause: medium - test: @@ -645,7 +652,7 @@ else: - set_variables: [NavNode: "following-sibling::*[1]/*[1]/@id"] else: - - t: "沒有下一欄" # phrase('no next column' in the table) + - t: "沒有右一行" # phrase('no next column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-up @@ -661,7 +668,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'" @@ -669,7 +676,7 @@ - t: "列" # phrase(the previous 'row' in the table) - x: "count(../preceding-sibling::*)" - pause: short - - t: "欄" # phrase(the previous 'column' in the table) + - t: "行" # phrase(the previous 'column' in the table) - x: "count(preceding-sibling::*)+1" - pause: medium - test: @@ -681,7 +688,7 @@ else: - set_variables: [NavNode: "../preceding-sibling::*[1]/*[$Column]/*[1]/@id"] else: - - t: "沒有前一列" # phrase('no previous row' in the table) + - t: "沒有上一列" # phrase('no previous row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-down @@ -697,7 +704,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'" @@ -705,7 +712,7 @@ - t: "列" # phrase(the next 'row' in the table) - x: "count(../preceding-sibling::*)+2" - pause: short - - t: "欄" # phrase(the next 'column' in the table) + - t: "行" # phrase(the next 'column' in the table) - x: "count(preceding-sibling::*)+1" - pause: medium - test: @@ -727,7 +734,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移到前一列" # phrase('move to previous row' to the previous row in the table) + - t: "移至上一列" # phrase('move to previous row' to the previous row in the table) - pause: medium - test: if: "preceding-sibling::*" @@ -741,7 +748,7 @@ else: - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] else: - - t: "沒有前一列" # phrase('no previous row' in the table) + - t: "沒有上一列" # phrase('no previous row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-down @@ -751,7 +758,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移到下一列" # phrase('move to next row' to the next row in the table) + - t: "移至下一列" # phrase('move to next row' to the next row in the table) - pause: medium - test: if: "following-sibling::*" @@ -776,9 +783,9 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移到前一欄" # phrase('move to previous column' to the previous row in the table) + - t: "移至左一行" # phrase('move to previous column' to the previous row in the table) - pause: medium - - t: "沒有前一欄" # phrase('no previous column' in the table) + - t: "沒有左一行" # phrase('no previous column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-next @@ -789,9 +796,9 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移到下一欄" # phrase('move to next column' to the next row in the table) + - t: "移至右一行" # phrase('move to next column' to the next row in the table) - pause: medium - - t: "沒有下一欄" # phrase('no next column' in the table) + - t: "沒有右一行" # phrase('no next column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: default-read-cell @@ -807,7 +814,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'" @@ -815,12 +822,12 @@ - t: "列" # phrase(the previous 'row' in the table) - x: "count($MTD[1]/../preceding-sibling::*)+1" - pause: short - - t: "欄" # phrase(the previous 'column' in the table) + - t: "行" # phrase(the previous 'column' in the table) - x: "count($MTD[1]/preceding-sibling::*)+1" - pause: short - set_variables: [NavNode: "$MTD[1]/*[1]/@id"] else: - - t: "not in table" # phrase('not in table' or matrix) + - t: "不在表格內" # phrase('not in table' or matrix) - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1060,7 +1067,7 @@ then: - x: "ancestor::m:mtd[1]" # try again on an mtd node else: - - t: "不在表內" # phrase('not in table' or matrix) + - t: "不在表格內" # phrase('not in table' or matrix) - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1082,7 +1089,7 @@ then: [x: "$Following"] else: - with: - variables: [Move2D: "'放大'", Child2D: "$Following"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "$Following"] # phrase('in' the denominator) replace: [x: ".."] - with: variables: [NavCommand: "'MoveNextZoom'"] @@ -1104,7 +1111,7 @@ then: [x: "$Preceding"] else: - with: - variables: [Move2D: "'放大'", Child2D: "$Preceding"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "$Preceding"] # phrase('in' the denominator) replace: [x: ".."] - with: variables: [NavCommand: "'MovePreviousZoom'"] @@ -1137,7 +1144,7 @@ - test: if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - t: "不能移動往右" # phrase('cannot move right') + - t: "不能移至下一項" # phrase('cannot move right') - pause: medium - with: variables: @@ -1161,7 +1168,7 @@ - t: "不能" # phrase('cannot' move right in expression) - test: - if: "$NavCommand = 'MoveNext'" - then: [t: "移到"] # phrase('move' to next entry in table) + 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) @@ -1190,11 +1197,11 @@ if: "following-sibling::*" then: - with: - variables: [Move2D: "'放大'", Child2D: "."] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "."] # phrase('in' the denominator) replace: [x: ".."] else: - with: - variables: [Move2D: "'縮小'", Child2D: "."] + variables: [Move2D: "'退出'", Child2D: "."] replace: [x: ".."] - x: ".." @@ -1212,7 +1219,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "欄" # phrase(the previous 'column' in the table) + - t: "行" # phrase(the previous 'column' in the table) - x: "count(preceding-sibling::*)+2" - pause: short - test: @@ -1275,12 +1282,12 @@ if: "preceding-sibling::* and following-sibling::*[1][name(.)='none']" then: - with: - variables: [Move2D: "'縮小'", Child2D: "."] + variables: [Move2D: "'退出'", Child2D: "."] replace: [x: ".."] - x: "following-sibling::*[1]" else: - with: - variables: [Move2D: "'放大'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - with: variables: [NavCommand: "'MoveNextZoom'"] @@ -1301,7 +1308,7 @@ if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))" then: - with: - variables: [Move2D: "'放大'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - set_variables: [NavNode: "following-sibling::*[1]/@id"] @@ -1332,7 +1339,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: @@ -1362,7 +1369,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: "."] @@ -1389,11 +1396,11 @@ if: "preceding-sibling::*" then: - with: - variables: [Move2D: "'放大'", Child2D: "."] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "."] # phrase('in' the denominator) replace: [x: ".."] else: - with: - variables: [Move2D: "'縮小'", Child2D: "."] + variables: [Move2D: "'退出'", Child2D: "."] replace: [x: ".."] - x: ".." @@ -1419,7 +1426,7 @@ if: "not(parent::m:mrow)" then: - with: - variables: [Move2D: "'放大'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - set_variables: [NavNode: "preceding-sibling::*[1]/*[2]/@id"] @@ -1437,7 +1444,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "欄" # phrase(the first 'column' in the table) + - t: "行" # phrase(the first 'column' in the table) - x: "count(preceding-sibling::*)" - pause: short - test: @@ -1483,12 +1490,12 @@ if: "count(preceding-sibling::*) > 2 and preceding-sibling::*[1][name(.)='none']" then: - with: - variables: [Move2D: "'縮小'", Child2D: "."] + variables: [Move2D: "'退出'", Child2D: "."] replace: [x: ".."] - x: "preceding-sibling::*[1]" # skip over 'none' else: - with: - variables: [Move2D: "'放大'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - with: variables: [NavCommand: "'MovePreviousZoom'"] @@ -1509,7 +1516,7 @@ if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))" then: - with: - variables: [Move2D: "'放大'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) + variables: [Move2D: "'進入'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) replace: [x: ".."] - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] @@ -1573,11 +1580,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'"] @@ -1614,7 +1621,7 @@ - else_if: "starts-with($NavCommand, 'Describe')" then: [t: "描述"] # phrase('describe' next entry in table) - else_if: "starts-with($NavCommand, 'MoveTo')" - then: [t: "移到"] # phrase('move to' the next entry in table) + then: [t: "移至"] # phrase('move to' 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" @@ -1660,11 +1667,11 @@ - test: if: "$NavCommand = 'WhereAmI'" then: - - t: "inside of nothing more" # phrase('inside of nothing more') + - t: "已是最上層" # phrase('inside of nothing more') - pause: long - set_variables: [SpeakExpression: "'false'"] else: - - t: "inside" # phrase('inside' a big expression) + - t: "上一層是" # phrase('inside' a big expression) - pause: medium - set_variables: [NavNode: "@id"] @@ -1672,7 +1679,7 @@ tag: "*" match: "$NavCommand = 'WhereAmI' or $NavCommand = 'WhereAmIAll'" replace: - - t: "inside" # phrase('inside' a big expression) + - t: "上一層是" # phrase('inside' a big expression) - pause: medium - test: - if: "$NavMode='Enhanced' and parent::*[self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" From 6c9c7091bf3e8dc0b97aa178dc13d5bc09c1a79c Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Mon, 25 May 2026 12:04:53 +0800 Subject: [PATCH 3/8] update unicode-full.yaml --- Rules/Languages/zh/tw/navigate.yaml | 196 ++++++++++++------------ Rules/Languages/zh/tw/unicode-full.yaml | 138 ++++++++--------- 2 files changed, 167 insertions(+), 167 deletions(-) diff --git a/Rules/Languages/zh/tw/navigate.yaml b/Rules/Languages/zh/tw/navigate.yaml index 803c462a7..bdef1249c 100644 --- a/Rules/Languages/zh/tw/navigate.yaml +++ b/Rules/Languages/zh/tw/navigate.yaml @@ -48,9 +48,9 @@ - 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')" @@ -67,31 +67,31 @@ - x: "$Prefix" - test: - if: "substring($NavCommand, 5) = 'In'" - then: [t: "放大"] # phrase(zoom 'in' to see more details) + then: [T: "放大"] # phrase(zoom 'in' to see more details) - else_if: "substring($NavCommand, 5) = '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, 5) = 'Out'" - then: [t: "縮小"] # phrase(zoom 'out' to see more details) + then: [T: "縮小"] # phrase(zoom 'out' to see more details) - else_if: "substring($NavCommand, 5) = '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, 5) = 'Next'" # string-length($Prefix)+1 ###fix by hjy - then: [t: "下一項"] # phrase(move to the 'right') + then: [T: "下一項"] # phrase(move to the 'right') - else_if: "substring($NavCommand, 9) = 'Next'" # string-length($Prefix)+1 ###fix by hjy for describe - then: [t: "下一項"] # phrase(move to the 'right') + then: [T: "下一項"] # phrase(move to the 'right') - else_if: "substring($NavCommand, 5) = 'Previous'" #string-length($Prefix)+1 ###fix by hjy - then: [t: "上一項"] # phrase(move to the 'left') + then: [T: "上一項"] # phrase(move to the 'left') - else_if: "substring($NavCommand, 9) = 'Previous'" #string-length($Prefix)+1 ###fix by hjy for describe - then: [t: "上一項"] # phrase(move to the 'left') + then: [T: "上一項"] # phrase(move to the 'left') - else_if: "substring($NavCommand, 5) = 'Current'" - then: [t: "目前"] # phrase(who is the 'current' president) + then: [T: "目前"] # phrase(who is the 'current' president) - else_if: "substring($NavCommand, 9) = 'Current'" - then: [t: "目前"] # phrase(who is the 'current' president) + then: [T: "目前"] # phrase(who is the 'current' president) - else_if: "substring($NavCommand, 5) = 'LineStart'" - then: [t: "到行首"] # phrase(move 'to start of line') + then: [T: "到行首"] # phrase(move 'to start of line') - else_if: "substring($NavCommand, 5) = 'LineEnd'" - then: [t: "到行尾"] # phrase(move 'to end of line') + then: [T: "到行尾"] # phrase(move 'to end of line') - pause: "medium" - set_variables: [MatchCounter: "$MatchCounter + 1"] @@ -106,7 +106,7 @@ tag: [mtr, mlabeledtr] match: "$Move2D = '進入'" replace: - - t: "行" + - T: "行" - x: "count($Child2D/preceding-sibling::*)+1" - pause: "medium" @@ -124,18 +124,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: "前下標"] # phrase(x with 'subscript' 2) - else: [t: "前上標"] # 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: "上標"] # phrase(x with 'pre-superscript' 2) - else: [t: "下標"] # phrase(x with 'pre-subscript' 2) + then: [T: "上標"] # phrase(x with 'pre-superscript' 2) + else: [T: "下標"] # phrase(x with 'pre-subscript' 2) - pause: "medium" # Rules for speaking what happens when moving into or out of a notation @@ -159,9 +159,9 @@ if: "$NavVerbosity = 'Verbose'" then: [x: "translate(name(.), '-_', ' ')"] # e.g., "in absolute value" else: - - t: "第" # phrase(the 'part' of the expression) + - T: "第" # phrase(the 'part' of the expression) - x: "count($Child2D/preceding-sibling::*) + 1" - - t: "部分" # phrase(the 'part' of the expression) + - T: "部分" # phrase(the 'part' of the expression) - pause: "medium" - name: default-move @@ -183,19 +183,19 @@ then: - test: - if: "$PreviousNavCommand = 'ZoomIn'" - then: [t: "復原放大"] # 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') + then: [T: "沒有前一指令"] # phrase('no previous command') - pause: "medium" - set_variables: [NavNode: "@id"] @@ -218,7 +218,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: @@ -509,12 +509,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'" @@ -554,8 +554,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'" @@ -591,7 +591,7 @@ - "$NavCommand='MoveColumnStart' or $NavCommand='MoveColumnEnd' or" - "$NavCommand='ReadCellCurrent'" replace: - - t: "不在表格內" # phrase('not in table') + - T: "不在表格內" # phrase('not in table') - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -605,12 +605,12 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移至上一項" # phrase('move left') + - T: "移至上一項" # phrase('move left') - pause: short - test: if: "$NavVerbosity != 'Terse'" then: - - t: "行" # phrase(the first 'column' of the table) + - T: "行" # phrase(the first 'column' of the table) - x: "count(preceding-sibling::*)" - pause: medium - test: @@ -622,7 +622,7 @@ else: - set_variables: [NavNode: "preceding-sibling::*[1]/*[1]/@id"] else: - - t: "沒有左一行" # phrase('no previous column' in the table) + - T: "沒有左一行" # phrase('no previous column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-next @@ -635,12 +635,12 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移至下一項" # phrase('move right') + - T: "移至下一項" # phrase('move right') - pause: short - test: if: "$NavVerbosity != 'Terse'" then: - - t: "行" # phrase(the first 'column' in the table) + - T: "行" # phrase(the first 'column' in the table) - x: "count(preceding-sibling::*)+2" - pause: medium - test: @@ -652,7 +652,7 @@ else: - set_variables: [NavNode: "following-sibling::*[1]/*[1]/@id"] else: - - t: "沒有右一行" # phrase('no next column' in the table) + - T: "沒有右一行" # phrase('no next column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-up @@ -668,15 +668,15 @@ - 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'" then: - - t: "列" # phrase(the previous 'row' in the table) + - T: "列" # phrase(the previous 'row' in the table) - x: "count(../preceding-sibling::*)" - pause: short - - t: "行" # phrase(the previous 'column' in the table) + - T: "行" # phrase(the previous 'column' in the table) - x: "count(preceding-sibling::*)+1" - pause: medium - test: @@ -688,7 +688,7 @@ else: - set_variables: [NavNode: "../preceding-sibling::*[1]/*[$Column]/*[1]/@id"] else: - - t: "沒有上一列" # phrase('no previous row' in the table) + - T: "沒有上一列" # phrase('no previous row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-down @@ -704,15 +704,15 @@ - 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'" then: - - t: "列" # phrase(the next 'row' in the table) + - T: "列" # phrase(the next 'row' in the table) - x: "count(../preceding-sibling::*)+2" - pause: short - - t: "行" # phrase(the next 'column' in the table) + - T: "行" # phrase(the next 'column' in the table) - x: "count(preceding-sibling::*)+1" - pause: medium - test: @@ -724,7 +724,7 @@ else: - set_variables: [NavNode: "../following-sibling::*[1]/*[$Column]/*[1]/@id"] else: - - t: "沒有下一列" # phrase('no next row' in the table) + - T: "沒有下一列" # phrase('no next row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-up @@ -734,7 +734,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移至上一列" # phrase('move to previous row' to the previous row in the table) + - T: "移至上一列" # phrase('move to previous row' to the previous row in the table) - pause: medium - test: if: "preceding-sibling::*" @@ -748,7 +748,7 @@ else: - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] else: - - t: "沒有上一列" # phrase('no previous row' in the table) + - T: "沒有上一列" # phrase('no previous row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-down @@ -758,7 +758,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移至下一列" # phrase('move to next row' to the next row in the table) + - T: "移至下一列" # phrase('move to next row' to the next row in the table) - pause: medium - test: if: "following-sibling::*" @@ -772,7 +772,7 @@ else: - set_variables: [NavNode: "following-sibling::*[1]/@id"] else: - - t: "沒有下一列" # phrase('no next row' in the table) + - T: "沒有下一列" # phrase('no next row' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-previous @@ -783,9 +783,9 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移至左一行" # phrase('move to previous column' to the previous row in the table) + - T: "移至左一行" # phrase('move to previous column' to the previous row in the table) - pause: medium - - t: "沒有左一行" # phrase('no previous column' in the table) + - T: "沒有左一行" # phrase('no previous column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: move-cell-next @@ -796,9 +796,9 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "移至右一行" # phrase('move to next column' to the next row in the table) + - T: "移至右一行" # phrase('move to next column' to the next row in the table) - pause: medium - - t: "沒有右一行" # phrase('no next column' in the table) + - T: "沒有右一行" # phrase('no next column' in the table) - set_variables: [SpeakExpression: "'false'"] - name: default-read-cell @@ -814,20 +814,20 @@ - 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'" then: - - t: "列" # phrase(the previous 'row' in the table) + - T: "列" # phrase(the previous 'row' in the table) - x: "count($MTD[1]/../preceding-sibling::*)+1" - pause: short - - t: "行" # phrase(the previous 'column' in the table) + - T: "行" # phrase(the previous 'column' in the table) - x: "count($MTD[1]/preceding-sibling::*)+1" - pause: short - set_variables: [NavNode: "$MTD[1]/*[1]/@id"] else: - - t: "不在表格內" # phrase('not in table' or matrix) + - T: "不在表格內" # phrase('not in table' or matrix) - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1067,7 +1067,7 @@ then: - x: "ancestor::m:mtd[1]" # try again on an mtd node else: - - t: "不在表格內" # phrase('not in table' or matrix) + - T: "不在表格內" # phrase('not in table' or matrix) - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1144,7 +1144,7 @@ - test: if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - t: "不能移至下一項" # phrase('cannot move right') + - T: "不能移至下一項" # phrase('cannot move right') - pause: medium - with: variables: @@ -1165,16 +1165,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) + 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'"] @@ -1219,7 +1219,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "行" # phrase(the previous 'column' in the table) + - T: "行" # phrase(the previous 'column' in the table) - x: "count(preceding-sibling::*)+2" - pause: short - test: @@ -1339,7 +1339,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: @@ -1356,7 +1356,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'"] @@ -1369,7 +1369,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: "."] @@ -1444,7 +1444,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - t: "行" # phrase(the first 'column' in the table) + - T: "行" # phrase(the first 'column' in the table) - x: "count(preceding-sibling::*)" - pause: short - test: @@ -1530,16 +1530,16 @@ - 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: - - t: "簡易" # phrase(a 'simple' way to do something) + - T: "簡易" # phrase(a 'simple' way to do something) - set_variables: [NavMode: "'Simple'", ReadZoomLevel: "1"] - else: - - t: "增強" # phrase(an 'enhanced' way to do something) + - T: "增強" # phrase(an 'enhanced' way to do something) - set_variables: [NavMode: "'Enhanced'", ReadZoomLevel: "-1"] - - t: "模式" # phrase(a simple 'mode' of use) + - T: "模式" # phrase(a simple 'mode' of use) - pause: long - test: - if: "$NavMode != 'Enhanced'" # potentially need to zoom to the sibling @@ -1555,16 +1555,16 @@ - test: - if: "$NavMode = 'Enhanced'" then: - - t: "簡易" # phrase(a 'simple' way to do something) + - T: "簡易" # phrase(a 'simple' way to do something) - set_variables: [NavMode: "'Simple'", ReadZoomLevel: "1"] - else_if: "$NavMode = 'Character'" then: - - t: "增強" # phrase(an 'enhanced' way to do something) + - 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) + - T: "模式" # phrase(a simple 'mode' of use) - pause: long - test: - if: "$NavMode != 'Enhanced'" # potentially need to zoom to the sibling @@ -1580,11 +1580,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'"] @@ -1597,9 +1597,9 @@ then: - test: - if: "$NavCommand = 'ReadCurrent'" - then: [t: "讀出"] # phrase('read' next entry in table) - else: [t: "描述"] # phrase('describe' next entry in table) - - t: "當前" # phrase('current' entry in table) + then: [T: "讀出"] # phrase('read' next entry in table) + else: [T: "描述"] # phrase('describe' next entry in table) + - T: "當前" # phrase('current' entry in table) - pause: long - set_variables: [NavNode: "@id"] @@ -1617,13 +1617,13 @@ then: - test: - if: "starts-with($NavCommand, 'Read')" - then: [t: "讀出"] # phrase('read' next entry in table) + 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) - - t: "佔位符" # phrase('placeholder' for the value) + then: [T: "移至"] # phrase('move to' 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 - set_variables: [NavNode: "$PlaceMarker"] @@ -1635,7 +1635,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"] @@ -1667,11 +1667,11 @@ - test: if: "$NavCommand = 'WhereAmI'" then: - - t: "已是最上層" # phrase('inside of nothing more') + - T: "已是最上層" # phrase('inside of nothing more') - pause: long - set_variables: [SpeakExpression: "'false'"] else: - - t: "上一層是" # phrase('inside' a big expression) + - T: "上一層是" # phrase('inside' a big expression) - pause: medium - set_variables: [NavNode: "@id"] @@ -1679,7 +1679,7 @@ tag: "*" match: "$NavCommand = 'WhereAmI' or $NavCommand = 'WhereAmIAll'" replace: - - t: "上一層是" # phrase('inside' a big expression) + - T: "上一層是" # phrase('inside' a big expression) - pause: medium - test: - if: "$NavMode='Enhanced' and parent::*[self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" diff --git a/Rules/Languages/zh/tw/unicode-full.yaml b/Rules/Languages/zh/tw/unicode-full.yaml index 7e930e016..9e4e85087 100644 --- a/Rules/Languages/zh/tw/unicode-full.yaml +++ b/Rules/Languages/zh/tw/unicode-full.yaml @@ -2446,116 +2446,116 @@ - "㊽": [T: "圈圈內48"] # 0x32bd (en: 'circled number forty eight', GPT-5.4 translation) - "㊾": [T: "圈圈內49"] # 0x32be (en: 'circled number forty nine', GPT-5.4 translation) - "㊿": [T: "圈圈內50"] # 0x32bf (en: 'circled number fifty', GPT-5.4 translation) - - "㋌": [T: "汞"] # 0x32cc (en: 'mercury', google translation) - - "㋍": [t: "ergs"] # 0x32cd (google translation) + - "㋌": [T: "汞柱"] # 0x32cc (en: 'mercury', google translation) + - "㋍": [T: "耳格"] # 0x32cd (google translation) - "㋎": [T: "電子伏特"] # 0x32ce (en: 'electron volts', google translation) - "㋏": [T: "有限責任標誌"] # 0x32cf (en: 'limited liability sign', google translation) - - "㍱": [t: "海毛"] # 0x3371 (en: 'hectopascals', google translation) - - "㍲": [t: "達爾頓"] # 0x3372 (en: 'daltons', google translation) + - "㍱": [T: "百帕"] # 0x3371 (en: 'hectopascals', google translation) + - "㍲": [T: "道爾頓"] # 0x3372 (en: 'daltons', google translation) - "㍳": [T: "天文單位"] # 0x3373 (en: 'astronomical units', google translation) - - "㍴": [t: "酒吧"] # 0x3374 (en: 'bars', google translation) + - "㍴": [T: "巴"] # 0x3374 (en: 'bars', google translation) - "㍵": [t: "o v"] # 0x3375 (google translation) - - "㍶": [t: "parsecs"] # 0x3376 (google translation) - - "㍷": [T: "公寸"] # 0x3377 (en: 'decimeters', google translation) - - "㍸": [T: "公寸平方"] # 0x3378 (en: 'decimeters squared', google translation) - - "㍹": [T: "公寸立方"] # 0x3379 (en: 'decimeters cubed', google translation) + - "㍶": [T: "秒差距"] # 0x3376 (google translation) + - "㍷": [T: "分米"] # 0x3377 (en: 'decimeters', google translation) + - "㍸": [T: "平方分米"] # 0x3378 (en: 'decimeters squared', google translation) + - "㍹": [T: "立方分米"] # 0x3379 (en: 'decimeters cubed', google translation) - "㍺": [t: "樂器單元"] # 0x337a (en: 'instrumental units', google translation) - - "㎀": [t: "picoamps"] # 0x3380 (google translation) - - "㎁": [t: "nanoamps"] # 0x3381 (en: 'nanoamps', google translation) - - "㎂": [t: "microamps"] # 0x3382 (en: 'microamps', google translation) - - "㎃": [t: "milliamps"] # 0x3383 (en: 'milliamps', google translation) - - "㎄": [T: "kiloamps"] # 0x3384 (en: 'kiloamps', google translation) - - "㎅": [T: "千位元組"] # 0x3385 (en: 'kilobytes', google translation) - - "㎆": [T: "百萬位元組"] # 0x3386 (en: 'megabytes', google translation) - - "㎇": [T: "十億位元組"] # 0x3387 (en: 'gigabytes', google translation) - - "㎈": [T: "卡路里"] # 0x3388 (en: 'calories', google translation) - - "㎉": [T: "千卡"] # 0x3389 (en: 'kilocalories', google translation) - - "㎊": [t: "picofarads"] # 0x338a (google translation) - - "㎋": [t: "nanofarads"] # 0x338b (en: 'nanofarads', google translation) - - "㎌": [t: "microfarads"] # 0x338c (en: 'microfarads', google translation) + - "㎀": [t: "皮安培"] # 0x3380 (google translation) + - "㎁": [t: "奈安培"] # 0x3381 (en: 'nanoamps', google translation) + - "㎂": [t: "微安培"] # 0x3382 (en: 'microamps', google translation) + - "㎃": [t: "毫安培"] # 0x3383 (en: 'milliamps', google translation) + - "㎄": [T: "千安培"] # 0x3384 (en: 'kiloamps', google translation) + - "㎅": [T: "KB"] # 0x3385 (en: 'kilobytes', google translation) + - "㎆": [T: "MB"] # 0x3386 (en: 'megabytes', google translation) + - "㎇": [T: "GB"] # 0x3387 (en: 'gigabytes', google translation) + - "㎈": [T: "卡"] # 0x3388 (en: 'calories', google translation) + - "㎉": [T: "大卡"] # 0x3389 (en: 'kilocalories', google translation) + - "㎊": [t: "皮法拉"] # 0x338a (google translation) + - "㎋": [t: "奈法拉"] # 0x338b (en: 'nanofarads', google translation) + - "㎌": [t: "微法拉"] # 0x338c (en: 'microfarads', google translation) - "㎍": [T: "微克"] # 0x338d (en: 'micrograms', google translation) - "㎎": [T: "毫克"] # 0x338e (en: 'milligrams', google translation) - "㎏": [T: "公斤"] # 0x338f (en: 'kilograms', google translation) - "㎐": [T: "赫茲"] # 0x3390 (en: 'hertz', google translation) - "㎑": [T: "千赫"] # 0x3391 (en: 'kilohertz', google translation) - "㎒": [T: "百萬赫"] # 0x3392 (en: 'megahertz', google translation) - - "㎓": [T: "十億赫"] # 0x3393 (en: 'gigahertz', google translation) - - "㎔": [t: "terahertz"] # 0x3394 (google translation) + - "㎓": [T: "吉赫"] # 0x3393 (en: 'gigahertz', google translation) + - "㎔": [t: "兆赫"] # 0x3394 (google translation) - "㎕": [T: "微升"] # 0x3395 (en: 'microliters', google translation) - "㎖": [T: "毫升"] # 0x3396 (en: 'milliliters', google translation) - - "㎗": [t: "deciliters"] # 0x3397 (en: 'deciliters', google translation) - - "㎘": [T: "千升"] # 0x3398 (en: 'kiloliters', google translation) - - "㎙": [t: "femtometers"] # 0x3399 (google translation) + - "㎗": [t: "分升"] # 0x3397 (en: 'deciliters', google translation) + - "㎘": [T: "公秉"] # 0x3398 (en: 'kiloliters', google translation) + - "㎙": [t: "飛米"] # 0x3399 (google translation) - "㎚": [T: "奈米"] # 0x339a (en: 'nanometers', google translation) - "㎛": [T: "微米"] # 0x339b (en: 'micrometers', google translation) - "㎜": [T: "毫米"] # 0x339c (en: 'millimeters', google translation) - - "㎝": [T: "厘米"] # 0x339d (en: 'centimeters', google translation) + - "㎝": [T: "公分"] # 0x339d (en: 'centimeters', google translation) - "㎞": [T: "公里"] # 0x339e (en: 'kilometers', google translation) - - "㎟": [T: "毫米平方"] # 0x339f (en: 'millimeters squared', google translation) - - "㎠": [T: "厘米平方"] # 0x33a0 (en: 'centimeters squared', google translation) - - "㎡": [T: "米平方"] # 0x33a1 (en: 'meters squared', google translation) - - "㎢": [T: "公里平方"] # 0x33a2 (en: 'kilometers squared', google translation) - - "㎣": [T: "毫米立方"] # 0x33a3 (en: 'millimeters cubed', google translation) - - "㎤": [T: "厘米立方"] # 0x33a4 (en: 'centimeters cubed', google translation) - - "㎥": [T: "米立方"] # 0x33a5 (en: 'meters cubed', google translation) - - "㎦": [T: "公里立方"] # 0x33a6 (en: 'kilometers cubed', google translation) - - "㎧": [T: "每秒米"] # 0x33a7 (en: 'meters per second', google translation) - - "㎨": [T: "每秒平方米"] # 0x33a8 (en: 'meters per second squared', google translation) - - "㎩": [t: "pascals"] # 0x33a9 (en: 'pascals', google translation) - - "㎪": [t: "kilopascals"] # 0x33aa (google translation) - - "㎫": [t: "megapascals"] # 0x33ab (en: 'megapascals', google translation) - - "㎬": [t: "gigapascals"] # 0x33ac (google translation) + - "㎟": [T: "平方毫米"] # 0x339f (en: 'millimeters squared', google translation) + - "㎠": [T: "平方公分"] # 0x33a0 (en: 'centimeters squared', google translation) + - "㎡": [T: "平方公尺"] # 0x33a1 (en: 'meters squared', google translation) + - "㎢": [T: "平方公里"] # 0x33a2 (en: 'kilometers squared', google translation) + - "㎣": [T: "立方毫米"] # 0x33a3 (en: 'millimeters cubed', google translation) + - "㎤": [T: "立方公分"] # 0x33a4 (en: 'centimeters cubed', google translation) + - "㎥": [T: "立方公尺"] # 0x33a5 (en: 'meters cubed', google translation) + - "㎦": [T: "立方公里"] # 0x33a6 (en: 'kilometers cubed', google translation) + - "㎧": [T: "公尺/秒"] # 0x33a7 (en: 'meters per second', google translation) + - "㎨": [T: "公尺/平方秒"] # 0x33a8 (en: 'meters per second squared', google translation) + - "㎩": [t: "帕"] # 0x33a9 (en: 'pascals', google translation) + - "㎪": [t: "千帕"] # 0x33aa (google translation) + - "㎫": [t: "百萬帕"] # 0x33ab (en: 'megapascals', google translation) + - "㎬": [t: "吉帕"] # 0x33ac (google translation) - "㎭": [T: "弳"] # 0x33ad (en: 'rads', google translation) - - "㎮": [T: "每秒弳"] # 0x33ae (en: 'rads per second', google translation) - - "㎯": [T: "每秒平方弳"] # 0x33af (en: 'rads per second squared', google translation) - - "㎰": [t: "picseconds"] # 0x33b0 (en: 'picoseconds', google translation) - - "㎱": [t: "nanoseconds"] # 0x33b1 (en: 'nanoseconds', google translation) + - "㎮": [T: "弳/秒"] # 0x33ae (en: 'rads per second', google translation) + - "㎯": [T: "弳/平方秒"] # 0x33af (en: 'rads per second squared', google translation) + - "㎰": [t: "皮秒"] # 0x33b0 (en: 'picoseconds', google translation) + - "㎱": [t: "奈秒"] # 0x33b1 (en: 'nanoseconds', google translation) - "㎲": [T: "微秒"] # 0x33b2 (en: 'microseconds', google translation) - "㎳": [T: "毫秒"] # 0x33b3 (en: 'milliseconds', google translation) - - "㎴": [t: "picovolts"] # 0x33b4 (google translation) - - "㎵": [t: "nanovolts"] # 0x33b5 (en: 'nanovolts', google translation) + - "㎴": [t: "皮伏特"] # 0x33b4 (google translation) + - "㎵": [t: "奈伏特"] # 0x33b5 (en: 'nanovolts', google translation) - "㎶": [T: "微伏特"] # 0x33b6 (en: 'microvolts', google translation) - "㎷": [T: "毫伏特"] # 0x33b7 (en: 'millivolts', google translation) - "㎸": [T: "千伏特"] # 0x33b8 (en: 'kilovolts', google translation) - - "㎹": [t: "megavolts"] # 0x33b9 (google translation) - - "㎺": [t: "picowatts"] # 0x33ba (google translation) - - "㎻": [t: "nanowatts"] # 0x33bb (en: 'nanowatts', google translation) - - "㎼": [t: "microwatts"] # 0x33bc (google translation) + - "㎹": [t: "百萬伏特"] # 0x33b9 (google translation) + - "㎺": [t: "皮瓦"] # 0x33ba (google translation) + - "㎻": [t: "奈瓦"] # 0x33bb (en: 'nanowatts', google translation) + - "㎼": [t: "微瓦"] # 0x33bc (google translation) - "㎽": [T: "毫瓦"] # 0x33bd (en: 'milliwatts', google translation) - "㎾": [T: "千瓦"] # 0x33be (en: 'kilowatts', google translation) - "㎿": [T: "百萬瓦"] # 0x33bf (en: 'megawatts', google translation) - "㏀": [T: "千歐姆"] # 0x33c0 (en: 'kilo-ohms', google translation) - "㏁": [T: "百萬歐姆"] # 0x33c1 (google translation) - "㏂": [t: "attometers"] # 0x33c2 (google translation) - - "㏃": [t: "becquerels"] # 0x33c3 (en: 'becquerels', google translation) + - "㏃": [t: "貝克"] # 0x33c3 (en: 'becquerels', google translation) - "㏄": [T: "cc"] # 0x33c4 (en: 'cubic centimeters', google translation) - - "㏅": [t: "candelas"] # 0x33c5 (en: 'candelas', google translation) - - "㏆": [t: "coulombs per kilogram"] # 0x33c6 (en: 'coulombs per kilogram', google translation) + - "㏅": [t: "燭光"] # 0x33c5 (en: 'candelas', google translation) + - "㏆": [t: "庫侖/公斤"] # 0x33c6 (en: 'coulombs per kilogram', google translation) - "㏇": [t: "cardiac output"] # 0x33c7 (en: 'cardiac output', google translation) - "㏈": [T: "分貝"] # 0x33c8 (en: 'decibels', google translation) - - "㏉": [t: "grays"] # 0x33c9 (en: 'grays', google translation) - - "㏊": [t: "hectares"] # 0x33ca (en: 'hectares', google translation) + - "㏉": [t: "戈雷"] # 0x33c9 (en: 'grays', google translation) + - "㏊": [t: "公頃"] # 0x33ca (en: 'hectares', google translation) - "㏋": [T: "馬力"] # 0x33cb (en: 'horsepower', google translation) - "㏌": [T: "英寸"] # 0x33cc (en: 'inches', google translation) - "㏍": [t: "kilokelvins"] # 0x33cd (google translation) - "㏎": [T: "公里"] # 0x33ce (en: 'kilometers', google translation) - - "㏏": [t: "結"] # 0x33cf (en: 'knots', google translation) + - "㏏": [t: "節"] # 0x33cf (en: 'knots', google translation) - "㏐": [T: "流明"] # 0x33d0 (en: 'lumens', google translation) - "㏑": [T: "自然對數"] # 0x33d1 (en: 'natural log', google translation) - "㏒": [T: "對數"] # 0x33d2 (en: 'logarithm', google translation) - "㏓": [t: "勒克斯"] # 0x33d3 (en: 'lux', google translation) - - "㏔": [t: "millibarns"] # 0x33d4 (google translation) - - "㏕": [t: "mills"] # 0x33d5 (en: 'mills', google translation) - - "㏖": [t: "moles"] # 0x33d6 (en: 'moles', google translation) - - "㏗": [T: "p h"] # 0x33d7 (google translation) + - "㏔": [t: "毫邦"] # 0x33d4 (google translation) + - "㏕": [t: "密耳"] # 0x33d5 (en: 'mills', google translation) + - "㏖": [t: "莫耳"] # 0x33d6 (en: 'moles', google translation) + - "㏗": [T: "pH"] # 0x33d7 (google translation) - "㏘": [t: "picometers"] # 0x33d8 (en: 'picometers', google translation) - - "㏙": [T: "p p m"] # 0x33d9 (en: 'parts per million', google translation) - - "㏚": [t: "petaroentgens"] # 0x33da (google translation) - - "㏛": [t: "steradians"] # 0x33db (en: 'steradians', google translation) - - "㏜": [t: "sieverts"] # 0x33dc (google translation) - - "㏝": [t: "webers"] # 0x33dd (en: 'webers', google translation) - - "㏞": [T: "每米伏"] # 0x33de (en: 'volts per meter', google translation) - - "㏟": [T: "每米安"] # 0x33df (en: 'amps per meter', google translation) + - "㏙": [T: "PPM"] # 0x33d9 (en: 'parts per million', google translation) + - "㏚": [t: "拍侖琴"] # 0x33da (google translation) + - "㏛": [t: "立弳"] # 0x33db (en: 'steradians', google translation) + - "㏜": [t: "西弗"] # 0x33dc (google translation) + - "㏝": [t: "韋伯"] # 0x33dd (en: 'webers', google translation) + - "㏞": [T: "伏特/公尺"] # 0x33de (en: 'volts per meter', google translation) + - "㏟": [T: "安培/公尺"] # 0x33df (en: 'amps per meter', google translation) - "㏿": [T: "加侖"] # 0x33ff (en: 'gallons', google translation) - "": [t: "等於下面的帽子"] # 0xe900 (en: 'equals with hat below', google translation) - "": [t: "等於上面"] # 0xe901 (en: 'equals with plus above', google translation) From b8a6372a4ed9434003a0f50057c784c9741666e4 Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Mon, 25 May 2026 15:11:06 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=8D=80=E5=88=86=E5=AE=8C=E5=85=A8/?= =?UTF-8?q?=E5=B7=B2=E5=AE=8C=E5=85=A8=E6=94=BE=E5=A4=A7/=E7=B8=AE?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rules/Languages/zh/tw/navigate.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rules/Languages/zh/tw/navigate.yaml b/Rules/Languages/zh/tw/navigate.yaml index bdef1249c..96c58f3ad 100644 --- a/Rules/Languages/zh/tw/navigate.yaml +++ b/Rules/Languages/zh/tw/navigate.yaml @@ -48,9 +48,9 @@ - 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')" @@ -218,7 +218,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: From 78c0c95b3133a387d34defb6cebdbe4a3a136e02 Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Wed, 27 May 2026 16:03:29 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E7=A7=BB=E8=87=B3->=E7=A7=BB=E5=88=B0,=20?= =?UTF-8?q?=E8=A1=A8->=E8=A1=A8=E6=A0=BC,=20=E6=95=B8=E5=AD=B8=E5=BC=8F->?= =?UTF-8?q?=E6=95=B8=E5=AD=B8,=20=E9=80=80=E5=87=BA->=E9=9B=A2=E9=96=8B,?= =?UTF-8?q?=20=E4=B8=8D=E8=83=BD->=E7=84=A1=E6=B3=95,=20=E7=95=B6=E5=89=8D?= =?UTF-8?q?->=E7=9B=AE=E5=89=8D=E3=80=82=20overview=20line=2047,=20SimpleS?= =?UTF-8?q?peak=5FRules.yaml=20line=2039,=20"=E6=A0=B9=E8=99=9F"->""?= =?UTF-8?q?=E3=80=82mroot.rs=20=E5=B0=8D=E6=87=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Languages/zh/tw/SharedRules/default.yaml | 2 +- Rules/Languages/zh/tw/SimpleSpeak_Rules.yaml | 2 +- Rules/Languages/zh/tw/definitions.yaml | 4 +- Rules/Languages/zh/tw/navigate.yaml | 66 +++++++++---------- Rules/Languages/zh/tw/overview.yaml | 4 +- tests/Languages/zh/tw/SimpleSpeak/mroot.rs | 10 +-- 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Rules/Languages/zh/tw/SharedRules/default.yaml b/Rules/Languages/zh/tw/SharedRules/default.yaml index 36c8e777b..114b0ed63 100644 --- a/Rules/Languages/zh/tw/SharedRules/default.yaml +++ b/Rules/Languages/zh/tw/SharedRules/default.yaml @@ -406,7 +406,7 @@ - NumColumns: "count(*[1]/*) - IfThenElse(*/self::m:mlabeledtr, 1, 0)" match: "." replace: - - T: "表" # phrase(the 'table with' 3 rows) + - T: "表格有" # phrase(the 'table with' 3 rows) - x: count(*) - test: if: count(*)=1 diff --git a/Rules/Languages/zh/tw/SimpleSpeak_Rules.yaml b/Rules/Languages/zh/tw/SimpleSpeak_Rules.yaml index 10a487480..7877cb2e3 100644 --- a/Rules/Languages/zh/tw/SimpleSpeak_Rules.yaml +++ b/Rules/Languages/zh/tw/SimpleSpeak_Rules.yaml @@ -36,7 +36,7 @@ tag: root match: "." replace: - - T: "根號" + - T: "" - x: "*[1]" - test: if: "$Verbosity!='Terse'" diff --git a/Rules/Languages/zh/tw/definitions.yaml b/Rules/Languages/zh/tw/definitions.yaml index d5f1b8a28..fa5c39428 100644 --- a/Rules/Languages/zh/tw/definitions.yaml +++ b/Rules/Languages/zh/tw/definitions.yaml @@ -69,7 +69,7 @@ # words for moving into and out of one of the parts (e.g., "move right 'out of' numerator, 'in' denominator") # it's a hack to put them here, but at least they are grouped with the other navigation parts "in": "進入", - "out": "退出", + "out": "離開", } @@ -90,7 +90,7 @@ "g": "克", "m": "米", # British spelling works for US also "mol": "莫耳", - "s": "秒", "″": "秒", "\"": "秒", "sec": "秒", # "sec" not actually legal + "s": "秒", "sec": "秒", # "sec" not actually legal # derived units "Bq": "貝克", diff --git a/Rules/Languages/zh/tw/navigate.yaml b/Rules/Languages/zh/tw/navigate.yaml index 96c58f3ad..74dc996db 100644 --- a/Rules/Languages/zh/tw/navigate.yaml +++ b/Rules/Languages/zh/tw/navigate.yaml @@ -56,7 +56,7 @@ - if: "starts-with($NavCommand, 'Zoom')" then: [set_variables: [Prefix: "' '"]] # phrase('zoom' in to see more details) #hjy -- 'zoom' is a bit weird in Chinese, so skip it. - else_if: "starts-with($NavCommand, 'Move')" - then: [set_variables: [Prefix: "'移至'"]] # 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: "'讀出'"]] # phrase('read' to next entry in table) - else_if: "starts-with($NavCommand, 'Describe')" @@ -191,9 +191,9 @@ - else_if: "$PreviousNavCommand = 'ZoomOutAll'" 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" @@ -395,7 +395,7 @@ variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] replace: [x: "."] - with: - variables: [Move2D: "'退出'", Child2D: "."] + variables: [Move2D: "'離開'", Child2D: "."] replace: [x: ".."] - x: ".." @@ -485,7 +485,7 @@ then: [x: ".."] # auto-zoom: move out a level and retry else: - with: - variables: [Move2D: "'退出'", Child2D: "."] + variables: [Move2D: "'離開'", Child2D: "."] replace: [x: ".."] - test: if: "parent::m:mtd" @@ -509,12 +509,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'" @@ -554,8 +554,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'" @@ -605,7 +605,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "移至上一項" # phrase('move left') + - T: "移到上一項" # phrase('move left') - pause: short - test: if: "$NavVerbosity != 'Terse'" @@ -635,7 +635,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "移至下一項" # phrase('move right') + - T: "移到下一項" # phrase('move right') - pause: short - test: if: "$NavVerbosity != 'Terse'" @@ -668,7 +668,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'" @@ -704,7 +704,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'" @@ -734,7 +734,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "移至上一列" # phrase('move to previous row' to the previous row in the table) + - T: "移到上一列" # phrase('move to previous row' to the previous row in the table) - pause: medium - test: if: "preceding-sibling::*" @@ -758,7 +758,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "移至下一列" # phrase('move to next row' to the next row in the table) + - T: "移到下一列" # phrase('move to next row' to the next row in the table) - pause: medium - test: if: "following-sibling::*" @@ -783,7 +783,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "移至左一行" # phrase('move to previous column' to the previous row in the table) + - T: "移到左一行" # phrase('move to previous column' to the previous row in the table) - pause: medium - T: "沒有左一行" # phrase('no previous column' in the table) - set_variables: [SpeakExpression: "'false'"] @@ -796,7 +796,7 @@ - test: if: "$NavVerbosity = 'Verbose'" then: - - T: "移至右一行" # phrase('move to next column' to the next row in the table) + - T: "移到右一行" # phrase('move to next column' to the next row in the table) - pause: medium - T: "沒有右一行" # phrase('no next column' in the table) - set_variables: [SpeakExpression: "'false'"] @@ -814,7 +814,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'" @@ -1144,7 +1144,7 @@ - test: if: "$MatchCounter = 0 and $NavVerbosity = 'Verbose'" then: - - T: "不能移至下一項" # phrase('cannot move right') + - T: "無法移到下一項" # phrase('cannot move right') - pause: medium - with: variables: @@ -1165,16 +1165,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) + 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') - pause: short - - T: "數學式結尾" # phrase(move 'end of math') + - T: "數學結尾" # phrase(move 'end of math') - pause: long - set_variables: [SpeakExpression: "'false'"] @@ -1201,7 +1201,7 @@ replace: [x: ".."] else: - with: - variables: [Move2D: "'退出'", Child2D: "."] + variables: [Move2D: "'離開'", Child2D: "."] replace: [x: ".."] - x: ".." @@ -1282,7 +1282,7 @@ if: "preceding-sibling::* and following-sibling::*[1][name(.)='none']" then: - with: - variables: [Move2D: "'退出'", Child2D: "."] + variables: [Move2D: "'離開'", Child2D: "."] replace: [x: ".."] - x: "following-sibling::*[1]" else: @@ -1339,7 +1339,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: @@ -1356,7 +1356,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'"] @@ -1369,7 +1369,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: "."] @@ -1400,7 +1400,7 @@ replace: [x: ".."] else: - with: - variables: [Move2D: "'退出'", Child2D: "."] + variables: [Move2D: "'離開'", Child2D: "."] replace: [x: ".."] - x: ".." @@ -1490,7 +1490,7 @@ if: "count(preceding-sibling::*) > 2 and preceding-sibling::*[1][name(.)='none']" then: - with: - variables: [Move2D: "'退出'", Child2D: "."] + variables: [Move2D: "'離開'", Child2D: "."] replace: [x: ".."] - x: "preceding-sibling::*[1]" # skip over 'none' else: @@ -1599,7 +1599,7 @@ - if: "$NavCommand = 'ReadCurrent'" then: [T: "讀出"] # phrase('read' next entry in table) else: [T: "描述"] # phrase('describe' next entry in table) - - T: "當前" # phrase('current' entry in table) + - T: "目前" # phrase('current' entry in table) - pause: long - set_variables: [NavNode: "@id"] @@ -1621,7 +1621,7 @@ - else_if: "starts-with($NavCommand, 'Describe')" then: [T: "描述"] # phrase('describe' next entry in table) - else_if: "starts-with($NavCommand, 'MoveTo')" - then: [T: "移至"] # phrase('move to' the next entry in table) + then: [T: "移到"] # phrase('move to' 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" diff --git a/Rules/Languages/zh/tw/overview.yaml b/Rules/Languages/zh/tw/overview.yaml index 78bdcd0eb..240fb45c6 100644 --- a/Rules/Languages/zh/tw/overview.yaml +++ b/Rules/Languages/zh/tw/overview.yaml @@ -44,7 +44,7 @@ tag: mroot match: "." replace: - - T: "根號" + - T: "" - x: "*[1]" - test: if: "IsNode(*[1], 'simple')" @@ -94,7 +94,7 @@ - x: count(*[2]/*) - T: "乘" - x: count(*[2]/*[self::m:mtr][1]/*) - - T: "表" + - T: "表格" - name: short-mrow tag: mrow diff --git a/tests/Languages/zh/tw/SimpleSpeak/mroot.rs b/tests/Languages/zh/tw/SimpleSpeak/mroot.rs index c28fd8e71..57cf39c59 100644 --- a/tests/Languages/zh/tw/SimpleSpeak/mroot.rs +++ b/tests/Languages/zh/tw/SimpleSpeak/mroot.rs @@ -48,7 +48,7 @@ fn cube_root() -> Result<()> { let expr = " x 3 "; - test("zh-tw", "SimpleSpeak", expr, "根號 x 的 立方根")?; + test("zh-tw", "SimpleSpeak", expr, "x 的 立方根")?; return Ok(()); } @@ -58,7 +58,7 @@ fn ordinal_root() -> Result<()> { let expr = " x 9 "; - test("zh-tw", "SimpleSpeak", expr, "根號 x 的 9 次方根")?; + test("zh-tw", "SimpleSpeak", expr, "x 的 9 次方根")?; return Ok(()); } @@ -67,7 +67,7 @@ fn ordinal_root_2() -> Result<()> { let expr = " x 9.1 "; - test("zh-tw", "SimpleSpeak", expr, "根號 x 的 9.1 次方根")?; + test("zh-tw", "SimpleSpeak", expr, "x 的 9.1 次方根")?; return Ok(()); } @@ -77,7 +77,7 @@ fn simple_mi_root() -> Result<()> { let expr = " x n "; - test("zh-tw", "SimpleSpeak", expr, "根號 x 的 n 次方根")?; + test("zh-tw", "SimpleSpeak", expr, "x 的 n 次方根")?; return Ok(()); } @@ -91,7 +91,7 @@ fn simple_fraction_power() -> Result<()> { 13 "; - test("zh-tw", "SimpleSpeak", expr, "根號 x 的 3 分之 1 次方根")?; + test("zh-tw", "SimpleSpeak", expr, "x 的 3 分之 1 次方根")?; return Ok(()); } From f7bc32d876d64d4400c8cde9032da06e45224295 Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Mon, 1 Jun 2026 16:45:16 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E7=A7=BB=E5=88=B0=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=A0=BC=20->=20=E5=BE=80=E4=B8=8A=E4=B8=80=E6=A0=BC=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E5=88=B0=E4=B8=8B=E4=B8=80=E6=A0=BC=20->=20=E5=BE=80?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E6=A0=BC=EF=BC=8C=20=E4=BD=94=E4=BD=8D?= =?UTF-8?q?=E7=AC=A6=20->=20=E6=9B=B8=E7=B1=A4=EF=BC=8C=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E4=BD=94=E4=BD=8D=E7=AC=A6=20->=20=E8=A8=AD=E5=AE=9A=E6=9B=B8?= =?UTF-8?q?=E7=B1=A4=EF=BC=8C=E5=B7=B2=E6=98=AF=E6=9C=80=E4=B8=8A=E5=B1=A4?= =?UTF-8?q?=20->=20=E4=B8=8D=E5=9C=A8=E5=88=A5=E7=9A=84=E5=BC=8F=E5=AD=90?= =?UTF-8?q?=E8=A3=A1=E9=9D=A2=EF=BC=8C=E4=B8=8A=E4=B8=80=E5=B1=A4=E6=98=AF?= =?UTF-8?q?=20->=20=E5=9C=A8=E5=BE=8C=E9=9D=A2=E5=BC=8F=E5=AD=90=E8=A3=A1?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=AD=97=E5=85=83=E6=A8=A1=E5=BC=8F=20?= =?UTF-8?q?=E9=96=8Bn=20=E6=AC=A1=E6=96=B9=E6=A0=B9=20=E7=9A=84=E8=AE=80?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E5=9F=BA=E5=BA=95=20->=20=E5=9F=BA=E3=80=81?= =?UTF-8?q?=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Languages/zh/tw/SharedRules/default.yaml | 8 +++--- Rules/Languages/zh/tw/definitions.yaml | 26 +++++++++---------- Rules/Languages/zh/tw/navigate.yaml | 16 ++++++------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Rules/Languages/zh/tw/SharedRules/default.yaml b/Rules/Languages/zh/tw/SharedRules/default.yaml index 114b0ed63..d5b17cd1b 100644 --- a/Rules/Languages/zh/tw/SharedRules/default.yaml +++ b/Rules/Languages/zh/tw/SharedRules/default.yaml @@ -131,17 +131,17 @@ - test: if: "$Verbosity!='Terse'" then: [T: ""] # phrase("'the' root of x") + - T: "根指數" # phrase("the root of x 'with index' 5") + - x: "*[2]" - T: "根號" - - T: "開方次數" # phrase("the root of x 'with index' 5") - - x: "*[1]" - pause: short - test: if: "$Verbosity!='Terse'" then: [T: ""] # phrase("the root 'of' x") - - x: "*[2]" + - x: "*[1]" - pause: short - test: - if: "not(IsNode(*[2],'leaf'))" + if: "not(IsNode(*[1],'leaf'))" then: [T: "結束根號"] # phrase("root of x 'end root symbol'") diff --git a/Rules/Languages/zh/tw/definitions.yaml b/Rules/Languages/zh/tw/definitions.yaml index fa5c39428..5c8d5947c 100644 --- a/Rules/Languages/zh/tw/definitions.yaml +++ b/Rules/Languages/zh/tw/definitions.yaml @@ -48,23 +48,23 @@ } - NavigationParts: { - "large-op": "基底; 下限; 上限", + "large-op": "基; 下限; 上限", "mfrac": "分子;分母", "fraction": "分子;分母", "msqrt": "根號", "square-root": "根號", - "mroot": "根號;根次數", - "root": "根號;根次數", - "msub": "基底;下標", - "sub": "基底;下標", - "msup": "基底;上標", - "say-super": "基底;上標", - "skip-super": "基底;上標", - "power": "基底;指數", - "msubsup": "基底;下標;上標", - "munder": "基底;下限", - "mover": "基底;上限", - "munderover": "基底;下限;上限", + "mroot": "根號;根指數", + "root": "根號;根指數", + "msub": "基;下標", + "sub": "基;下標", + "msup": "基;上標", + "say-super": "基;上標", + "skip-super": "基;上標", + "power": "底;指數", + "msubsup": "基;下標;上標", + "munder": "基;下限", + "mover": "基;上限", + "munderover": "基;下限;上限", # words for moving into and out of one of the parts (e.g., "move right 'out of' numerator, 'in' denominator") # it's a hack to put them here, but at least they are grouped with the other navigation parts diff --git a/Rules/Languages/zh/tw/navigate.yaml b/Rules/Languages/zh/tw/navigate.yaml index 74dc996db..f51f1497c 100644 --- a/Rules/Languages/zh/tw/navigate.yaml +++ b/Rules/Languages/zh/tw/navigate.yaml @@ -124,7 +124,7 @@ - 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 @@ -668,7 +668,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'" @@ -704,7 +704,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'" @@ -1623,7 +1623,7 @@ - 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) - - T: "佔位符" # phrase('placeholder' for the value) + - T: "書籤" # phrase('placeholder' for the value) - x: "$PlaceMarkerIndex" - pause: long - set_variables: [NavNode: "$PlaceMarker"] @@ -1635,7 +1635,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"] @@ -1667,11 +1667,11 @@ - test: if: "$NavCommand = 'WhereAmI'" then: - - T: "已是最上層" # phrase('inside of nothing more') + - T: "不在別的式子裡面" # phrase('inside of nothing more') - pause: long - set_variables: [SpeakExpression: "'false'"] else: - - T: "上一層是" # phrase('inside' a big expression) + - T: "在後面式子裡面" # phrase('inside' a big expression) - pause: medium - set_variables: [NavNode: "@id"] @@ -1679,7 +1679,7 @@ tag: "*" match: "$NavCommand = 'WhereAmI' or $NavCommand = 'WhereAmIAll'" replace: - - T: "上一層是" # phrase('inside' a big expression) + - T: "在後面式子裡面" # phrase('inside' a big expression) - pause: medium - test: - if: "$NavMode='Enhanced' and parent::*[self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" From 39e992ef293dde70f43a5e674cd9839804fb8ca1 Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Mon, 1 Jun 2026 17:50:11 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=90=91=E9=87=8F=20->=20=E5=B0=84?= =?UTF-8?q?=E7=B7=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rules/Languages/zh/tw/SharedRules/geometry.yaml | 4 ++-- tests/Languages/zh/tw/SimpleSpeak/geometry.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Rules/Languages/zh/tw/SharedRules/geometry.yaml b/Rules/Languages/zh/tw/SharedRules/geometry.yaml index e4241c0f4..85a6c6ba4 100644 --- a/Rules/Languages/zh/tw/SharedRules/geometry.yaml +++ b/Rules/Languages/zh/tw/SharedRules/geometry.yaml @@ -23,12 +23,12 @@ - test: if: "$Verbosity='Verbose'" then: - - T: "向量" # phrase('the ray from' A to B) + - T: "射線" # phrase('the ray from' A to B) - x: "*[1]" - T: "到" # phrase(the ray from A 'to' B) - x: "*[2]" else: - - T: "向量" # phrase(the 'ray'A B) + - T: "射線" # phrase(the 'ray'A B) - x: "*[1]" - x: "*[2]" diff --git a/tests/Languages/zh/tw/SimpleSpeak/geometry.rs b/tests/Languages/zh/tw/SimpleSpeak/geometry.rs index 20235702b..4a9b4c72a 100644 --- a/tests/Languages/zh/tw/SimpleSpeak/geometry.rs +++ b/tests/Languages/zh/tw/SimpleSpeak/geometry.rs @@ -30,7 +30,7 @@ fn arc_mtext() -> Result<()> { #[test] fn ray_mtext() -> Result<()> { let expr = " XY "; - test("zh-tw", "SimpleSpeak", expr, "向量 大寫 x 大寫 y")?; + test("zh-tw", "SimpleSpeak", expr, "射線 大寫 x 大寫 y")?; return Ok(()); } From 2574d628751f2b267c6db7aca5e8805a6b92f987 Mon Sep 17 00:00:00 2001 From: hjyanghj Date: Tue, 2 Jun 2026 11:19:07 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=9F=BA=20->=20=E5=9F=BA=E5=BA=95?= =?UTF-8?q?=EF=BC=8C=E5=BA=95=20->=20=E5=9F=BA=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rules/Languages/zh/tw/definitions.yaml | 22 +++++++++++----------- Rules/Languages/zh/tw/navigate.yaml | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Rules/Languages/zh/tw/definitions.yaml b/Rules/Languages/zh/tw/definitions.yaml index 5c8d5947c..280ec6039 100644 --- a/Rules/Languages/zh/tw/definitions.yaml +++ b/Rules/Languages/zh/tw/definitions.yaml @@ -48,23 +48,23 @@ } - NavigationParts: { - "large-op": "基; 下限; 上限", + "large-op": "基底; 下限; 上限", "mfrac": "分子;分母", "fraction": "分子;分母", "msqrt": "根號", "square-root": "根號", "mroot": "根號;根指數", "root": "根號;根指數", - "msub": "基;下標", - "sub": "基;下標", - "msup": "基;上標", - "say-super": "基;上標", - "skip-super": "基;上標", - "power": "底;指數", - "msubsup": "基;下標;上標", - "munder": "基;下限", - "mover": "基;上限", - "munderover": "基;下限;上限", + "msub": "基底;下標", + "sub": "基底;下標", + "msup": "基底;上標", + "say-super": "基底;上標", + "skip-super": "基底;上標", + "power": "基底;指數", + "msubsup": "基底;下標;上標", + "munder": "基底;下限", + "mover": "基底;上限", + "munderover": "基底;下限;上限", # words for moving into and out of one of the parts (e.g., "move right 'out of' numerator, 'in' denominator") # it's a hack to put them here, but at least they are grouped with the other navigation parts diff --git a/Rules/Languages/zh/tw/navigate.yaml b/Rules/Languages/zh/tw/navigate.yaml index f51f1497c..0e94a5350 100644 --- a/Rules/Languages/zh/tw/navigate.yaml +++ b/Rules/Languages/zh/tw/navigate.yaml @@ -124,7 +124,7 @@ - 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