mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[RTL UI] Bidi-wrap filenames, paths, urls, metadata
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.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
local BD = require("ui/bidi")
|
||||
local ButtonDialogTitle = require("ui/widget/buttondialogtitle")
|
||||
local ConfirmBox = require("ui/widget/confirmbox")
|
||||
local DataStorage = require("datastorage")
|
||||
@@ -175,7 +176,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
|
||||
if not default_dir then default_dir = require("apps/filemanager/filemanagerutil").getDefaultDir() end
|
||||
local dialog
|
||||
dialog = ButtonDialogTitle:new{
|
||||
title = T(_("Current Wikipedia 'Save as EPUB' directory:\n\n%1\n"), default_dir),
|
||||
title = T(_("Current Wikipedia 'Save as EPUB' directory:\n\n%1\n"), BD.dirpath(default_dir)),
|
||||
buttons = {
|
||||
{
|
||||
{
|
||||
@@ -220,7 +221,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
|
||||
onConfirm = function(path)
|
||||
G_reader_settings:saveSetting("wikipedia_save_dir", path)
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = T(_("Wikipedia 'Save as EPUB' directory set to:\n%1"), path),
|
||||
text = T(_("Wikipedia 'Save as EPUB' directory set to:\n%1"), BD.dirpath(path)),
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -257,7 +258,7 @@ Where do you want them saved?]])
|
||||
end
|
||||
G_reader_settings:saveSetting("wikipedia_save_dir", wikipedia_dir)
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = T(_("Wikipedia 'Save as EPUB' directory set to:\n%1"), wikipedia_dir),
|
||||
text = T(_("Wikipedia 'Save as EPUB' directory set to:\n%1"), BD.dirpath(wikipedia_dir)),
|
||||
})
|
||||
end,
|
||||
cancel_text = _("Select directory"),
|
||||
|
||||
Reference in New Issue
Block a user