Finishes TeX Error localisation#1479
Conversation
dpvc
left a comment
There was a problem hiding this comment.
This all looks good, with one recommended change.
| let message = ''; | ||
| if (component) { | ||
| message = this.lookupMessage(component, id); |
There was a problem hiding this comment.
Since message is only used in the if (component) block, line 136 can be removed and line 138 can be made const message = ....
|
Looks like this needs to have |
| /** | ||
| * @override | ||
| */ | ||
| protected component = COMPONENT; | ||
|
|
There was a problem hiding this comment.
Is this still needed? I don't see where it is used.
|
Does this line MathJax-src/ts/input/tex/Tags.ts Line 699 in fcf47d9 need to be localized? And also this one? MathJax-src/ts/input/tex/MapHandler.ts Line 205 in fcf47d9 The first can be done through |
|
Here are a couple more: MathJax-src/ts/input/tex/bussproofs/BussproofsUtil.ts Lines 654 to 656 in fcf47d9 MathJax-src/ts/input/tex/Configuration.ts Line 441 in fcf47d9 |
dpvc
left a comment
There was a problem hiding this comment.
There are problems with the jsdoc comments, here.
| * @param {string | namedData = {}} data The first argument or the object of | ||
| * names arguments | ||
| * @param {string[]} ...args Additional arguments (if data is a string) | ||
| * @param {...any} args |
There was a problem hiding this comment.
The JSDoc comments are messed up, here. The = {} in the data argument should be removed, as should the ... in line 154. Line 155 should be removed entirely.
| * @param {string | namedData = {}} data The first argument or the object of | |
| * names arguments | |
| * @param {string[]} ...args Additional arguments (if data is a string) | |
| * @param {...any} args | |
| * @param {string|namedData} data The first argument or the object of named arguments | |
| * @param {string[]} args Additional arguments (if data is a string) |
PR (nearly) finished the localisation of the
texmodule. In particular, iterrorsinBaseItemand subclasses now get theComponentstring andid.texErrorfunction that throws the localisedTexError. This way we do not have a breaking change.texErrorgets typenever, which is needed to avoid typescript errors, but which makes it a bit awkward to test.Finally, the only point still to be discusses is how to deal with the
getPackageerrors, in particular since there is also a warning. Should we make the Error a TexError and localise the warning?Note, that I have added
copyblocks to all the necessaryconfig.jsonfiles in the components. Once PR #1476 hits develop I will merge that in and resolve the conflicts.