gimp doesn't like filenames with spaces in them, so added sanitize_filename to escape them. Updated gimp.po to reflect the changed line numbers.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user