|
60 | 60 | - if: "string-length(.) = 1 and text() != '_'" # need unicode.tdl to kick in for single letter tokens |
61 | 61 | then: [x: "text()"] |
62 | 62 | - else_if: "@data-chem-element" # NavMode=Character needs this |
63 | | - then: [spell: "text()", pause: "short"] |
| 63 | + then: [SPELL: "text()", pause: "short"] |
64 | 64 | else: [x: "translate(., '-_\u00A0', ' ')"] # from intent literals or from extra spaces added (which get deleted) |
65 | 65 |
|
66 | 66 | - name: default |
|
91 | 91 | - x: "*[2]" |
92 | 92 | - pause: short |
93 | 93 |
|
94 | | -- name: literal-default |
| 94 | +- name: literal-default # audit-ignore |
95 | 95 | tag: mfrac |
96 | 96 | match: "." |
97 | 97 | replace: |
|
110 | 110 | - T: "slutt brøk" # phrase("start of fraction x over y 'end over'") |
111 | 111 | - pause: medium |
112 | 112 |
|
113 | | - |
114 | 113 | # not sure what really should be said for these since we should not assume they are square roots |
115 | 114 | #NORWEGIAN: Removed test for verbosity |
116 | | -- name: literal-default |
| 115 | +- name: literal-default # audit-ignore |
117 | 116 | tag: msqrt |
118 | 117 | match: "." |
119 | 118 | replace: |
|
126 | 125 |
|
127 | 126 | # not sure what really should be said for these since we should not assume they are square roots |
128 | 127 | # 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 |
130 | 129 | tag: mroot |
131 | 130 | match: "." |
132 | 131 | replace: |
|
145 | 144 | then: [T: "slutt rottegn"] # phrase("root of x 'end root symbol'") |
146 | 145 |
|
147 | 146 |
|
| 147 | +# Used for expressions where the subscript is an integer, and verbosity is terse. |
148 | 148 | - name: simple-sub |
149 | 149 | tag: indexed-by |
150 | 150 | # invisible comma -- want "x 1 when subscript is an integer" |
|
154 | 154 | - x: "*[2]" |
155 | 155 | - pause: short |
156 | 156 |
|
| 157 | + |
| 158 | +# Used for expression where the subscript is a leaf or and mrow where the second element is a comma. |
157 | 159 | # NORWEGIAN: Removed the following test: if: "$Verbosity!='Terse' or not(*[2][self::m:mn])", which is in the Swedish translation. |
158 | 160 | # NORWEGIAN: Added "pause: short" before "senket" |
159 | | -- name: no-end-sub |
| 161 | +- name: no-end-sub # audit-ignore |
160 | 162 | tag: indexed-by |
161 | 163 | # invisible comma -- want "x 1 when subscript is an integer" |
162 | 164 | 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 | 168 | - T: "senket" |
167 | 169 | - x: "*[2]" |
168 | 170 | - 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 |
169 | 180 |
|
170 | 181 | - name: literal |
171 | 182 | tag: msub |
|
177 | 188 | then: [T: "senket"] # phrase(x 'sub' 2) |
178 | 189 | - x: "*[2]" |
179 | 190 |
|
| 191 | +# Norwegian: Changed this to be more similar to the English rule. Can't find a way to trigger the last "else" statement. |
180 | 192 | - name: literal |
181 | 193 | tag: [msup, msubsup] |
182 | 194 | match: "." |
|
199 | 211 | if: "not(IsNode(*[last()], 'simple'))" |
200 | 212 | then: [T: "slutt hevet"] # phrase(x super 2 'end of super') |
201 | 213 | 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) |
203 | 215 | - x: "*[last()]" |
204 | | - # - t: "power" # phrase(5 raised to the second 'power' equals 25) |
| 216 | + - T: "slutt hevet" |
| 217 | + |
205 | 218 |
|
206 | 219 | #NORWEGIAN: Changed to English version. |
207 | 220 | - name: default |
|
0 commit comments