diff --git a/blueprintcompiler/language/gtk_scale.py b/blueprintcompiler/language/gtk_scale.py index 1fd5ac3..77166b8 100644 --- a/blueprintcompiler/language/gtk_scale.py +++ b/blueprintcompiler/language/gtk_scale.py @@ -167,8 +167,11 @@ def decompile_mark( comments=None, context=None, ): + comments, translatable = decompile_translatable( + cdata, translatable, context, comments + ) if comments is not None: - ctx.print(f"/* Translators: {comments} */") + ctx.print(comments) text = f"mark ({value}" @@ -177,10 +180,7 @@ def decompile_mark( elif cdata: text += f", bottom" - if truthy(translatable): - comments, translatable = decompile_translatable( - cdata, translatable, context, comments - ) + if cdata: text += f", {translatable}" text += ")," diff --git a/tests/samples/scale_marks.blp b/tests/samples/scale_marks.blp index a766cfa..7b0c573 100644 --- a/tests/samples/scale_marks.blp +++ b/tests/samples/scale_marks.blp @@ -4,6 +4,7 @@ Scale { marks [ mark (-1, bottom), mark (0, top, _("Hello, world!")), + mark (1, bottom, "1"), mark (2), ] } diff --git a/tests/samples/scale_marks.ui b/tests/samples/scale_marks.ui index c08afb4..f50443a 100644 --- a/tests/samples/scale_marks.ui +++ b/tests/samples/scale_marks.ui @@ -10,6 +10,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler. Hello, world! + 1