mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Support translation contexts
This commit is contained in:
parent
b0a8f3e2f5
commit
0e33ce190d
6 changed files with 55 additions and 31 deletions
|
@ -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("`)`"),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue