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:
@@ -534,7 +534,7 @@ function ReaderLink:onGotoLink(link, neglect_current_location, allow_footnote_po
|
||||
display_filename = display_filename .. anchor
|
||||
end
|
||||
UIManager:show(ConfirmBox:new{
|
||||
text = T(_("Would you like to read this local document?\n\n%1\n"), display_filename),
|
||||
text = T(_("Would you like to read this local document?\n\n%1\n"), BD.filepath(display_filename)),
|
||||
ok_callback = function()
|
||||
UIManager:scheduleIn(0.1, function()
|
||||
self.ui:switchDocument(linked_filename)
|
||||
@@ -543,7 +543,7 @@ function ReaderLink:onGotoLink(link, neglect_current_location, allow_footnote_po
|
||||
})
|
||||
else
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = T(_("Link to unsupported local file:\n%1"), link_url),
|
||||
text = T(_("Link to unsupported local file:\n%1"), BD.url(link_url)),
|
||||
})
|
||||
end
|
||||
return true
|
||||
@@ -551,7 +551,7 @@ function ReaderLink:onGotoLink(link, neglect_current_location, allow_footnote_po
|
||||
|
||||
-- Not supported
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = T(_("Invalid or external link:\n%1"), link_url),
|
||||
text = T(_("Invalid or external link:\n%1"), BD.url(link_url)),
|
||||
-- no timeout to allow user to type that link in his web browser
|
||||
})
|
||||
-- don't propagate, user will notice and tap elsewhere if he wants to change page
|
||||
@@ -658,7 +658,7 @@ function ReaderLink:onGoToExternalLink(link_url)
|
||||
-- No external link handler
|
||||
return false
|
||||
end
|
||||
text = T(_("External link:\n\n%1"), link_url)
|
||||
text = T(_("External link:\n\n%1"), BD.url(link_url))
|
||||
end
|
||||
|
||||
-- Add all alternative handlers buttons
|
||||
|
||||
Reference in New Issue
Block a user