Skip to content

Commit 0416939

Browse files
Some changes to be up to date with English
- Changed last else statement of the rule "literal, [msup, msubsup]". - Added the rule "power-indexed-by". - Changed from spell to SPELL - Add # audit-ignore to rules that differs from English, but are reviewed.
1 parent 8483622 commit 0416939

1 file changed

Lines changed: 21 additions & 8 deletions

File tree

‎Rules/Languages/nb/SharedRules/default.yaml‎

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
- if: "string-length(.) = 1 and text() != '_'" # need unicode.tdl to kick in for single letter tokens
6161
then: [x: "text()"]
6262
- else_if: "@data-chem-element" # NavMode=Character needs this
63-
then: [spell: "text()", pause: "short"]
63+
then: [SPELL: "text()", pause: "short"]
6464
else: [x: "translate(., '-_\u00A0', ' ')"] # from intent literals or from extra spaces added (which get deleted)
6565

6666
- name: default
@@ -91,7 +91,7 @@
9191
- x: "*[2]"
9292
- pause: short
9393

94-
- name: literal-default
94+
- name: literal-default # audit-ignore
9595
tag: mfrac
9696
match: "."
9797
replace:
@@ -110,10 +110,9 @@
110110
- T: "slutt brøk" # phrase("start of fraction x over y 'end over'")
111111
- pause: medium
112112

113-
114113
# not sure what really should be said for these since we should not assume they are square roots
115114
#NORWEGIAN: Removed test for verbosity
116-
- name: literal-default
115+
- name: literal-default # audit-ignore
117116
tag: msqrt
118117
match: "."
119118
replace:
@@ -126,7 +125,7 @@
126125

127126
# not sure what really should be said for these since we should not assume they are square roots
128127
# NORWEGIAN: Changed to "med grad", and changed the order of the index and the variable/number in the root. Removed test for verbosity.
129-
- name: literal-default
128+
- name: literal-default # audit-ignore
130129
tag: mroot
131130
match: "."
132131
replace:
@@ -145,6 +144,7 @@
145144
then: [T: "slutt rottegn"] # phrase("root of x 'end root symbol'")
146145

147146

147+
# Used for expressions where the subscript is an integer, and verbosity is terse.
148148
- name: simple-sub
149149
tag: indexed-by
150150
# invisible comma -- want "x 1 when subscript is an integer"
@@ -154,9 +154,11 @@
154154
- x: "*[2]"
155155
- pause: short
156156

157+
158+
# Used for expression where the subscript is a leaf or and mrow where the second element is a comma.
157159
# NORWEGIAN: Removed the following test: if: "$Verbosity!='Terse' or not(*[2][self::m:mn])", which is in the Swedish translation.
158160
# NORWEGIAN: Added "pause: short" before "senket"
159-
- name: no-end-sub
161+
- name: no-end-sub # audit-ignore
160162
tag: indexed-by
161163
# invisible comma -- want "x 1 when subscript is an integer"
162164
match: "count(*)=2 and (IsNode(*[2], 'leaf') or *[2][self::m:mrow][*[2][.='⁣']])" #NORWEGIAN: Don't change this to English version. Then the rule "indexed-by" in definitions.yaml kicks in instead. Want to keep the pause before "senket".
@@ -166,6 +168,15 @@
166168
- T: "senket"
167169
- x: "*[2]"
168170
- pause: short
171+
172+
- name: power-indexed-by
173+
tag: power-indexed-by
174+
match: "."
175+
replace:
176+
- x: "*[1]"
177+
- T: "senket" # phrase(x 'sub' 2)
178+
- x: "*[2]"
179+
- pause: short
169180

170181
- name: literal
171182
tag: msub
@@ -177,6 +188,7 @@
177188
then: [T: "senket"] # phrase(x 'sub' 2)
178189
- x: "*[2]"
179190

191+
# Norwegian: Changed this to be more similar to the English rule. Can't find a way to trigger the last "else" statement.
180192
- name: literal
181193
tag: [msup, msubsup]
182194
match: "."
@@ -199,9 +211,10 @@
199211
if: "not(IsNode(*[last()], 'simple'))"
200212
then: [T: "slutt hevet"] # phrase(x super 2 'end of super')
201213
else:
202-
- T: "opphøyd i" # phrase(5 'raised to the' second power equals 25)
214+
- T: "hevet" # phrase(5 'raised to the' second power equals 25)
203215
- x: "*[last()]"
204-
# - t: "power" # phrase(5 raised to the second 'power' equals 25)
216+
- T: "slutt hevet"
217+
205218

206219
#NORWEGIAN: Changed to English version.
207220
- name: default

0 commit comments

Comments
 (0)