mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-06-21 23:19:24 -04:00
decompiler: Force newline before translator comments
The decompiler does not insert newlines and so relies on the formatter to format its output. The previous commit however broke translator comments, as they are now assumed to be inline. Therefore, make sure the decompiler forces a newline before a translator comment. We could special case such a comment in the formatter, but this might be difficult if #202 gets resolved, whereas in the decompiler we already know exactly when a comment is a translator comment.
This commit is contained in:
parent
ed867269dd
commit
dc71762c9c
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ def decompile_translatable(
|
|||
comments = ""
|
||||
else:
|
||||
comments = comments.replace("/*", " ").replace("*/", " ")
|
||||
comments = f"/* Translators: {comments} */"
|
||||
comments = f"\n/* Translators: {comments} */"
|
||||
|
||||
if context is not None:
|
||||
return comments, f"C_({escape_quote(context)}, {escape_quote(string)})"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue