updated example scripts to use darktable translation facilities

This commit is contained in:
Bill Ferguson
2024-01-19 18:57:18 -05:00
parent f9fe33f930
commit c11845cbf9
11 changed files with 87 additions and 58 deletions

View File

@@ -23,6 +23,14 @@ USAGE
]]
local dt = require "darktable"
-- translation facilities
local gettext = dt.gettext.gettext
local function _(msg)
return gettext(msg)
end
-- script_manager integration to allow a script to be removed
-- without restarting darktable
local function destroy()
@@ -30,7 +38,8 @@ local function destroy()
end
local result = dt.configuration.api_version_string
dt.print_error("API Version: "..result)
dt.print_log("API Version: " .. result)
dt.print(string.format(_("API Version: %s"), result))
-- set the destroy routine so that script_manager can call it when
-- it's time to destroy the script and then return the data to