alias gettext to darktable.gettext.gettext then change the call to gettext
to only pass the message to be translated
This commit is contained in:
@@ -24,15 +24,12 @@ dtutils_file.libdoc = {
|
||||
functions = {}
|
||||
}
|
||||
|
||||
local gettext = dt.gettext
|
||||
local gettext = dt.gettext.gettext
|
||||
|
||||
du.check_min_api_version("5.0.0", "dtutils.file")
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("dtutils.file",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
local function _(msgid)
|
||||
return gettext.dgettext("dtutils.file", msgid)
|
||||
return gettext(msgid)
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
@@ -3,11 +3,12 @@ local dtutils_string = {}
|
||||
local dt = require "darktable"
|
||||
local du = require "lib/dtutils"
|
||||
local log = require "lib/dtutils.log"
|
||||
local gettext = dt.gettext.gettext
|
||||
|
||||
local DEFAULT_LOG_LEVEL = log.error
|
||||
|
||||
local function _(msg)
|
||||
return dt.gettext.gettext(msg)
|
||||
return gettext(msg)
|
||||
end
|
||||
|
||||
dtutils_string.log_level = DEFAULT_LOG_LEVEL
|
||||
|
||||
Reference in New Issue
Block a user