Skip to content

Commit d58f08a

Browse files
Updated Navigation file
1 parent d57cca9 commit d58f08a

1 file changed

Lines changed: 45 additions & 46 deletions

File tree

Rules/Languages/nb/navigate.yaml

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -100,28 +100,28 @@
100100

101101
- name: into-or-out-of-mtr
102102
tag: [mtr, mlabeledtr]
103-
match: "$Move2D = 'inn'" # Navigate into a 2D structure.
103+
match: "$Move2D = 'i'" # Navigate into a 2D structure.
104104
replace:
105105
- 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.
107107
- pause: "medium"
108108

109109
- name: into-or-out-of-mmultiscripts
110110
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.
112112
replace:
113113
- 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.
115115
then:
116116
- with:
117117
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.
119119
replace:
120-
- x: "$Move2D" #Sier retningsordet (inn/ut av)
120+
- x: "$Move2D" # Say the direction (into/out of)
121121
- test:
122-
- if: "$NumPrecedingSiblings=0" # Ingen søsken foran målnoden
122+
- if: "$NumPrecedingSiblings=0" # No siblings before the target node
123123
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.
125125
then:
126126
- test: # in postscripts -- base shifts by one
127127
if: "$NumPrecedingSiblings mod 2 = 0"
@@ -143,14 +143,14 @@
143143
replace:
144144
- with:
145145
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
148148
replace:
149-
- x: "$Move2D" # inn/ut av
149+
- x: "$Move2D" # into/out of
150150
- test:
151-
- if: "$PartName != ''" # hvis et navn på delen finnes
151+
- if: "$PartName != ''" # if a name for the part exists
152152
then: [x: "$PartName"]
153-
- else_if: "count(*) = 1" # hvis noden har ett barn
153+
- else_if: "count(*) = 1" # if the node has one child
154154
then_test:
155155
if: "$NavVerbosity = 'Verbose'"
156156
then: [x: "translate(name(.), '-_', ' ')"] # e.g., "in absolute value"
@@ -250,17 +250,17 @@
250250
- " ($NavCommand = 'MoveNextZoom' or $NavCommand = 'MovePreviousZoom') and $NavMode='Enhanced') and "
251251
- "count(*)=1 and
252252
(*[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.
254254
replace:
255255
- 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
258258
- test:
259259
if: "not(*[1][self::m:mrow or @data-from-mathml='mrow'])"
260260
then:
261261
- 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.
264264
variables: [Move2D: "'i'", Child2D: "IfThenElse($NavCommand = 'MovePreviousZoom', (*[last()]), (*[1]))"] # phrase('in' the denominator)
265265
replace: [x: "IfThenElse($NavCommand = 'MovePreviousZoom', 1, $Child2D)"]
266266
- test:
@@ -392,7 +392,7 @@
392392
variables: [SayCommand: "string($NavVerbosity = 'Verbose')"]
393393
replace: [x: "."]
394394
- with:
395-
variables: [Move2D: "'out of'", Child2D: "."]
395+
variables: [Move2D: "'ut av'", Child2D: "."]
396396
replace: [x: ".."]
397397
- x: ".."
398398

@@ -493,7 +493,7 @@
493493
then: [x: ".."] # auto-zoom: move out a level and retry
494494
else:
495495
- with:
496-
variables: [Move2D: "'out of'", Child2D: "."] # phrase('out of' the denominator)
496+
variables: [Move2D: "'ut av'", Child2D: "."] # phrase('out of' the denominator)
497497
replace: [x: ".."]
498498
- test:
499499
if: "parent::m:mtd"
@@ -632,7 +632,7 @@
632632
else:
633633
- set_variables: [NavNode: "preceding-sibling::*[1]/*[1]/@id"]
634634
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)
636636
- set_variables: [SpeakExpression: "'false'"]
637637

638638
- name: move-cell-next
@@ -896,7 +896,7 @@
896896
then: [x: "$Following"]
897897
else:
898898
- with:
899-
variables: [Move2D: "'in'", Child2D: "$Following"] # phrase('in' the denominator)
899+
variables: [Move2D: "'i'", Child2D: "$Following"] # phrase('in' the denominator)
900900
replace: [x: ".."]
901901
- with:
902902
variables: [NavCommand: "'MoveNextZoom'"]
@@ -931,7 +931,7 @@
931931
- pause: medium
932932
- with:
933933
variables:
934-
- Move2D: "'end of'"
934+
- Move2D: "'slutt på'"
935935
- Child2D: "$EdgeNode/*[last()]"
936936
- MatchCounter: $MatchCounter + 1
937937
replace: [x: "$EdgeNode"]
@@ -951,10 +951,10 @@
951951
- T: "kan ikke" # phrase('cannot' move right in expression)
952952
- test:
953953
- 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)
955955
- 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)
958958
- T: "høyre" # phrase(move 'right')
959959
- pause: short
960960
- T: "slutt på uttrykk" # phrase(move 'end of math')
@@ -980,11 +980,11 @@
980980
if: "following-sibling::*"
981981
then:
982982
- with:
983-
variables: [Move2D: "'in'", Child2D: "."] # phrase('in' the denominator)
983+
variables: [Move2D: "'i'", Child2D: "."] # phrase('in' the denominator)
984984
replace: [x: ".."]
985985
else:
986986
- with:
987-
variables: [Move2D: "'out of'", Child2D: "."]
987+
variables: [Move2D: "'ut av'", Child2D: "."]
988988
replace: [x: ".."]
989989
- x: ".."
990990

