From d4c2bb34ebc8de7685f5b45352ca2d6f559d76d4 Mon Sep 17 00:00:00 2001 From: James Westman Date: Tue, 2 May 2023 09:35:38 -0500 Subject: [PATCH] Remove trailing commas in Translated --- blueprintcompiler/language/values.py | 3 +-- docs/reference/values.rst | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/blueprintcompiler/language/values.py b/blueprintcompiler/language/values.py index 3204694..626a337 100644 --- a/blueprintcompiler/language/values.py +++ b/blueprintcompiler/language/values.py @@ -27,14 +27,13 @@ from .contexts import ScopeCtx, ValueTypeCtx class Translated(AstNode): grammar = AnyOf( - ["_", "(", UseQuoted("string"), Optional(","), ")"], + ["_", "(", UseQuoted("string"), ")"], [ "C_", "(", UseQuoted("context"), ",", UseQuoted("string"), - Optional(","), ")", ], ) diff --git a/docs/reference/values.rst b/docs/reference/values.rst index 6a0499c..180baf3 100644 --- a/docs/reference/values.rst +++ b/docs/reference/values.rst @@ -80,7 +80,7 @@ Translated Strings .. rst-class:: grammar-block - Translated = ( '_' '(' `> ','? ')' ) | ( '\C_' '(' `> ',' `> ','? ')' ) + Translated = ( '_' '(' `> ')' ) | ( '\C_' '(' `> ',' `> ')' ) Use ``_("...")`` to mark strings as translatable. You can put a comment for translators on the line above if needed.