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 FileChooser = require("ui/widget/filechooser")
|
||||
local Font = require("ui/font")
|
||||
@@ -104,14 +105,14 @@ function PathChooser:onMenuHold(item)
|
||||
local filesize = util.getFormattedSize(attr.size)
|
||||
local lastmod = os.date("%Y-%m-%d %H:%M", attr.modification)
|
||||
title = T(_("Select this file?\n\n%1\n\nFile size: %2 bytes\nLast modified: %3"),
|
||||
path, filesize, lastmod)
|
||||
BD.filepath(path), filesize, lastmod)
|
||||
else
|
||||
title = T(_("Select this file?\n\n%1"), path)
|
||||
title = T(_("Select this file?\n\n%1"), BD.filepath(path))
|
||||
end
|
||||
elseif attr.mode == "directory" then
|
||||
title = T(_("Select this directory?\n\n%1"), path)
|
||||
title = T(_("Select this directory?\n\n%1"), BD.dirpath(path))
|
||||
else -- just in case we get something else
|
||||
title = T(_("Select this path?\n\n%1"), path)
|
||||
title = T(_("Select this path?\n\n%1"), BD.path(path))
|
||||
end
|
||||
local onConfirm = self.onConfirm
|
||||
self.button_dialog = ButtonDialogTitle:new{
|
||||
|
||||
Reference in New Issue
Block a user