diff --git a/.ci/after_success.sh b/.ci/after_success.sh index fe643e9c0..18780032e 100755 --- a/.ci/after_success.sh +++ b/.ci/after_success.sh @@ -9,6 +9,16 @@ set +e if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ "${CIRCLE_BRANCH}" = 'master' ]; then echo "CIRCLE_NODE_INDEX: ${CIRCLE_NODE_INDEX}" if [ "$CIRCLE_NODE_INDEX" = 1 ]; then + echo -e "\\n${ANSI_GREEN}Pushing translation to Transifex." + + cat >~/.transifexrc < to
. Some of these can be ignored with the tweaks available here. If the document contains no headings, or all are ignored, the alternative TOC will be built from document fragments and will point to the start of each individual HTML file in the EPUB. @@ -470,8 +470,8 @@ After applying these tweaks, the alternative TOC needs to be rebuilt by long-pre { id = "alt_toc_level_example"; title = _("Example of book specific TOC hints"), - description = _([[ -If headings or document fragments do not result in a usable TOC, you can inspect the HTML and look for elements that contain chapter titles. Then you can set hints to their class names. + description = _( +[[If headings or document fragments do not result in a usable TOC, you can inspect the HTML and look for elements that contain chapter titles. Then you can set hints to their class names. This is just an example, that will need to be adapted into a user style tweak.]]), css = [[ .book_n { -cr-hint: toc-level1; } @@ -486,8 +486,8 @@ This is just an example, that will need to be adapted into a user style tweak.]] { id = "footnote-inpage_epub"; title = _("In-page EPUB footnotes"), - description = _([[ -Show EPUB footnote text at the bottom of pages that contain links to them. + description = _( +[[Show EPUB footnote text at the bottom of pages that contain links to them. This only works with footnotes that have specific attributes set by the publisher.]]), css = [[ *[type~="note"], @@ -505,8 +505,8 @@ This only works with footnotes that have specific attributes set by the publishe { id = "footnote-inpage_epub_smaller"; title = _("In-page EPUB footnotes (smaller)"), - description = _([[ -Show EPUB footnote text at the bottom of pages that contain links to them. + description = _( +[[Show EPUB footnote text at the bottom of pages that contain links to them. This only works with footnotes that have specific attributes set by the publisher.]]), css = [[ *[type~="note"], @@ -559,8 +559,8 @@ ol.references > li > .mw-cite-backlink { display: none; } { id = "footnote-inpage_classic_classnames"; title = _("In-page classic classname footnotes"), - description = _([[ -Show footnotes with classic class names at the bottom of pages. + description = _( +[[Show footnotes with classic class names at the bottom of pages. This tweak can be duplicated as a user style tweak when books contain footnotes wrapped with other class names.]]), css = [[ .footnote, .note, .note1, .ntb, .ntb-txt, .ntb-txt-j @@ -573,8 +573,8 @@ This tweak can be duplicated as a user style tweak when books contain footnotes { id = "footnote-inpage_classic_classnames_smaller"; title = _("In-page classic classname footnotes (smaller)"), - description = _([[ -Show footnotes with classic classname at the bottom of pages. + description = _( +[[Show footnotes with classic classname at the bottom of pages. This tweak can be duplicated as a user style tweak when books contain footnotes wrapped with other class names.]]), css = [[ .footnote, .note, .note1, .ntb, .ntb-txt, .ntb-txt-j @@ -589,8 +589,8 @@ This tweak can be duplicated as a user style tweak when books contain footnotes { id = "epub_switch_show_case"; title = _("Toggle alternative EPUB content"), - description = _([[ -The EPUB3 format allows a + description = _( +[[The EPUB3 format allows a construct to provide alternative content to engines that support optional features. KOReader currently falls back to hiding all content and shows the content (usually an image). diff --git a/frontend/ui/data/optionsutil.lua b/frontend/ui/data/optionsutil.lua index e09aa74ad..07026549a 100644 --- a/frontend/ui/data/optionsutil.lua +++ b/frontend/ui/data/optionsutil.lua @@ -78,8 +78,8 @@ function optionsutil.showValuesHMargins(configurable, option) local current = configurable[option.name] if not default then UIManager:show(InfoMessage:new{ - text = T(_([[ -Current margins: + text = T(_( +[[Current margins: left: %1 right: %2 Default margins: not set]]), @@ -87,8 +87,8 @@ Default margins: not set]]), }) else UIManager:show(InfoMessage:new{ - text = T(_([[ -Current margins: + text = T(_( +[[Current margins: left: %1 right: %2 Default margins: diff --git a/frontend/ui/quickstart.lua b/frontend/ui/quickstart.lua index a77b09f43..1f2ade56c 100644 --- a/frontend/ui/quickstart.lua +++ b/frontend/ui/quickstart.lua @@ -17,8 +17,8 @@ local language = G_reader_settings:readSetting("language") or "en" local version = Version:getNormalizedCurrentVersion() local rev = Version:getCurrentRevision() -local quickstart_guide = T(_([[ -# KOReader Quickstart Guide +local quickstart_guide = T(_( +[[# KOReader Quickstart Guide Welcome to KOReader. diff --git a/frontend/ui/widget/configdialog.lua b/frontend/ui/widget/configdialog.lua index 1381fde70..29a298cbf 100644 --- a/frontend/ui/widget/configdialog.lua +++ b/frontend/ui/widget/configdialog.lua @@ -1012,8 +1012,8 @@ function ConfigDialog:onMakeDefault(name, name_text, values, labels, position) return -- known table value, make it pretty elseif name == "h_page_margins" then - display_value = T(_([[ - + display_value = T(_( +[[ left: %1 right: %2 ]]), diff --git a/frontend/ui/widget/hyphenationlimits.lua b/frontend/ui/widget/hyphenationlimits.lua index 592b3d6a4..bd7c5598a 100644 --- a/frontend/ui/widget/hyphenationlimits.lua +++ b/frontend/ui/widget/hyphenationlimits.lua @@ -144,8 +144,8 @@ function HyphenationLimitsWidget:update() CloseButton:new{ window = self, padding_top = Size.margin.title, }, } - local hyph_into_text = _([[ -Set minimum length before hyphenation occurs. + local hyph_into_text = _( +[[Set minimum length before hyphenation occurs. These settings will apply to all books with any hyphenation dictionary. 'Use language defaults' resets them.]]) local hyph_info = FrameContainer:new{ diff --git a/frontend/util.lua b/frontend/util.lua index fb9b0eaf2..1da902dd7 100644 --- a/frontend/util.lua +++ b/frontend/util.lua @@ -921,7 +921,7 @@ function util.unpackArchive(archive, extract_to) return false, T(_("Couldn't extract archive:\n\n%1\n\nUnrecognized filename extension."), archive) end if not ok then - return false, T(_("Extracting archive failed:\n\n%1", archive)) + return false, T(_("Extracting archive failed:\n\n%1"), archive) end return true end diff --git a/plugins/coverbrowser.koplugin/bookinfomanager.lua b/plugins/coverbrowser.koplugin/bookinfomanager.lua index e562f8937..e952ccda4 100644 --- a/plugins/coverbrowser.koplugin/bookinfomanager.lua +++ b/plugins/coverbrowser.koplugin/bookinfomanager.lua @@ -677,8 +677,8 @@ function BookInfoManager:extractBooksInDirectory(path, cover_specs) local Trapper = require("ui/trapper") local Screen = require("device").screen - local go_on = Trapper:confirm(_([[ -This will extract metadata and cover images for books in current directory. + local go_on = Trapper:confirm(_( +[[This will extract metadata and cover images for books in current directory. Once extraction has started, you can abort at any moment by tapping on the screen. Cover images will be saved with the adequate size for the current display mode. @@ -690,16 +690,16 @@ This extraction may take time and use some battery power: you may wish to keep y return end - local recursive = Trapper:confirm(_([[ -Do you want to extract book information for books in sub-directories too?]] + local recursive = Trapper:confirm(_( +[[Do you want to extract book information for books in sub-directories too?]] ), _("Here only"), _("Here and under")) - local refresh_existing = Trapper:confirm(_([[ -Do you want to refresh metadata and covers that have already been extracted?]] + local refresh_existing = Trapper:confirm(_( +[[Do you want to refresh metadata and covers that have already been extracted?]] ), _("Don't refresh"), _("Refresh")) - local prune = Trapper:confirm(_([[ -If you have removed many books, or have renamed some directories, it is good to remove them from the cache database. + local prune = Trapper:confirm(_( +[[If you have removed many books, or have renamed some directories, it is good to remove them from the cache database. Do you want to prune cache of removed books?]] ), _("Don't prune"), _("Prune")) diff --git a/plugins/goodreads.koplugin/main.lua b/plugins/goodreads.koplugin/main.lua index 753639eb6..1c298903d 100644 --- a/plugins/goodreads.koplugin/main.lua +++ b/plugins/goodreads.koplugin/main.lua @@ -83,8 +83,8 @@ function Goodreads:updateSettings() local text_top local hint_bottom local text_bottom - local text_info = _([[ -How to generate a key and a secret key: + local text_info = _( +[[How to generate a key and a secret key: 1. Go to https://www.goodreads.com/user/sign_up and create an account 2. Register for a development key on the following page: https://www.goodreads.com/user/sign_in?rd=true diff --git a/plugins/statistics.koplugin/main.lua b/plugins/statistics.koplugin/main.lua index 321c5cb61..936af58a8 100755 --- a/plugins/statistics.koplugin/main.lua +++ b/plugins/statistics.koplugin/main.lua @@ -227,8 +227,8 @@ function ReaderStatistics:checkInitDatabase() if self.convert_to_db then -- if conversion to sqlite was doing earlier if not conn:exec("pragma table_info('book');") then UIManager:show(ConfirmBox:new{ - text = T(_([[ -Cannot open database in %1. + text = T(_( +[[Cannot open database in %1. The database may have been moved or deleted. Do you want to create an empty database? ]]), @@ -258,8 +258,8 @@ Do you want to create an empty database? end if #ReadHistory.hist > 1 or (#ReadHistory.hist == 1 and filename_first_history ~= quickstart_filename) then local info = InfoMessage:new{ - text =_([[ -New version of statistics plugin detected. + text =_( +[[New version of statistics plugin detected. Statistics data needs to be converted into the new database format. This may take a few minutes. Please wait… diff --git a/plugins/texteditor.koplugin/main.lua b/plugins/texteditor.koplugin/main.lua index e7afdff7f..f08ab3f01 100644 --- a/plugins/texteditor.koplugin/main.lua +++ b/plugins/texteditor.koplugin/main.lua @@ -481,8 +481,8 @@ function TextEditor:editFile(file_path, readonly) return false, T(_("Failed saving file: %1"), err) end end - local save_anyway = Trapper:confirm(T(_([[ -Lua syntax check failed: + local save_anyway = Trapper:confirm(T(_( +[[Lua syntax check failed: %1 @@ -502,8 +502,8 @@ Do you really want to save to this file? return false, false -- no need for more InfoMessage end else -- If content is empty, propose to delete the file - local delete_file = Trapper:confirm(T(_([[ -Text content is empty. + local delete_file = Trapper:confirm(T(_( +[[Text content is empty. Do you want to keep this file as empty, or do you prefer to delete it? %1]]), file_path), _("Keep empty file"), _("Delete file")) diff --git a/plugins/wallabag.koplugin/main.lua b/plugins/wallabag.koplugin/main.lua index 28d350664..5af93854f 100644 --- a/plugins/wallabag.koplugin/main.lua +++ b/plugins/wallabag.koplugin/main.lua @@ -664,8 +664,8 @@ function Wallabag:setFilterTag(touchmenu_instance) end function Wallabag:editServerSettings() - local text_info = T(_([[ -Enter the details of your Wallabag server and account. + local text_info = T(_( +[[Enter the details of your Wallabag server and account. Client ID and client secret are long strings so you might prefer to save the empty settings and edit the config file directly in your installation directory: %1/wallabag.lua