Merge pull request #516 from wpferguson/contrib_a_to_f

contrib/[a-f]*.lua - fixed translatable strings to prepare for darktable translation
This commit is contained in:
wpferguson
2024-09-16 20:06:38 -04:00
committed by GitHub
17 changed files with 23 additions and 54 deletions

View File

@@ -44,7 +44,6 @@ du.check_min_api_version("7.0.0", "AutoGrouper")
local MOD = 'autogrouper'
local gettext = dt.gettext
gettext.bindtextdomain(MOD, dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext.gettext(msgid)

View File

@@ -53,8 +53,6 @@ local all_active = false
du.check_min_api_version("7.0.0", "CollectHelper")
dt.gettext.bindtextdomain("CollectHelper", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end
@@ -239,7 +237,7 @@ end
dt.preferences.register("module_CollectHelper", "all_and", -- name
"bool", -- type
_('CollectHelper: all'), -- label
_('will create a collect parameter set that utilizes all enabled CollectHelper types (and)'), -- tooltip
_('creates a collect parameter set that utilizes all enabled CollectHelper types (and)'), -- tooltip
true -- default
)
dt.preferences.register("module_CollectHelper", "colors", -- name

View File

@@ -59,8 +59,6 @@ du.check_min_api_version("7.0.0", MODULE) -- choose the minimum version that c
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain(MODULE , dt.configuration.config_dir .. "/lua/locale/")
local function _(msgid)
return gettext(MODULE, msgid)
end
@@ -81,7 +79,7 @@ script_data.metadata = {
name = "auto_snapshot", -- name of script
purpose = _("automatically take a snapshot when an image is loaded in darkroom"), -- purpose of script
author = "Bill Ferguson <wpferguson@gamil.com>", -- your name and optionally e-mail address
help = "" -- URL to help/documentation
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/auto_snapshot/" -- URL to help/documentation
}
@@ -101,8 +99,8 @@ local auto_snapshot = {}
-- P R E F E R E N C E S
-- - - - - - - - - - - - - - - - - - - - - - - -
dt.preferences.register(MODULE, "always_create_snapshot", "bool", "always automatically create_snapshot",
"auto_snapshot - create a snapshot even if the image is altered", false)
dt.preferences.register(MODULE, "always_create_snapshot", "bool", "auto_snapshot - " .. _("always automatically create_snapshot"),
_("create a snapshot even if the image is altered"), false)
-- - - - - - - - - - - - - - - - - - - - - - - -
-- D A R K T A B L E I N T E G R A T I O N

View File

@@ -44,7 +44,6 @@ local syslib = require "lib/dtutils.system"
du.check_min_api_version("7.0.0", "autostyle")
local gettext = darktable.gettext.gettext
darktable.gettext.bindtextdomain("autostyle", darktable.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)

View File

@@ -40,8 +40,6 @@ local gettext = dt.gettext.gettext
local MODULE = "change_group_leader"
dt.gettext.bindtextdomain(MODULE, dt.configuration.config_dir .."/lua/locale/")
du.check_min_api_version("3.0.0", MODULE)
local function _(msgid)
@@ -65,7 +63,7 @@ script_data.restart = nil -- how to restart the (lib) script after it's been hid
script_data.show = nil -- only required for libs since the destroy_method only hides them
-- create a namespace to contain persistent data and widgets
chg_grp_ldr = {}
local chg_grp_ldr = {}
local cgl = chg_grp_ldr
@@ -82,7 +80,7 @@ local function install_module()
if not cgl.module_installed then
dt.register_lib(
MODULE, -- Module name
_("change_group_leader"), -- Visible name
_("change group leader"), -- Visible name
true, -- expandable
false, -- resetable
{[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_RIGHT_CENTER", 700}}, -- containers

View File

@@ -40,7 +40,6 @@ local dt = require "darktable"
local du = require "lib/dtutils"
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("clear_GPS", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
@@ -92,7 +91,7 @@ dt.gui.libs.image.register_action(
dt.register_event(
"clear_GPS", "shortcut",
function(event, shortcut) clear_GPS(dt.gui.action_images) end,
_("clear GPS data")
_("clear GPS data from selected images")
)
return script_data

View File

@@ -55,8 +55,6 @@ du.check_min_api_version("7.0.0", "color_profile_manager")
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("color_profile_manager", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end

View File

@@ -44,8 +44,6 @@ local gettext = dt.gettext.gettext
du.check_min_api_version("7.0.0", "copy_attach_detach_tags")
dt.gettext.bindtextdomain("copy_attach_detach_tags", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end

View File

@@ -39,8 +39,6 @@ du.check_min_api_version("7.0.0", "cr2hdr")
local gettext = darktable.gettext.gettext
darktable.gettext.bindtextdomain("cr2hdr", darktable.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end

View File

@@ -60,8 +60,6 @@ du.check_min_api_version("7.0.0", MODULE)
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("cycle_group_leader", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end
@@ -106,7 +104,7 @@ end
local function cycle_group_leader(image)
local group_images = image:get_group_members()
if #group_images < 2 then
hinter_msg(_("no images to cycle to in group"))
hinter_msg(_("no images to cycle through in group"))
return
else
local position = nil

View File

@@ -63,8 +63,6 @@ du.check_min_api_version("7.0.0", MODULE) -- choose the minimum version that c
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain(MODULE , dt.configuration.config_dir .. "/lua/locale/")
local function _(msgid)
return gettext(MODULE, msgid)
end
@@ -195,21 +193,21 @@ dbmaint.list_widget = dt.new_widget("text_view"){
}
dbmaint.chooser = dt.new_widget("combobox"){
label = "scan for",
label = _("scan for"),
selected = 1,
"film rolls", "images",
_("film rolls"), _("images"),
reset_callback = function(this)
this.selected = 1
end
}
dbmaint.scan_button = dt.new_widget("button"){
label = "scan",
tooltip = "click to scan for missing film rolls/files",
label = _("scan"),
tooltip = _("click to scan for missing film rolls/files"),
clicked_callback = function(this)
local found = nil
local found_text = ""
if dbmaint.chooser.value == "film rolls" then
if dbmaint.chooser.selected == 1 then -- film rolls
found = scan_film_rolls()
if #found > 0 then
for _, film in ipairs(found) do
@@ -238,11 +236,11 @@ dbmaint.scan_button = dt.new_widget("button"){
}
dbmaint.remove_button = dt.new_widget("button"){
label = "remove",
tooltip = "remove missing film rolls/images",
label = _("remove"),
tooltip = _("remove missing film rolls/images"),
sensitive = false,
clicked_callback = function(this)
if dbmaint.chooser.value == "film rolls" then
if dbmaint.chooser.selected == 1 then -- film rolls
remove_missing_film_rolls(dbmaint.found)
else
remove_missing_images(dbmaint.found)
@@ -258,7 +256,7 @@ dbmaint.remove_button = dt.new_widget("button"){
dbmaint.main_widget = dt.new_widget("box"){
orientation = "vertical",
dt.new_widget("section_label"){label = "missing items"},
dt.new_widget("section_label"){label = _("missing items")},
dbmaint.list_widget,
dt.new_widget("label"){label = ""},
dbmaint.chooser,

View File

@@ -70,8 +70,6 @@ du.check_min_api_version("7.0.0", "enfuseAdvanced")
-- Tell gettext where to find the .mo file translating messages for a particular domain
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("enfuseAdvanced", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end
@@ -445,7 +443,7 @@ local function main(storage, image_table, extra_data)
dt.print(_('too few images selected, please select at least 2 images'))
return
elseif extra_data[1] == 2 then
dt.print(_('installation error, please verify binary paths are proper'))
dt.print(_('installation error, please verify binary paths are correct'))
return
end
local images_to_remove = ''
@@ -956,7 +954,7 @@ if temp == '' then temp = nil end
GUI.Target.add_tags = dt.new_widget('entry'){
tooltip = _('additional tags to be added on import, seperate with commas, all spaces will be removed'),
text = temp,
placeholder = _('enter tags, seperated by commas'),
placeholder = _('enter tags, separated by commas'),
editable = true
}
temp = dt.preferences.read(mod, 'active_current_preset_ind', 'integer')
@@ -1023,7 +1021,7 @@ GUI.Presets.variants_type = dt.new_widget('combobox'){
GUI.Presets.variants_type.sensitive = GUI.Presets.variants.value
temp = df.get_executable_path_preference(AIS.name)
GUI.exes.align_image_stack = dt.new_widget('file_chooser_button'){
title = 'AIS binary path',
title = 'align_image_stack ' .. _('binary path'),
value = temp,
tooltip = temp,
is_directory = false,
@@ -1031,7 +1029,7 @@ GUI.exes.align_image_stack = dt.new_widget('file_chooser_button'){
}
temp = df.get_executable_path_preference(ENF.name)
GUI.exes.enfuse = dt.new_widget('file_chooser_button'){
title = 'enfuse binary path',
title = 'enfuse ' .. _('binary path'),
value = temp,
tooltip = temp,
is_directory = false,
@@ -1039,7 +1037,7 @@ GUI.exes.enfuse = dt.new_widget('file_chooser_button'){
}
temp = df.get_executable_path_preference(EXF.name)
GUI.exes.exiftool = dt.new_widget('file_chooser_button'){
title = 'Exiftool binary path',
title = 'exiftool ' .. _('binary path'),
value = temp,
tooltip = temp,
is_directory = false,

View File

@@ -35,8 +35,6 @@ du.check_min_api_version("7.0.0", "exportLUT")
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("exportLUT", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end

View File

@@ -78,8 +78,6 @@ du.check_min_api_version("7.0.0", MODULE_NAME)
-- translation
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("ext_editor", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end

View File

@@ -54,8 +54,6 @@ local OUTPUT = dt.configuration.tmp_dir .. PS .. "facerecognition.txt"
du.check_min_api_version("7.0.0", MODULE)
dt.gettext.bindtextdomain("face_recognition", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end

View File

@@ -65,8 +65,6 @@ local gettext = dt.gettext.gettext
du.check_min_api_version("7.0.0", "fujifilm_dynamic_range")
dt.gettext.bindtextdomain("fujifilm_dynamic_range", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end

View File

@@ -31,8 +31,6 @@ local gettext = dt.gettext.gettext
du.check_min_api_version("7.0.0", "fujifilm_ratings")
dt.gettext.bindtextdomain("fujifilm_ratings", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end
@@ -58,7 +56,7 @@ local function detect_rating(event, image)
return
end
if not df.check_if_bin_exists("exiftool") then
dt.print_error(_("exiftool not found"))
dt.print_error("exiftool not found")
return
end
local RAF_filename = df.sanitize_filename(tostring(image))