updated script_manager and executable_manager to use darktable
translation facilities. Changed translatable messages with arguments to use string.format for one complete string versus snippets. Removed gen_i18n_mo since we will be using darktable's translation facilities and there's no need to generate lua specific mo files.
This commit is contained in:
@@ -45,9 +45,7 @@ script_data.show = nil -- only required for libs since the destroy_method only h
|
||||
|
||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||
|
||||
local gettext = dt.gettext
|
||||
|
||||
gettext.bindtextdomain("executable_manager",dt.configuration.config_dir.."/lua/locale/")
|
||||
local gettext = dt.gettext.gettext
|
||||
|
||||
local exec_man = {} -- our own namespace
|
||||
exec_man.module_installed = false
|
||||
@@ -58,7 +56,7 @@ exec_man.event_registered = false
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
local function _(msg)
|
||||
return gettext.dgettext("executable_manager", msg)
|
||||
return gettext(msg)
|
||||
end
|
||||
|
||||
local function grep(file, pattern)
|
||||
@@ -167,7 +165,7 @@ for i,exec in ipairs(exec_table) do
|
||||
editable = false
|
||||
}
|
||||
executable_path_widgets[exec] = dt.new_widget("file_chooser_button"){
|
||||
title = _("select ") .. exec .. _(" executable"),
|
||||
title = _(string.format("select %s executable", exec)),
|
||||
value = df.get_executable_path_preference(exec),
|
||||
is_directory = false,
|
||||
changed_callback = function(self)
|
||||
@@ -210,7 +208,7 @@ for i,exec in ipairs(exec_table) do
|
||||
dt.new_widget("section_label"){label = _("reset")},
|
||||
dt.new_widget("button"){
|
||||
label = _("clear"),
|
||||
tooltip = _("Clear path for ") .. exec,
|
||||
tooltip = _(string.format("Clear path for %s", exec)),
|
||||
clicked_callback = function()
|
||||
df.set_executable_path_preference(exec, "")
|
||||
executable_path_widgets[exec].value = ""
|
||||
|
||||
Reference in New Issue
Block a user