From d3e15065d2758900cb2a7567ccff7477be12b3e8 Mon Sep 17 00:00:00 2001 From: Bill Ferguson Date: Tue, 28 Apr 2026 22:35:54 -0400 Subject: [PATCH 1/2] official/extract_burst_roll_images - fix string length --- official/extract_burst_roll_images.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/official/extract_burst_roll_images.lua b/official/extract_burst_roll_images.lua index cfb9e64..90871b9 100644 --- a/official/extract_burst_roll_images.lua +++ b/official/extract_burst_roll_images.lua @@ -296,7 +296,7 @@ local function group_extracted_dngs(image) local p = io.popen(cmd) if p then for line in p:lines() do - if line:length() > 5 then -- skip blank lines created by forfiles + if line:len() > 5 then -- skip blank lines created by forfiles local dng_image = dt.database.import(line) dng_image:group_with(image) count = count + 1 From 30e6b9459abe4b09db9ad82af927f9b51feaee84 Mon Sep 17 00:00:00 2001 From: Bill Ferguson Date: Tue, 28 Apr 2026 22:36:45 -0400 Subject: [PATCH 2/2] official scripts - clean up translations --- official/group_persistence.lua | 4 ++-- official/regenerate_thumbnails.lua | 8 ++++---- official/scheduler.lua | 5 +++-- official/select_raw_non_raw.lua | 30 +++++++++++++++--------------- official/select_unaltered.lua | 2 +- official/selection2collection.lua | 2 +- official/selection_to_pdf.lua | 10 +++++----- 7 files changed, 31 insertions(+), 30 deletions(-) diff --git a/official/group_persistence.lua b/official/group_persistence.lua index f95aed5..3d79c4c 100644 --- a/official/group_persistence.lua +++ b/official/group_persistence.lua @@ -117,10 +117,10 @@ script_data.restart = nil -- how to restart the (lib) script after it' script_data.show = nil -- only required for libs since the destroy_method only hides them script_data.metadata = { - name = "group_persistence", -- name of script + name = _("group persistence"), -- name of script purpose = _("preserve groups between darktable instances"), -- purpose of script author = "Bill Ferguson ", -- your name and optionally e-mail address - help = "" -- URL to help/documentation + help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/group_persistence" -- URL to help/documentation } diff --git a/official/regenerate_thumbnails.lua b/official/regenerate_thumbnails.lua index ffe1daf..70062f9 100644 --- a/official/regenerate_thumbnails.lua +++ b/official/regenerate_thumbnails.lua @@ -76,10 +76,10 @@ script_data.restart = nil -- how to restart the (lib) script after it' script_data.show = nil -- only required for libs since the destroy_method only hides them script_data.metadata = { - name = _("regenerate_thumbnails"), -- visible name of script + name = _("regenerate thumbnails"), -- visible name of script purpose = _("regenerate mipmap cache for selected images"), -- purpose of script author = "Bill Ferguson ", -- your name and optionally e-mail address - help = "https://docs.darktable.org/lua/development/lua.scripts.manual/scripts/official/regenerate_thumbnails" -- URL to help/documentation + help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/regenerate_thumbnails" -- URL to help/documentation } @@ -173,7 +173,7 @@ local function generate_thumbnails(images) local has_job = false if #images > 50 then - rt.job = dt.gui.create_job("regenerating thumbnails", true, stop_job) + rt.job = dt.gui.create_job(_("regenerating thumbnails"), true, stop_job) has_job = true end @@ -243,7 +243,7 @@ dt.register_event(MODULE, "shortcut", if images then generate_thumbnails(images) end - end, "regenerate thumbnails" + end, _("regenerate thumbnails") ) dt.register_event(MODULE, "selection-changed", diff --git a/official/scheduler.lua b/official/scheduler.lua index f98c3b9..016cdfb 100644 --- a/official/scheduler.lua +++ b/official/scheduler.lua @@ -95,7 +95,7 @@ script_data.restart = nil -- how to restart the (lib) script after it' script_data.show = nil -- only required for libs since the destroy_method only hides them script_data.metadata = { - name = "scheduler", -- name of script + name = _("scheduler"), -- name of script purpose = _("provide scheduler services for multitasking"), -- purpose of script author = "Bill Ferguson ", -- your name and optionally e-mail address help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/scheduler/" -- URL to help/documentation @@ -126,7 +126,8 @@ scheduler.log_level = log.debug -- P R E F E R E N C E S -- - - - - - - - - - - - - - - - - - - - - - - - -dt.preferences.register(MODULE, "target_time_slice_seconds", "float", "scheduler preferred time slice", "target time slice before interrupt", 1.0, 0.1, 1.0, 0.1) +dt.preferences.register(MODULE, "target_time_slice_seconds", "float", + _("scheduler preferred time slice"), _("target time slice before interrupt"), 1.0, 0.1, 1.0, 0.1) -- - - - - - - - - - - - - - - - - - - - - - - - -- A L I A S E S diff --git a/official/select_raw_non_raw.lua b/official/select_raw_non_raw.lua index b73e423..eba5f3d 100644 --- a/official/select_raw_non_raw.lua +++ b/official/select_raw_non_raw.lua @@ -88,7 +88,7 @@ script_data.restart = nil -- how to restart the (lib) script after it' script_data.show = nil -- only required for libs since the destroy_method only hides them script_data.metadata = { - name = "select_raw_non_raw", -- name of script + name = _("select raw/non-raw"), -- name of script purpose = _("select raw or non raw files from collection"), -- purpose of script author = "Bill Ferguson ", -- your name and optionally e-mail address help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/select_raw_non_raw" -- URL to help/documentation @@ -126,27 +126,27 @@ local namespace = select_group_followers -- - - - - - - - - - - - - - - - - - - - - - - - local function select_raw_files(event, images) - local raws = {} + local raws = {} - for _, img in ipairs(images) do - if img.is_raw then - table.insert(raws, img) - end + for _, img in ipairs(images) do + if img.is_raw then + table.insert(raws, img) end + end - return raws + return raws end local function select_non_raw_files(event, images) - local non_raws = {} + local non_raws = {} - for _, img in ipairs(images) do - if not img.is_raw then - table.insert(non_raws, img) - end + for _, img in ipairs(images) do + if not img.is_raw then + table.insert(non_raws, img) end + end - return non_raws + return non_raws end -- - - - - - - - - - - - - - - - - - - - - - - - @@ -158,8 +158,8 @@ end -- - - - - - - - - - - - - - - - - - - - - - - - dt.gui.libs.select.register_selection(MODULE .. "_raws", _("select raw"), select_raw_files, _("select raw files")) -dt.gui.libs.select.register_selection(MODULE .. "_non_raws", _("select non raw"), select_non_raw_files, - _("select non raw files")) +dt.gui.libs.select.register_selection(MODULE .. "_non_raws", _("select non-raw"), select_non_raw_files, + _("select non-raw files")) -- - - - - - - - - - - - - - - - - - - - - - - - -- D A R K T A B L E I N T E G R A T I O N diff --git a/official/select_unaltered.lua b/official/select_unaltered.lua index e7ff098..cec6e32 100644 --- a/official/select_unaltered.lua +++ b/official/select_unaltered.lua @@ -75,7 +75,7 @@ script_data.restart = nil -- how to restart the (lib) script after it' script_data.show = nil -- only required for libs since the destroy_method only hides them script_data.metadata = { - name = _("select_unaltered"), -- visible name of script + name = _("select unaltered"), -- visible name of script purpose = _("select images that have not been altered in any way"), -- purpose of script author = "Bill Ferguson ", -- your name and optionally e-mail address help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/select_unaltered/" -- URL to help/documentation diff --git a/official/selection2collection.lua b/official/selection2collection.lua index dc70eba..6e27285 100644 --- a/official/selection2collection.lua +++ b/official/selection2collection.lua @@ -91,7 +91,7 @@ script_data.restart = nil -- how to restart the (lib) script after it' script_data.show = nil -- only required for libs since the destroy_method only hides them script_data.metadata = { - name = _("selection2collection"), -- visible name of script + name = _("selection to collection"), -- visible name of script purpose = _("create a temporary collection from a selection"), -- purpose of script author = "Bill Ferguson ", -- your name and optionally e-mail address help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/selection2collection/" -- URL to help/documentation diff --git a/official/selection_to_pdf.lua b/official/selection_to_pdf.lua index a879cbf..5b4f27c 100644 --- a/official/selection_to_pdf.lua +++ b/official/selection_to_pdf.lua @@ -54,7 +54,7 @@ local script_data = {} script_data.metadata = { name = _("selection to PDF"), - purpose = _("generate a pdf file of selected images"), + purpose = _("generate a PDF file of selected images"), author = "Jérémy Rosen & Pascal Obry", help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/selection_to_pdf" } @@ -66,8 +66,8 @@ script_data.show = nil -- only required for libs since the destroy_method only h dt.preferences.register ("selection_to_pdf","Open with","string", - _("a pdf viewer"), - _("can be an absolute pathname or the tool may be in the PATH\nif not specified the system default will be used to open the pdf"), + _("a PDF viewer"), + _("can be an absolute pathname or the tool may be in the PATH\nif not specified the system default will be used to open the PDF"), "") local title_widget = dt.new_widget("entry") { @@ -134,7 +134,7 @@ local function destroy() dt.print_log("done destroying") end -dt.register_storage("export_pdf", _("export thumbnails to pdf"), +dt.register_storage("export_pdf", _("export thumbnails to PDF"), nil, function(storage,image_table) local my_title = title_widget.text @@ -200,7 +200,7 @@ dt.register_storage("export_pdf", _("export thumbnails to pdf"), command = command .. " " .. pdffile local result = dt.control.execute(command) if result ~= 0 then - dt.print(_("problem running pdf viewer")) -- this one is probably usefull to the user + dt.print(_("problem running PDF viewer")) -- this one is probably usefull to the user error("Problem running "..command) end