diff --git a/contrib/AutoGrouper.lua b/contrib/AutoGrouper.lua index 90f65db..72654ae 100644 --- a/contrib/AutoGrouper.lua +++ b/contrib/AutoGrouper.lua @@ -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) diff --git a/contrib/CollectHelper.lua b/contrib/CollectHelper.lua index ca76d85..f06b14e 100644 --- a/contrib/CollectHelper.lua +++ b/contrib/CollectHelper.lua @@ -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 diff --git a/contrib/auto_snapshot.lua b/contrib/auto_snapshot.lua index f42631f..3b88341 100644 --- a/contrib/auto_snapshot.lua +++ b/contrib/auto_snapshot.lua @@ -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 ", -- 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 diff --git a/contrib/autostyle.lua b/contrib/autostyle.lua index 336e6f7..46b14ca 100644 --- a/contrib/autostyle.lua +++ b/contrib/autostyle.lua @@ -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) diff --git a/contrib/change_group_leader.lua b/contrib/change_group_leader.lua index 11522cb..e7f424b 100644 --- a/contrib/change_group_leader.lua +++ b/contrib/change_group_leader.lua @@ -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 diff --git a/contrib/clear_GPS.lua b/contrib/clear_GPS.lua index f90d8b8..8c59166 100644 --- a/contrib/clear_GPS.lua +++ b/contrib/clear_GPS.lua @@ -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 diff --git a/contrib/color_profile_manager.lua b/contrib/color_profile_manager.lua index 52fc38c..6114992 100644 --- a/contrib/color_profile_manager.lua +++ b/contrib/color_profile_manager.lua @@ -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 diff --git a/contrib/copy_attach_detach_tags.lua b/contrib/copy_attach_detach_tags.lua index 6d6c470..2b66bc7 100644 --- a/contrib/copy_attach_detach_tags.lua +++ b/contrib/copy_attach_detach_tags.lua @@ -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 diff --git a/contrib/cr2hdr.lua b/contrib/cr2hdr.lua index a091a8f..209287c 100644 --- a/contrib/cr2hdr.lua +++ b/contrib/cr2hdr.lua @@ -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 diff --git a/contrib/cycle_group_leader.lua b/contrib/cycle_group_leader.lua index 30ed0b8..665f0c0 100644 --- a/contrib/cycle_group_leader.lua +++ b/contrib/cycle_group_leader.lua @@ -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 diff --git a/contrib/dbmaint.lua b/contrib/dbmaint.lua index 70454ff..8d24f1d 100644 --- a/contrib/dbmaint.lua +++ b/contrib/dbmaint.lua @@ -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, diff --git a/contrib/enfuseAdvanced.lua b/contrib/enfuseAdvanced.lua index b5ec586..b35cb49 100644 --- a/contrib/enfuseAdvanced.lua +++ b/contrib/enfuseAdvanced.lua @@ -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, diff --git a/contrib/exportLUT.lua b/contrib/exportLUT.lua index be904cd..8085456 100644 --- a/contrib/exportLUT.lua +++ b/contrib/exportLUT.lua @@ -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 diff --git a/contrib/ext_editor.lua b/contrib/ext_editor.lua index 592550b..0cee945 100644 --- a/contrib/ext_editor.lua +++ b/contrib/ext_editor.lua @@ -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 diff --git a/contrib/face_recognition.lua b/contrib/face_recognition.lua index 0f6183b..74827f1 100644 --- a/contrib/face_recognition.lua +++ b/contrib/face_recognition.lua @@ -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 diff --git a/contrib/fujifilm_dynamic_range.lua b/contrib/fujifilm_dynamic_range.lua index 6116d35..7bb6ab5 100644 --- a/contrib/fujifilm_dynamic_range.lua +++ b/contrib/fujifilm_dynamic_range.lua @@ -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 diff --git a/contrib/fujifilm_ratings.lua b/contrib/fujifilm_ratings.lua index 049e3c2..c9a034d 100644 --- a/contrib/fujifilm_ratings.lua +++ b/contrib/fujifilm_ratings.lua @@ -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))