diff --git a/contrib/de_DE/LC_MESSAGES/gimp.po b/contrib/de_DE/LC_MESSAGES/gimp.po index 5c90119..8b6dcbf 100644 --- a/contrib/de_DE/LC_MESSAGES/gimp.po +++ b/contrib/de_DE/LC_MESSAGES/gimp.po @@ -21,19 +21,19 @@ msgstr "" "dngettext:2,3\n" "X-Poedit-Basepath: .\n" -#: gimp.lua:179 +#: gimp.lua:189 #, lua-format msgid "Export Image %i/%i" msgstr "Exportiere Bild %i/%i" -#: gimp.lua:184 +#: gimp.lua:194 msgid "GIMP not found" msgstr "GIMP nicht gefunden" -#: gimp.lua:198 +#: gimp.lua:209 msgid "Launching GIMP..." msgstr "Starten von GIMP" -#: gimp.lua:243 +#: gimp.lua:254 msgid "Edit with GIMP" msgstr "Bearbeiten mit GIMP" diff --git a/contrib/gimp.lua b/contrib/gimp.lua index b66f60f..896fec3 100644 --- a/contrib/gimp.lua +++ b/contrib/gimp.lua @@ -174,6 +174,16 @@ local function groupIfNotMember(img, new_img) end end +local function sanitize_filename(filepath) + local path = get_path(filepath) + local basename = get_basename(filepath) + local filetype = get_filetype(filepath) + + local sanitized = string.gsub(basename, " ", "\\ ") + + return path .. sanitized .. "." .. filetype +end + local function show_status(storage, image, format, filename, number, total, high_quality, extra_data) dt.print(string.format(_("Export Image %i/%i"), number, total)) @@ -192,6 +202,7 @@ local function gimp_edit(storage, image_table, extra_data) --finalize img_list = "" for _,exp_img in pairs(image_table) do + exp_img = sanitize_filename(exp_img) img_list = img_list ..exp_img.. " " end