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:
Bill Ferguson
2016-04-16 21:44:24 -04:00
parent 3dcb08cca3
commit 457731700c
2 changed files with 15 additions and 4 deletions

View File

@@ -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"

View File

@@ -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