|
100 | 100 |
|
101 | 101 | - name: into-or-out-of-mtr |
102 | 102 | tag: [mtr, mlabeledtr] |
103 | | - match: "$Move2D = 'inn'" # Navigate into a 2D structure. |
| 103 | + match: "$Move2D = 'i'" # Navigate into a 2D structure. |
104 | 104 | replace: |
105 | 105 | - T: "kolonne" |
106 | | - - x: "count($Child2D/preceding-sibling::*)+1" # Teller antall søskennoder før Child2D (noden man beveger seg inn i) |
| 106 | + - x: "count($Child2D/preceding-sibling::*)+1" # Count number of sibling nodes before Child2D (the node being navigated into) and add 1 to get the column number. |
107 | 107 | - pause: "medium" |
108 | 108 |
|
109 | 109 | - name: into-or-out-of-mmultiscripts |
110 | 110 | tag: "*" |
111 | | - match: "$Move2D != '' and (@data-from-mathml='mmultiscripts' or self::m:mmultiscripts)" #Navigerer inn i en 2d struktur som er en mmultiscripts. |
| 111 | + match: "$Move2D != '' and (@data-from-mathml='mmultiscripts' or self::m:mmultiscripts)" # Navigate into a 2D structure that is a mmultiscripts. |
112 | 112 | replace: |
113 | 113 | - test: |
114 | | - if: "name($Child2D)!='none'" # Sjekker at barnet man navigerer inn i ikke er tomt. |
| 114 | + if: "name($Child2D)!='none'" # Check that the child being navigated into is not empty. |
115 | 115 | then: |
116 | 116 | - with: |
117 | 117 | variables: |
118 | | - - NumPrecedingSiblings: "count($Child2D/preceding-sibling::*)" # Lagrer antall søsken foran målnoden. |
| 118 | + - NumPrecedingSiblings: "count($Child2D/preceding-sibling::*)" # Store the number of siblings before the target node. |
119 | 119 | replace: |
120 | | - - x: "$Move2D" #Sier retningsordet (inn/ut av) |
| 120 | + - x: "$Move2D" # Say the direction (into/out of) |
121 | 121 | - test: |
122 | | - - if: "$NumPrecedingSiblings=0" # Ingen søsken foran målnoden |
| 122 | + - if: "$NumPrecedingSiblings=0" # No siblings before the target node |
123 | 123 | then: [T: "base"] # phrase(the 'base' of the power) |
124 | | - - else_if: "$Child2D/preceding-sibling::*[self::m:mprescripts]" # Er vi etter <mprescripts>-taggent. I så fall er vi i prescriptene. |
| 124 | + - else_if: "$Child2D/preceding-sibling::*[self::m:mprescripts]" # Are we after the <mprescripts> tag? If so, we are in the prescripts. |
125 | 125 | then: |
126 | 126 | - test: # in postscripts -- base shifts by one |
127 | 127 | if: "$NumPrecedingSiblings mod 2 = 0" |
|
143 | 143 | replace: |
144 | 144 | - with: |
145 | 145 | variables: |
146 | | - - PartNumber: "count($Child2D/preceding-sibling::*)" # antall søsken før målnoden |
147 | | - - PartName: "GetNavigationPartName(name(.), $PartNumber)" # finne navn på delen. F.eks. teller/nevner, base/eksponent |
| 146 | + - PartNumber: "count($Child2D/preceding-sibling::*)" # Count the number of siblings before the target node |
| 147 | + - PartName: "GetNavigationPartName(name(.), $PartNumber)" # Find the name of the part. E.g., numerator/denominator, base/exponent |
148 | 148 | replace: |
149 | | - - x: "$Move2D" # inn/ut av |
| 149 | + - x: "$Move2D" # into/out of |
150 | 150 | - test: |
151 | | - - if: "$PartName != ''" # hvis et navn på delen finnes |
| 151 | + - if: "$PartName != ''" # if a name for the part exists |
152 | 152 | then: [x: "$PartName"] |
153 | | - - else_if: "count(*) = 1" # hvis noden har ett barn |
| 153 | + - else_if: "count(*) = 1" # if the node has one child |
154 | 154 | then_test: |
155 | 155 | if: "$NavVerbosity = 'Verbose'" |
156 | 156 | then: [x: "translate(name(.), '-_', ' ')"] # e.g., "in absolute value" |
|
250 | 250 | - " ($NavCommand = 'MoveNextZoom' or $NavCommand = 'MovePreviousZoom') and $NavMode='Enhanced') and " |
251 | 251 | - "count(*)=1 and |
252 | 252 | (*[1][self::m:mrow or @data-from-mathml='mrow'] and |
253 | | - not(@data-from-mathml='msqrt' or self::m:msqrt or @data-from-mathml='menclose' or self::m:menclose))" # nåværende node har ett barn som er en <mrow>. Den nåværende noden er ikke msqrt ekker menclose. |
| 253 | + not(@data-from-mathml='msqrt' or self::m:msqrt or @data-from-mathml='menclose' or self::m:menclose))" # current node has one child that is an <mrow>. The current node is not msqrt or menclose. |
254 | 254 | replace: |
255 | 255 | - with: |
256 | | - variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] # hvis verbosity er verbose, blir SayCommand satt til true, ellers false |
257 | | - replace: [x: "."] # kjør videre med nåverende node |
| 256 | + variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] # if verbosity is verbose, SayCommand is set to true, otherwise false |
| 257 | + replace: [x: "."] # continue with the current node |
258 | 258 | - test: |
259 | 259 | if: "not(*[1][self::m:mrow or @data-from-mathml='mrow'])" |
260 | 260 | then: |
261 | 261 | - with: |
262 | | - # Setter Move2d til "i". |
263 | | - # Setter Child2d til siste barn hvis kommandoen er "MovePreviousZoom", ellers første barn. |
| 262 | + # Set Move2D to "i". |
| 263 | + # Set Child2D to the last child if the command is "MovePreviousZoom", otherwise the first child. |
264 | 264 | variables: [Move2D: "'i'", Child2D: "IfThenElse($NavCommand = 'MovePreviousZoom', (*[last()]), (*[1]))"] # phrase('in' the denominator) |
265 | 265 | replace: [x: "IfThenElse($NavCommand = 'MovePreviousZoom', 1, $Child2D)"] |
266 | 266 | - test: |
|
392 | 392 | variables: [SayCommand: "string($NavVerbosity = 'Verbose')"] |
393 | 393 | replace: [x: "."] |
394 | 394 | - with: |
395 | | - variables: [Move2D: "'out of'", Child2D: "."] |
| 395 | + variables: [Move2D: "'ut av'", Child2D: "."] |
396 | 396 | replace: [x: ".."] |
397 | 397 | - x: ".." |
398 | 398 |
|
|
493 | 493 | then: [x: ".."] # auto-zoom: move out a level and retry |
494 | 494 | else: |
495 | 495 | - with: |
496 | | - variables: [Move2D: "'out of'", Child2D: "."] # phrase('out of' the denominator) |
| 496 | + variables: [Move2D: "'ut av'", Child2D: "."] # phrase('out of' the denominator) |
497 | 497 | replace: [x: ".."] |
498 | 498 | - test: |
499 | 499 | if: "parent::m:mtd" |
|
632 | 632 | else: |
633 | 633 | - set_variables: [NavNode: "preceding-sibling::*[1]/*[1]/@id"] |
634 | 634 | else: |
635 | | - - t: "ingen foregående kolonner" # phrase('no previous column' in the table) |
| 635 | + - T: "ingen foregående kolonner" # phrase('no previous column' in the table) |
636 | 636 | - set_variables: [SpeakExpression: "'false'"] |
637 | 637 |
|
638 | 638 | - name: move-cell-next |
|
896 | 896 | then: [x: "$Following"] |
897 | 897 | else: |
898 | 898 | - with: |
899 | | - variables: [Move2D: "'in'", Child2D: "$Following"] # phrase('in' the denominator) |
| 899 | + variables: [Move2D: "'i'", Child2D: "$Following"] # phrase('in' the denominator) |
900 | 900 | replace: [x: ".."] |
901 | 901 | - with: |
902 | 902 | variables: [NavCommand: "'MoveNextZoom'"] |
|
931 | 931 | - pause: medium |
932 | 932 | - with: |
933 | 933 | variables: |
934 | | - - Move2D: "'end of'" |
| 934 | + - Move2D: "'slutt på'" |
935 | 935 | - Child2D: "$EdgeNode/*[last()]" |
936 | 936 | - MatchCounter: $MatchCounter + 1 |
937 | 937 | replace: [x: "$EdgeNode"] |
|
951 | 951 | - T: "kan ikke" # phrase('cannot' move right in expression) |
952 | 952 | - test: |
953 | 953 | - if: "$NavCommand = 'MoveNext'" |
954 | | - then: [t: "gå"] # phrase('move' to next entry in table) |
| 954 | + then: [T: "gå"] # phrase('move' to next entry in table) |
955 | 955 | - else_if: "$NavCommand = 'ReadNext'" |
956 | | - then: [t: "lese"] # phrase('read' next entry in table) |
957 | | - else: [t: "beskrive"] # phrase('describe' next entry in table) |
| 956 | + then: [T: "lese"] # phrase('read' next entry in table) |
| 957 | + else: [T: "beskrive"] # phrase('describe' next entry in table) |
958 | 958 | - T: "høyre" # phrase(move 'right') |
959 | 959 | - pause: short |
960 | 960 | - T: "slutt på uttrykk" # phrase(move 'end of math') |
|
980 | 980 | if: "following-sibling::*" |
981 | 981 | then: |
982 | 982 | - with: |
983 | | - variables: [Move2D: "'in'", Child2D: "."] # phrase('in' the denominator) |
| 983 | + variables: [Move2D: "'i'", Child2D: "."] # phrase('in' the denominator) |
984 | 984 | replace: [x: ".."] |
985 | 985 | else: |
986 | 986 | - with: |
987 | | - variables: [Move2D: "'out of'", Child2D: "."] |
| 987 | + variables: [Move2D: "'ut av'", Child2D: "."] |
988 | 988 | replace: [x: ".."] |
989 | 989 | - x: ".." |
990 | 990 |
|
|
1065 | 1065 | if: "preceding-sibling::* and following-sibling::*[1][name(.)='none']" |
1066 | 1066 | then: |
1067 | 1067 | - with: |
1068 | | - variables: [Move2D: "'out of'", Child2D: "."] |
| 1068 | + variables: [Move2D: "'ut av'", Child2D: "."] |
1069 | 1069 | replace: [x: ".."] |
1070 | 1070 | - x: "following-sibling::*[1]" |
1071 | 1071 | else: |
1072 | 1072 | - with: |
1073 | | - variables: [Move2D: "'in'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) |
| 1073 | + variables: [Move2D: "'i'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) |
1074 | 1074 | replace: [x: ".."] |
1075 | 1075 | - with: |
1076 | 1076 | variables: [NavCommand: "'MoveNextZoom'"] |
|
1091 | 1091 | if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))" |
1092 | 1092 | then: |
1093 | 1093 | - with: |
1094 | | - variables: [Move2D: "'in'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) |
| 1094 | + variables: [Move2D: "'i'", Child2D: "following-sibling::*[1]"] # phrase('in' the denominator) |
1095 | 1095 | replace: [x: ".."] |
1096 | 1096 | - set_variables: [NavNode: "following-sibling::*[1]/@id"] |
1097 | 1097 |
|
|
1113 | 1113 | then: [x: "$Preceding"] |
1114 | 1114 | else: |
1115 | 1115 | - with: |
1116 | | - variables: [Move2D: "'in'", Child2D: "$Preceding"] # phrase('in' the denominator) |
| 1116 | + variables: [Move2D: "'i'", Child2D: "$Preceding"] # phrase('in' the denominator) |
1117 | 1117 | replace: [x: ".."] |
1118 | 1118 | - with: |
1119 | 1119 | variables: [NavCommand: "'MovePreviousZoom'"] |
|
1148 | 1148 | - pause: medium |
1149 | 1149 | - with: |
1150 | 1150 | variables: |
1151 | | - - Move2D: "'end of'" |
| 1151 | + - Move2D: "'slutt på'" |
1152 | 1152 | - Child2D: "$EdgeNode/*[1]" |
1153 | 1153 | - MatchCounter: $MatchCounter + 1 |
1154 | 1154 | replace: [x: "$EdgeNode"] |
|
1177 | 1177 | - T: "kan ikke gå venstre" # phrase('cannot move left') |
1178 | 1178 | - pause: short |
1179 | 1179 | - with: |
1180 | | - variables: [Move2D: "'start of'", Child2D: "."] |
| 1180 | + variables: [Move2D: "'start på'", Child2D: "."] |
1181 | 1181 | replace: [x: "."] |
1182 | 1182 | - pause: long |
1183 | 1183 | - set_variables: [SpeakExpression: "'false'"] |
|
1222 | 1222 | if: "preceding-sibling::*" |
1223 | 1223 | then: |
1224 | 1224 | - with: |
1225 | | - variables: [Move2D: "'in'", Child2D: "."] # phrase('in' the denominator) |
| 1225 | + variables: [Move2D: "'i'", Child2D: "."] # phrase('in' the denominator) |
1226 | 1226 | replace: [x: ".."] |
1227 | 1227 | else: |
1228 | 1228 | - with: |
1229 | | - variables: [Move2D: "'out of'", Child2D: "."] |
| 1229 | + variables: [Move2D: "'ut av'", Child2D: "."] |
1230 | 1230 | replace: [x: ".."] |
1231 | 1231 | - x: ".." |
1232 | 1232 |
|
|
1252 | 1252 | if: "not(parent::m:mrow)" |
1253 | 1253 | then: |
1254 | 1254 | - with: |
1255 | | - variables: [Move2D: "'in'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) |
| 1255 | + variables: [Move2D: "'i'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) |
1256 | 1256 | replace: [x: ".."] |
1257 | 1257 | - set_variables: [NavNode: "preceding-sibling::*[1]/*[2]/@id"] |
1258 | 1258 |
|
|
1316 | 1316 | if: "count(preceding-sibling::*) > 2 and preceding-sibling::*[1][name(.)='none']" |
1317 | 1317 | then: |
1318 | 1318 | - with: |
1319 | | - variables: [Move2D: "'out of'", Child2D: "."] |
| 1319 | + variables: [Move2D: "'ut av'", Child2D: "."] |
1320 | 1320 | replace: [x: ".."] |
1321 | 1321 | - x: "preceding-sibling::*[1]" # skip over 'none' |
1322 | 1322 | else: |
1323 | 1323 | - with: |
1324 | | - variables: [Move2D: "'in'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) |
| 1324 | + variables: [Move2D: "'i'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) |
1325 | 1325 | replace: [x: ".."] |
1326 | 1326 | - with: |
1327 | 1327 | variables: [NavCommand: "'MovePreviousZoom'"] |
|
1342 | 1342 | if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))" |
1343 | 1343 | then: |
1344 | 1344 | - with: |
1345 | | - variables: [Move2D: "'in'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) |
| 1345 | + variables: [Move2D: "'i'", Child2D: "preceding-sibling::*[1]"] # phrase('in' the denominator) |
1346 | 1346 | replace: [x: ".."] |
1347 | 1347 | - set_variables: [NavNode: "preceding-sibling::*[1]/@id"] |
1348 | 1348 |
|
|
1422 | 1422 | - test: |
1423 | 1423 | - if: "$NavCommand = 'ReadCurrent'" |
1424 | 1424 | then: [T: "les"] # phrase('read' next entry in table) |
1425 | | - else: [t: "beskriv"] # phrase('describe' next entry in table) |
| 1425 | + else: [T: "beskriv"] # phrase('describe' next entry in table) |
1426 | 1426 | - T: "nåværende" # phrase('current' entry in table) |
1427 | 1427 | - pause: long |
1428 | 1428 | - set_variables: [NavNode: "@id"] |
|
1447 | 1447 | - else_if: "starts-with($NavCommand, 'MoveTo')" |
1448 | 1448 | then: [T: "gå til "] # phrase('move to' the next entry in table) |
1449 | 1449 | else: [T: "angi"] # phrase('set' the value of the next entry in table) |
1450 | | - - t: "plassholder" # phrase('placeholder' for the value) |
| 1450 | + - T: "plassholder" # phrase('placeholder' for the value) |
1451 | 1451 | - x: "$PlaceMarkerIndex" |
1452 | 1452 | - pause: long |
1453 | 1453 | - set_variables: [NavNode: "$PlaceMarker"] |
|
1492 | 1492 | - test: |
1493 | 1493 | if: "$NavCommand = 'WhereAmI'" |
1494 | 1494 | then: |
1495 | | - - t: "inside of nothing more" # phrase('inside of nothing more') |
| 1495 | + - T: "inni ingenting mer" # phrase('inside of nothing more') |
1496 | 1496 | - pause: long |
1497 | 1497 | - set_variables: [SpeakExpression: "'false'"] |
1498 | 1498 | else: |
1499 | | - - t: "inside" # phrase('inside' a big expression) |
| 1499 | + - T: "inni" # phrase('inside' a big expression) |
1500 | 1500 | - pause: medium |
1501 | 1501 | - set_variables: [NavNode: "@id"] |
1502 | 1502 |
|
1503 | | -# Marthe |
1504 | 1503 | - name: where-am-i-middle |
1505 | 1504 | tag: "*" |
1506 | 1505 | match: "$NavCommand = 'WhereAmI' or $NavCommand = 'WhereAmIAll'" |
1507 | 1506 | replace: |
1508 | | - - t: "inside" # phrase('inside' a big expression) |
| 1507 | + - T: "inni" # phrase('inside' a big expression) |
1509 | 1508 | - pause: medium |
1510 | 1509 | - test: |
1511 | 1510 | - if: "$NavMode='Enhanced' and parent::*[self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]" |
|
0 commit comments