Remove trailing commas in Translated

This commit is contained in:
James Westman 2023-05-02 09:35:38 -05:00
parent b08a0c0665
commit d4c2bb34eb
2 changed files with 2 additions and 3 deletions

View file

@ -27,14 +27,13 @@ from .contexts import ScopeCtx, ValueTypeCtx
class Translated(AstNode): class Translated(AstNode):
grammar = AnyOf( grammar = AnyOf(
["_", "(", UseQuoted("string"), Optional(","), ")"], ["_", "(", UseQuoted("string"), ")"],
[ [
"C_", "C_",
"(", "(",
UseQuoted("context"), UseQuoted("context"),
",", ",",
UseQuoted("string"), UseQuoted("string"),
Optional(","),
")", ")",
], ],
) )

View file

@ -80,7 +80,7 @@ Translated Strings
.. rst-class:: grammar-block .. rst-class:: grammar-block
Translated = ( '_' '(' <string::ref:`QUOTED<Syntax QUOTED>`> ','? ')' ) | ( '\C_' '(' <context::ref:`QUOTED<Syntax QUOTED>`> ',' <string::ref:`QUOTED<Syntax QUOTED>`> ','? ')' ) Translated = ( '_' '(' <string::ref:`QUOTED<Syntax QUOTED>`> ')' ) | ( '\C_' '(' <context::ref:`QUOTED<Syntax QUOTED>`> ',' <string::ref:`QUOTED<Syntax QUOTED>`> ')' )
Use ``_("...")`` to mark strings as translatable. You can put a comment for translators on the line above if needed. Use ``_("...")`` to mark strings as translatable. You can put a comment for translators on the line above if needed.