bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
as using LTR isolates seems uneeded when already LTR" (part
of a628714f) which was a wrong assumption: we need proper
wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
trailing \n.
- Wrap all paths, directories, filenames in the code with
these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
as it helps fixing some edge cases (like open/close quotation
marks which are not considered as bracket types by FriBiDi).
(Needed some minor logic changes in CoverBrowser.)
- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
following the recent addition of the page_gap_height option.
-- @translators to RTL language translators: %1/left is the min length of the start of a hyphenated word, %2/right is the min length of the end of a hyphenated word (note that there is yet no support for hyphenation with RTL languages, so this will mostly apply to LTR documents)
text=T(_("Changed hyphenation to %1."),BD.wrap(v.name)),
})
self.ui.document:setHyphDictionary(v.filename)
-- Apply hyphenation sides limits
@ -137,7 +141,7 @@ These settings will apply to all books with any hyphenation dictionary.
-- one is set, no fallback will ever be used - if a fallback one
-- is set, no default is wanted; so when we set one below, we
-- remove the other).
text=T(_("Would you like %1 to be used as the default(★) or fallback(<28>) hyphenation language?\n\nDefault will always take precedence while fallback will only be used if the language of the book can't be automatically determined."), v.name),
text=T(_("Would you like %1 to be used as the default(★) or fallback(<28>) hyphenation language?\n\nDefault will always take precedence while fallback will only be used if the language of the book can't be automatically determined."),BD.wrap(v.name)),
text=T(_("The document '%1' with bookmarks or highlights was previously opened with a different engine. To prevent issues, bookmarks need to be deleted before continuing."),
text=T(_("KOReader %1\n\nA document viewer for E Ink devices.\n\nLicensed under Affero GPL v3. All dependencies are free software.\n\nhttp://koreader.rocks/"), version),
text=T(_("KOReader %1\n\nA document viewer for E Ink devices.\n\nLicensed under Affero GPL v3. All dependencies are free software.\n\nhttp://koreader.rocks/"),BD.ltr(version)),
@ -243,13 +244,13 @@ function OTAManager:fetchAndProcessUpdate()
})
elseifota_versionthen
localupdate_message=T(_("Do you want to update?\nInstalled version: %1\nAvailable version: %2"),
local_version,
ota_version)
BD.ltr(local_version),
BD.ltr(ota_version))
localupdate_ok_text=_("Update")
ifota_version<local_versionthen
update_message=T(_("The currently installed version is newer than the available version.\nWould you still like to continue and downgrade?\nInstalled version: %1\nAvailable version: %2"),
local_version,
ota_version)
BD.ltr(local_version),
BD.ltr(ota_version))
update_ok_text=_("Downgrade")
end
@ -262,9 +263,9 @@ function OTAManager:fetchAndProcessUpdate()
@ -125,7 +126,7 @@ function NewsDownloader:addToMainMenu(menu_items)
callback=function()
UIManager:show(InfoMessage:new{
text=T(_("News downloader retrieves RSS and Atom news entries and stores them to:\n%1\n\nEach entry is a separate html file, that can be browsed by KOReader file manager.\nItems download limit can be configured in Settings."),
news_download_dir_path)
BD.dirpath(news_download_dir_path))
})
end,
},
@ -183,7 +184,7 @@ function NewsDownloader:loadConfigAndProcessFeeds()
@ -103,7 +104,7 @@ function Send2Ebook:addToMainMenu(menu_items)
keep_menu_open=true,
callback=function()
UIManager:show(InfoMessage:new{
text=T(_('Send2Ebook lets you send articles found on PC/Android phone to your Ebook reader (using ftp server).\n\nMore details: https://github.com/mwoz123/send2ebook\n\nDownloads to local folder: %1'), download_dir_path)
text=T(_('Send2Ebook lets you send articles found on PC/Android phone to your Ebook reader (using ftp server).\n\nMore details: https://github.com/mwoz123/send2ebook\n\nDownloads to local folder: %1'),BD.dirpath(download_dir_path))
})
end,
},
@ -143,7 +144,7 @@ function Send2Ebook:process()
localftp_files_table=FtpApi:listFolder(connection_url..ftp_config.folder,ftp_config.folder)--args looks strange but otherwise resonse with invalid paths
ifnotftp_files_tablethen
info=InfoMessage:new{text=T(_("Could not get file list for server: %1, user: %2, folder: %3"), ftp_config.address,ftp_config.username, ftp_config.folder)}
info=InfoMessage:new{text=T(_("Could not get file list for server: %1, user: %2, folder: %3"),BD.ltr(ftp_config.address),ftp_config.username,BD.dirpath(ftp_config.folder))}