Skip to content
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

[i18n] Add translator notes #5250

Merged
merged 8 commits into from Aug 24, 2019

Conversation

@Frenzie
Copy link
Member

commented Aug 23, 2019

Thanks to #5237 we can now extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects #3754.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from #2290 are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the need for comments where possible.

[i18n] Add translator notes
Thanks to <#5237> we can now  extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <#3754>.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <#2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the needs for comments where possible.

@Frenzie Frenzie added this to the 2019.09 milestone Aug 23, 2019

S.REFLOW = _("Reflow")
S.DEWATERMARK = _("Dewatermark")
S.DOC_LANG = _("Document Language")
S.VERTICAL_TEXT = _("Vertical Text")
S.WORD_GAP = _("Word Gap")
-- @translators The maximum size of a speckle to be ignored instead of being considered a character.

This comment has been minimized.

Copy link
@Frenzie

Frenzie Aug 23, 2019

Author Member

This could probably be a little clearer.

k2pdfopt for reference:

-de <size>        Defect size in points.  For scanned documents, marks
                  or defects smaller than this size are ignored when bounding
                  rectangular regions.  The period at the end of a sentence is
                  typically over 1 point in size.  The default is 1.0.

This comment has been minimized.

Copy link
@NiLuJe

NiLuJe Aug 23, 2019

Member

I kind of like it? Maybe I'd just qualify "speckle" (dust/ink?)

@@ -24,6 +24,7 @@ local _ = require("gettext")
-- 20181217: 104 supported languages
local AUTODETECT_LANGUAGE = "auto"
local SUPPORTED_LANGUAGES = {
-- @translators Many of the names for languages can be conveniently found pre-translated in the relevant language of this Wikipedia article: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

This comment has been minimized.

Copy link
@Frenzie

Frenzie Aug 23, 2019

Author Member

This is just a semi-random sprinkling in the hope that translators see it. Doing it on every line seemed a bit much.

text = self.is_wiki and _("Wikipedia full") or _("Wikipedia"),
text_func = function()
if self.is_wiki then
-- @translators Full Wikipedia article.

This comment has been minimized.

Copy link
@Frenzie

Frenzie Aug 23, 2019

Author Member

This actually attaches itself to the first extracted string if you leave the line as is, but I figured it was better to be abundantly clear about it.

@@ -79,7 +79,7 @@ function Search:getCalibre()
logger.dbg("search Calibre database")
self.metafile_1 = findcalibre("/mnt")
if not self.metafile_1 then
self.error = _("SEARCH_LIBRARY_PATH should be defined in DEFAULTS.LUA.")
self.error = _("The SEARCH_LIBRARY_PATH variable must be defined in 'persistent.defaults.lua' in order to use the calibre file search functionality.")

This comment has been minimized.

Copy link
@NiLuJe
@@ -153,6 +153,7 @@ function util.secondsToHClock(seconds, withoutSeconds, hmsFormat)
mins = string.format("%.f", round(seconds / 60))
return mins .. "'"
end
-- @translators This is the 'h' for hour, like in 1h30.

This comment has been minimized.

Copy link
@NiLuJe

NiLuJe Aug 23, 2019

Member

I'd maybe explicitly specify that it's a duration?

self:put({_(" Idle ticks (million)"),
string.format("%.2f", stat.cpu.idle / 1000000)})
-- @translators Ticks is a highly technical term. See https://superuser.com/a/101202 The correct translation is likely to simply be "ticks".

This comment has been minimized.

Copy link
@NiLuJe

NiLuJe Aug 23, 2019

Member

That one appears to be erroneous? (it's a %, not a tick count).

Frenzie added 5 commits Aug 23, 2019
@Frenzie

This comment has been minimized.

Copy link
Member Author

commented Aug 23, 2019

Lokalize is KDE's tool. This completion visualization is interesting:

Screenshot_20190824_000139

The tool as a whole looks very useful.

@Frenzie Frenzie merged commit 6ed5834 into koreader:master Aug 24, 2019

1 check was pending

ci/circleci: build CircleCI is running your tests
Details

@Frenzie Frenzie deleted the Frenzie:translator-warnings branch Aug 24, 2019

@Frenzie

This comment has been minimized.

Copy link
Member Author

commented Aug 24, 2019

And here's how it looks on Transifex:

Screenshot_2019-08-24_09-41-32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.