pyseeyou icon indicating copy to clipboard operation
pyseeyou copied to clipboard

escape sequences for message syntax are throwing an error

Open dagoltz opened this issue 5 years ago • 2 comments

File "/../my_file.py", line 103, in _process_message return format(actual_message, processed_params, _get_message_format_locale(locale_code)) File "/.../lib/python2.7/site-packages/pyseeyou/init.py", line 13, in format ast = ICUMessageFormat.parse(msg) File "/.../lib/python2.7/site-packages/parsimonious/grammar.py", line 115, in parse return self.default_rule.parse(text, pos=pos) File "/.../lib/python2.7/site-packages/parsimonious/expressions.py", line 122, in parse raise IncompleteParseError(text, node.end, self) IncompleteParseError: Rule 'message_format_pattern' matched in its entirety, but it didn't consume all the text. The non-matching portion of the text begins with '{n,}: in regular ex' (line 1, column 14).

String example: "Disallowed: \\{n,\\}: in regular expression"

This should be supported as described here:

Supports escape sequences for message syntax chars, e.g.: "\{foo\}" will output: "{foo}" in the formatted output instead of interpreting it as a foo argument.

dagoltz avatar Apr 30 '19 11:04 dagoltz