Merge branch 'wip/velsinki/formatting-improve-comments' into 'main'

Improve comment formatting and Gtk.Scale fix

See merge request GNOME/blueprint-compiler!246
This commit is contained in:
Matthijs Velsink 2025-06-15 09:52:22 +00:00
commit f8849d9084
6 changed files with 22 additions and 18 deletions

View file

@ -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 += "),"