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:
@@ -228,7 +228,7 @@ function ReaderMenu:setUpdateItemTable()
|
||||
return _("Open previous document")
|
||||
end
|
||||
local path, file_name = util.splitFilePathName(previous_file) -- luacheck: no unused
|
||||
return T(_("Previous: %1"), file_name)
|
||||
return T(_("Previous: %1"), BD.filename(file_name))
|
||||
end,
|
||||
enabled_func = function()
|
||||
return self:getPreviousFile() ~= nil
|
||||
@@ -239,7 +239,7 @@ function ReaderMenu:setUpdateItemTable()
|
||||
hold_callback = function()
|
||||
local previous_file = self:getPreviousFile()
|
||||
UIManager:show(ConfirmBox:new{
|
||||
text = T(_("Would you like to open the previous document: %1?"), previous_file),
|
||||
text = T(_("Would you like to open the previous document: %1?"), BD.filepath(previous_file)),
|
||||
ok_text = _("OK"),
|
||||
ok_callback = function()
|
||||
self.ui:switchDocument(previous_file)
|
||||
|
||||
Reference in New Issue
Block a user