From 277afe074bfe6ed073975a567f4ab731cb5fca93 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Wed, 14 Jan 2026 12:42:36 +0100 Subject: [PATCH] [Editor] Handle spaces in paths when generating translations --- editor/editor_builders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor_builders.py b/editor/editor_builders.py index c7d04d0602c..26f871ac6ba 100644 --- a/editor/editor_builders.py +++ b/editor/editor_builders.py @@ -85,7 +85,7 @@ def make_translations(target, source, env): # msgfmt erases non-translated messages, so avoid using it if exporting the POT. if msgfmt and name != category: mo_path = os.path.join(tempfile.gettempdir(), uuid.uuid4().hex + ".mo") - cmd = f"{msgfmt} {path} --no-hash -o {mo_path}" + cmd = f'{msgfmt} "{path}" --no-hash -o "{mo_path}"' try: subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).communicate() buffer = methods.get_buffer(mo_path)