[pt] Improve behaviour of compound measurements #10600
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For measurements that include multiplication signs, our disambiguator is not adding an
ignore_spelling
flag, which results in stuff like this:From the speller dashboard:
Note that here they look like proper multiplication signs, but if you look at the regex and inspect the values, you'll see they are really just
x
. Probably the browser being clever when rendering stuff.This PR:
X_AS_MULTIPLICATION_SIGN_IGNORE
to the disambiguator (this the most important thing);MULTIPLICATION_SIGN
picky rule (to make sure thex
can properly be changed to a×
even before unspaced units);UNITS_OF_MEASURE_SPACING
picky rule (chapter 7,103 of 'our messages all sound likept-PT
).Note that, because of our current tokenisation logic, unit spacing will not be fixed for tokens like
500x500mm
. For it to work, one would first need to apply theMULTIPLICATION_SIGN
suggestion. (IMO that's probably fine, since these are picky rules. The most crucial thing here was no longer flagging stuff like5x5
and5x5mm
as spelling errors.)