updated contrib scripts to use darktable translation facilities

This commit is contained in:
Bill Ferguson
2024-01-20 20:22:32 -05:00
parent 37dba718a2
commit 66b33d6f48
41 changed files with 224 additions and 279 deletions

View File

@@ -35,7 +35,7 @@ USAGE
local dt = require "darktable"
local du = require "lib/dtutils"
local df = require "lib/dtutils.file"
local gettext = dt.gettext
local gettext = dt.gettext.gettext
du.check_min_api_version("7.0.0", "geoJSON_export")
@@ -48,11 +48,8 @@ script_data.destroy_method = nil -- set to hide for libs since we can't destroy
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
script_data.show = nil -- only required for libs since the destroy_method only hides them
-- Tell gettext where to find the .mo file translating messages for a particular domain
gettext.bindtextdomain("geoJSON_export",dt.configuration.config_dir.."/lua/locale/")
local function _(msgid)
return gettext.dgettext("geoJSON_export", msgid)
return gettext(msgid)
end
-- Sort a table