mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Add option for custom hyphenation rules (#7787)
This is the successor of #7746.
This commit is contained in:
@@ -174,6 +174,20 @@ function ReaderHighlight:init()
|
||||
}
|
||||
end)
|
||||
|
||||
-- User hyphenation dict
|
||||
self:addToHighlightDialog("11_user_dict", function(_self)
|
||||
return {
|
||||
text= _("Hyphenate"),
|
||||
show_in_highlight_dialog_func = function()
|
||||
return _self.ui.userhyph and _self.ui.userhyph:isAvailable() and not _self.selected_text.text:find("[ ,;-%.\n]")
|
||||
end,
|
||||
callback = function()
|
||||
_self.ui.userhyph:modifyUserEntry(_self.selected_text.text)
|
||||
_self:onClose()
|
||||
end,
|
||||
}
|
||||
end)
|
||||
|
||||
self.ui:registerPostInitCallback(function()
|
||||
self.ui.menu:registerToMainMenu(self)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user