Skip to content

POC: translation done by darktable. #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions official/copy_paste_metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,8 @@ local publisher = ""
local rights = ""
local tags = {}

-- Tell gettext where to find the .mo file translating messages for a particular domain
gettext.bindtextdomain("copy_paste_metadata",dt.configuration.config_dir.."/lua/locale/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this line to gettext.bindtextdomain("darktable", dt.configuration.locale_dir)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be missing something, but why is it better than removing the line? What did I broke?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually nothing. I just wasn't sure what Lua would inherit from darktable. I tried it with and without the line and it works the same either way. So, we can get rid of it.


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

local function copy(image)
Expand Down
5 changes: 1 addition & 4 deletions tools/script_manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ local debug = require "darktable.debug"
local gettext = dt.gettext


-- Tell gettext where to find the .mo file translating messages for a particular domain
gettext.bindtextdomain("script_manager",dt.configuration.config_dir.."/lua/locale/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above


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

-- api check
Expand Down