@@ -1065,12 +1065,12 @@
10651065
if: "preceding-sibling::* and following-sibling::*[1][name(.)='none']"
10661066
then:
10671067
- with:
1068-
variables: [Move2D: "'out of'", Child2D: "."]
1068+
variables: [Move2D: "'ut av'", Child2D: "."]
10691069
replace: [x: ".."]
10701070
- x: "following-sibling::*[1]"
10711071
else:
10721072
- 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)
10741074
replace: [x: ".."]
10751075
- with:
10761076
variables: [NavCommand: "'MoveNextZoom'"]
@@ -1091,7 +1091,7 @@
10911091
if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))"
10921092
then:
10931093
- 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)
10951095
replace: [x: ".."]
10961096
- set_variables: [NavNode: "following-sibling::*[1]/@id"]
10971097

@@ -1113,7 +1113,7 @@
11131113
then: [x: "$Preceding"]
11141114
else:
11151115
- with:
1116-
variables: [Move2D: "'in'", Child2D: "$Preceding"] # phrase('in' the denominator)
1116+
variables: [Move2D: "'i'", Child2D: "$Preceding"] # phrase('in' the denominator)
11171117
replace: [x: ".."]
11181118
- with:
11191119
variables: [NavCommand: "'MovePreviousZoom'"]
@@ -1148,7 +1148,7 @@
11481148
- pause: medium
11491149
- with:
11501150
variables:
1151-
- Move2D: "'end of'"
1151+
- Move2D: "'slutt på'"
11521152
- Child2D: "$EdgeNode/*[1]"
11531153
- MatchCounter: $MatchCounter + 1
11541154
replace: [x: "$EdgeNode"]
@@ -1177,7 +1177,7 @@
11771177
- T: "kan ikke gå venstre" # phrase('cannot move left')
11781178
- pause: short
11791179
- with:
1180-
variables: [Move2D: "'start of'", Child2D: "."]
1180+
variables: [Move2D: "'start '", Child2D: "."]
11811181
replace: [x: "."]
11821182
- pause: long
11831183
- set_variables: [SpeakExpression: "'false'"]
@@ -1222,11 +1222,11 @@
12221222
if: "preceding-sibling::*"
12231223
then:
12241224
- with:
1225-
variables: [Move2D: "'in'", Child2D: "."] # phrase('in' the denominator)
1225+
variables: [Move2D: "'i'", Child2D: "."] # phrase('in' the denominator)
12261226
replace: [x: ".."]
12271227
else:
12281228
- with:
1229-
variables: [Move2D: "'out of'", Child2D: "."]
1229+
variables: [Move2D: "'ut av'", Child2D: "."]
12301230
replace: [x: ".."]
12311231
- x: ".."
12321232

@@ -1252,7 +1252,7 @@
12521252
if: "not(parent::m:mrow)"
12531253
then:
12541254
- 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)
12561256
replace: [x: ".."]
12571257
- set_variables: [NavNode: "preceding-sibling::*[1]/*[2]/@id"]
12581258

@@ -1316,12 +1316,12 @@
13161316
if: "count(preceding-sibling::*) > 2 and preceding-sibling::*[1][name(.)='none']"
13171317
then:
13181318
- with:
1319-
variables: [Move2D: "'out of'", Child2D: "."]
1319+
variables: [Move2D: "'ut av'", Child2D: "."]
13201320
replace: [x: ".."]
13211321
- x: "preceding-sibling::*[1]" # skip over 'none'
13221322
else:
13231323
- 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)
13251325
replace: [x: ".."]
13261326
- with:
13271327
variables: [NavCommand: "'MovePreviousZoom'"]
@@ -1342,7 +1342,7 @@
13421342
if: "IsNode(.., '2D') or not(IsNode(.., 'mathml'))"
13431343
then:
13441344
- 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)
13461346
replace: [x: ".."]
13471347
- set_variables: [NavNode: "preceding-sibling::*[1]/@id"]
13481348

@@ -1422,7 +1422,7 @@
14221422
- test:
14231423
- if: "$NavCommand = 'ReadCurrent'"
14241424
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)
14261426
- T: "nåværende" # phrase('current' entry in table)
14271427
- pause: long
14281428
- set_variables: [NavNode: "@id"]
@@ -1447,7 +1447,7 @@
14471447
- else_if: "starts-with($NavCommand, 'MoveTo')"
14481448
then: [T: "gå til "] # phrase('move to' the next entry in table)
14491449
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)
14511451
- x: "$PlaceMarkerIndex"
14521452
- pause: long
14531453
- set_variables: [NavNode: "$PlaceMarker"]
@@ -1492,20 +1492,19 @@
14921492
- test:
14931493
if: "$NavCommand = 'WhereAmI'"
14941494
then:
1495-
- t: "inside of nothing more" # phrase('inside of nothing more')
1495+
- T: "inni ingenting mer" # phrase('inside of nothing more')
14961496
- pause: long
14971497
- set_variables: [SpeakExpression: "'false'"]
14981498
else:
1499-
- t: "inside" # phrase('inside' a big expression)
1499+
- T: "inni" # phrase('inside' a big expression)
15001500
- pause: medium
15011501
- set_variables: [NavNode: "@id"]
15021502

1503-
# Marthe
15041503
- name: where-am-i-middle
15051504
tag: "*"
15061505
match: "$NavCommand = 'WhereAmI' or $NavCommand = 'WhereAmIAll'"
15071506
replace:
1508-
- t: "inside" # phrase('inside' a big expression)
1507+
- T: "inni" # phrase('inside' a big expression)
15091508
- pause: medium
15101509
- test:
15111510
- if: "$NavMode='Enhanced' and parent::*[self::m:mrow and (IsBracketed(., '(', ')', false) or IsBracketed(., '[', ']', false))]"

0 commit comments

Comments
 (0)