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

@@ -47,12 +47,10 @@ script_data.show = nil -- only required for libs since the destroy_method only h
-- translation
-- https://www.darktable.org/lua-api/index.html#darktable_gettext
local gettext = dt.gettext
gettext.bindtextdomain("moduleExample", dt.configuration.config_dir .. "/lua/locale/")
local gettext = dt.gettext.gettext
local function _(msgid)
return gettext.dgettext("moduleExample", msgid)
return gettext(msgid)
end
-- declare a local namespace and a couple of variables we'll need to install the module