Support translation contexts

This commit is contained in:
James Westman 2021-11-24 21:12:26 -06:00
parent b0a8f3e2f5
commit 0e33ce190d
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
6 changed files with 55 additions and 31 deletions

View file

@ -60,11 +60,22 @@ flags_value = Group(
translated_string = Group(
ast.TranslatedStringValue,
Sequence(
Keyword("_"),
OpenParen(),
UseQuoted("value").expected("a quoted string"),
CloseParen().expected("`)`"),
AnyOf(
Sequence(
Keyword("_"),
OpenParen(),
UseQuoted("value").expected("a quoted string"),
CloseParen().expected("`)`"),
),
Sequence(
Keyword("C_"),
OpenParen(),
UseQuoted("context").expected("a quoted string"),
Comma(),
UseQuoted("value").expected("a quoted string"),
Optional(Comma()),
CloseParen().expected("`)`"),
),
),
)