darktable-org / lua-scripts

155 stars 110 forks source link

Change group leader script #399

Closed dexterlb closed 1 year ago

dexterlb commented 2 years ago

This script has been originally written by @wpferguson as a comment on darktable issue #7030.

I have been using it for some time without problems, and several people have expressed interest in including it in lua-scripts.

I am willing to maintain the script for the foreseeable future.

I am not sure that creating a PR like this for code that was originally written by someone else (especially adding a copyright notice under my own name) is the correct course of action, so I am sorry if it is not.

wpferguson commented 1 year ago

I'd forgotten about this script. Thanks for picking it up and submitting it.

dexterlb commented 1 year ago

What is there left to be done for i18n? I see that all messages are tagged

Or do you mean the actual translations?

wpferguson commented 1 year ago

translation involves adding

local gettext = dt.gettext
-- Tell gettext where to find the .mo file translating messages for a particular domain
gettext.bindtextdomain(MODULE,dt.configuration.config_dir.."/lua/locale/")

local function _(msgid)
    return gettext.dgettext(MODULE, msgid)
end

and then wrapping strings that appear in the user interface with

_("a string to be translated")

Strings used for debugging (dt.print_log()) don't get translated.

wpferguson commented 1 year ago

@dexterlb you can leave your copyright notice in the file also, since you did make additions