Thanks to <https://github.com/koreader/koreader/pull/5237> we can now extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <https://github.com/koreader/koreader/issues/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 <https://github.com/koreader/koreader/pull/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.
@ -856,6 +856,7 @@ function ReaderView:getRenderModeMenuTable()
}
}
end
end
return{
return{
-- @translators Selects which layers of the DjVu image should be rendered. Valid rendering modes are color, black, mask, foreground, and background. See http://djvu.sourceforge.net/ and https://en.wikipedia.org/wiki/DjVu for more information about the format.
text=_("DjVu render mode"),
text=_("DjVu render mode"),
sub_item_table={
sub_item_table={
make_mode(_("COLOUR (works for both colour and b&w pages)"),0),
make_mode(_("COLOUR (works for both colour and b&w pages)"),0),
-- @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
af=_("Afrikaans"),
af=_("Afrikaans"),
sq=_("Albanian"),
sq=_("Albanian"),
am=_("Amharic"),
am=_("Amharic"),
@ -54,6 +55,7 @@ local SUPPORTED_LANGUAGES = {
ka=_("Georgian"),
ka=_("Georgian"),
de=_("German"),
de=_("German"),
el=_("Greek"),
el=_("Greek"),
-- @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
gu=_("Gujarati"),
gu=_("Gujarati"),
ht=_("Haitian Creole"),
ht=_("Haitian Creole"),
ha=_("Hausa"),
ha=_("Hausa"),
@ -69,6 +71,7 @@ local SUPPORTED_LANGUAGES = {
it=_("Italian"),
it=_("Italian"),
ja=_("Japanese"),
ja=_("Japanese"),
jw=_("Javanese"),
jw=_("Javanese"),
-- @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
kn=_("Kannada"),
kn=_("Kannada"),
kk=_("Kazakh"),
kk=_("Kazakh"),
km=_("Khmer"),
km=_("Khmer"),
@ -124,6 +127,7 @@ local SUPPORTED_LANGUAGES = {
uz=_("Uzbek"),
uz=_("Uzbek"),
vi=_("Vietnamese"),
vi=_("Vietnamese"),
cy=_("Welsh"),
cy=_("Welsh"),
-- @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
-- @translators %1 is the current page. %2 is the total number of pages. In some languages a good translation might need to reverse this order, for instance: "Total %2, page %1".
self.page_info_text.text=util.template(_("Page %1 of %2"),self.page,self.page_num)
self.page_info_text.text=util.template(_("Page %1 of %2"),self.page,self.page_num)
@ -166,11 +166,11 @@ function EvernoteExporter:addToMainMenu(menu_items)
self.config:purge()
self.config:purge()
UIManager:show(ConfirmBox:new{
UIManager:show(ConfirmBox:new{
text=_("History records have been purged.\nAll notes will be exported again next time.\nWould you like to remove the existing KOReaderClipping.txt file to avoid duplication?\nRecords will be appended to KOReaderClipping.txt instead of being overwritten."),
text=_("History records have been purged.\nAll notes will be exported again next time.\nWould you like to remove the existing KOReaderClipping.txt file to avoid duplication?\nRecords will be appended to KOReaderClipping.txt instead of being overwritten."),
ok_text=_("Yes, remove it"),
ok_text=_("Remove file"),
ok_callback=function()
ok_callback=function()
os.remove(self.text_clipping_file)
os.remove(self.text_clipping_file)
end,
end,
cancel_text=_("No, keep it"),
cancel_text=_("Keep file"),
})
})
end
end
}
}
@ -409,20 +409,22 @@ function EvernoteExporter:exportClippings(clippings)
localall_count=export_count+error_count
localall_count=export_count+error_count
ifexport_count>0anderror_count==0then
ifexport_count>0anderror_count==0then
ifall_count==1then
ifall_count==1then
msg= _("Exported notes from book:").."\n"..export_title
msg=T(_("Exported notes from the book:\n%1"),export_title)
else
else
msg=T(
msg=T(
_("Exported notes from book:\n%1\nand %2 others."),
-- @translators %1 is the title of a book and %2 a number of 2 or higher. To track better handling of plurals please see https://github.com/koreader/koreader/issues/5249
_("Exported notes from the book:\n%1\nand %2 others."),
export_title,
export_title,
all_count-1
all_count-1
)
)
end
end
elseiferror_count>0then
elseiferror_count>0then
ifall_count==1then
ifall_count==1then
msg= _("An error occurred while trying to export notes from book:").."\n"..error_title
msg=T(_("An error occurred while trying to export notes from the book:\n%1"),error_title)
else
else
msg=T(
msg=T(
_("Multiple errors occurred while trying to export notes from book:\n%1\nand %2 others."),
-- @translators %1 is the title of a book and %2 a number of 2 or higher. To track better handling of plurals please see https://github.com/koreader/koreader/issues/5249
_("Multiple errors occurred while trying to export notes from the book:\n%1\nand %2 others."),
-- @translators The number of "sleeps", that is the number of times the device has entered standby. This could also be translated as a rendition of a phrase like "entered sleep".