From 46e729b40e8e8fb0f9e4718679940a78a830bafb Mon Sep 17 00:00:00 2001 From: Bill Ferguson Date: Thu, 8 Aug 2024 19:43:33 -0400 Subject: [PATCH] fixed translatable strings for inclusion into darktable --- contrib/LabelsToTags.lua | 8 ++++---- contrib/change_group_leader.lua | 4 ++-- contrib/geoJSON_export.lua | 2 +- contrib/geoToolbox.lua | 6 +++--- contrib/image_time.lua | 2 +- contrib/rate_group.lua | 14 ++++++++------ contrib/transfer_hierarchy.lua | 4 ++-- examples/multi_os.lua | 2 +- tools/script_manager.lua | 4 ++-- 9 files changed, 24 insertions(+), 22 deletions(-) diff --git a/contrib/LabelsToTags.lua b/contrib/LabelsToTags.lua index 6046f9c3..1054a8b9 100644 --- a/contrib/LabelsToTags.lua +++ b/contrib/LabelsToTags.lua @@ -130,10 +130,10 @@ local initialAvailableMappings = { ["***+**"] = { _("blue") }, ["****+*"] = { _("purple") } }, [_("single colors")] = { ["+----*"] = { _("red"), _("only red") }, - ["-+---*"] = { _("Yellow"), _("only yellow") }, - ["--+--*"] = { _("Green"), _("only green") }, - ["---+-*"] = { _("Blue"), _("only blue") }, - ["----+*"] = { _("Purple"), _("only purple") } }, + ["-+---*"] = { _("yellow"), _("only yellow") }, + ["--+--*"] = { _("green"), _("only green") }, + ["---+-*"] = { _("blue"), _("only blue") }, + ["----+*"] = { _("purple"), _("only purple") } }, [_("ratings")] = { ["*****0"] = { _("no stars"), _("not rejected") }, ["*****1"] = { _("one star"), _("not rejected") }, ["*****2"] = { _("two stars"), _("not rejected") }, diff --git a/contrib/change_group_leader.lua b/contrib/change_group_leader.lua index 202f3f6e..11522cbd 100644 --- a/contrib/change_group_leader.lua +++ b/contrib/change_group_leader.lua @@ -127,7 +127,7 @@ end local function process_image_groups(images) if #images < 1 then - dt.print(_("o images selected")) + dt.print(_("no images selected")) dt.print_log(MODULE .. "no images seletected, returning...") else local mode = cgl.widgets.mode.value @@ -204,4 +204,4 @@ script_data.restart = restart script_data.destroy_method = "hide" script_data.show = restart -return script_data \ No newline at end of file +return script_data diff --git a/contrib/geoJSON_export.lua b/contrib/geoJSON_export.lua index 2ff30807..74625120 100644 --- a/contrib/geoJSON_export.lua +++ b/contrib/geoJSON_export.lua @@ -322,7 +322,7 @@ dt.preferences.register("geoJSON_export", "mapBoxKey", "string", _("geoJSON export: MapBox key"), - _("https://www.mapbox.com/studio/account/tokens"), + "https://www.mapbox.com/studio/account/tokens", '' ) dt.preferences.register("geoJSON_export", "OpengeoJSONFile", diff --git a/contrib/geoToolbox.lua b/contrib/geoToolbox.lua index 68fdc3c6..13a7b5bd 100644 --- a/contrib/geoToolbox.lua +++ b/contrib/geoToolbox.lua @@ -495,9 +495,9 @@ local function calc_distance() if (distance < 1) then distance = distance * 1000 - distanceUnit = _("m") + distanceUnit = "m" else - distanceUnit = _("km") + distanceUnit = "km" end return string.format(_("distance: %.2f %s"), distance, distanceUnit) @@ -746,7 +746,7 @@ dt.preferences.register("geoToolbox", "mapBoxKey", "string", _("geoToolbox export: MapBox Key"), - _("https://www.mapbox.com/studio/account/tokens"), + "https://www.mapbox.com/studio/account/tokens", '' ) -- Register diff --git a/contrib/image_time.lua b/contrib/image_time.lua index a35f751f..ff5f8c28 100644 --- a/contrib/image_time.lua +++ b/contrib/image_time.lua @@ -257,7 +257,7 @@ local function _get_windows_image_file_creation_time(image) end p:close() else - dt.print(string.format(_("unable to get information for $s"), image.filename)) + dt.print(string.format(_("unable to get information for %s"), image.filename)) datetime = ERROR end return datetime diff --git a/contrib/rate_group.lua b/contrib/rate_group.lua index 6455f6d3..5c1659e7 100644 --- a/contrib/rate_group.lua +++ b/contrib/rate_group.lua @@ -93,6 +93,8 @@ local function destroy() dt.destroy_event("rg5", "shortcut") end +local rate_group = _("rate group") + dt.register_event("rg_reject", "shortcut", function(event, shortcut) apply_rating(-1) @@ -101,32 +103,32 @@ end, _("reject group")) dt.register_event("rg0", "shortcut", function(event, shortcut) apply_rating(0) -end, _("rate group 0")) +end, rate group .. " 0") dt.register_event("rg1", "shortcut", function(event, shortcut) apply_rating(1) -end, _("rate group 1")) +end, rate group .. " 1") dt.register_event("rg2", "shortcut", function(event, shortcut) apply_rating(2) -end, _("rate group 2")) +end, rate group .. " 2") dt.register_event("rg3", "shortcut", function(event, shortcut) apply_rating(3) -end, _("rate group 3")) +end, rate group .. " 3") dt.register_event("rg4", "shortcut", function(event, shortcut) apply_rating(4) -end, _("rate group 4")) +end, rate group .. " 4") dt.register_event("rg5", "shortcut", function(event, shortcut) apply_rating(5) -end, _("rate group 5")) +end, rate group .. " 5") script_data.destroy = destroy diff --git a/contrib/transfer_hierarchy.lua b/contrib/transfer_hierarchy.lua index 96b18e44..b73b38a9 100755 --- a/contrib/transfer_hierarchy.lua +++ b/contrib/transfer_hierarchy.lua @@ -352,7 +352,7 @@ th.transfer_widget = darktable.new_widget("box") { }, darktable.new_widget("button") { label = _("copy"), - tooltip = _("Copy all selected images"), + tooltip = _("copy all selected images"), clicked_callback = doCopy } } @@ -406,4 +406,4 @@ script_data.restart = restart script_data.destroy_method = "hide" script_data.show = restart -return script_data \ No newline at end of file +return script_data diff --git a/examples/multi_os.lua b/examples/multi_os.lua index f27cc9ea..a1eea24b 100644 --- a/examples/multi_os.lua +++ b/examples/multi_os.lua @@ -227,7 +227,7 @@ if dt.configuration.running_os ~= "linux" then dt.preferences.register("executable_paths", "ufraw-batch", -- name "file", -- type _('multi_os: ufraw-batch location'), -- label - _('Installed location of ufraw-batch, requires restart to take effect.'), -- tooltip + _('installed location of ufraw-batch, requires restart to take effect.'), -- tooltip "ufraw-batch", -- default ufraw_batch_path_widget ) diff --git a/tools/script_manager.lua b/tools/script_manager.lua index b62e0e2c..ada8579d 100644 --- a/tools/script_manager.lua +++ b/tools/script_manager.lua @@ -852,7 +852,7 @@ local function install_scripts() sm.widgets.new_folder.text = "" sm.widgets.main_menu.selected = 3 else - log.msg(log.screen, _("No scripts found to install")) + log.msg(log.screen, _("no scripts found to install")) log.msg(log.error, "scan_scripts returned " .. count .. " scripts found. Not adding to folder_selector") end @@ -1436,7 +1436,7 @@ sm.widgets.page_control = dt.new_widget("box"){ sm.widgets.scripts = dt.new_widget("box"){ orientation = vertical, - dt.new_widget("section_label"){label = _(" ")}, + dt.new_widget("section_label"){label = " "}, dt.new_widget("label"){label = " "}, dt.new_widget("label"){label = _("scripts")}, sm.widgets.folder_selector,