The majority of the error checking can now be delegated to routines
like parse_f32(), parse_negative_i32() and so on, instead of creating
specific error messages for each type.
- use markdown instead of HTML, to make editing and translating easier
- use a shared prefix
- a few very minor wording tweaks
- we don't need to translate undocumented command errors
- share a string for positive number of days
- share a string for invalid property and state arguments, and avoid
listing them out
Related discussion: https://github.com/ankitects/anki/pull/922
https://github.com/ankitects/anki/pull/889
- We can't use compare_locales's getChecker(), as it seems to
be focused on checking translations rather than the original
templates.
- Also fix return code not being passed on in check_files()
- Temporarily pin pip-tools, as its output format has changed
More than {{ is acceptable to start a tag, which means that `{{{Foo}}` won't be interpreted as "the content of `Foo`"
and should be rejected. For the sake of clarity and parsing, I suspect that those symbol should be rejected elsewhere
too.
Similary `{{Foo}}}` won't be interpreted as "Show the content of field `Foo}`" even if this field exists, so it's better
to reject `}`. It's clearly necessary to reject "}}" inside the field name, rejecting "}" seems easier to explain and
avoid future unexpected problem if the templates change.
The ":" are used to separate filters, and rejecting it in field name would ensure that there is no ambiguity.