It makes no sense to have both, so setting a default removes
the fallback, and setting a fallback removes the default.
Also save hyph_alg to document setting only if it has been
manually chosen, so that later changes to default or fallback
can be used.
@ -33,10 +34,22 @@ function ReaderHyphenation:init()
self.ui.toc:onUpdateToc()
end,
hold_callback=function()
UIManager:show(ConfirmBox:new{
text=T(_("Set fallback hyphenation to %1?"),v.name),
ok_callback=function()
UIManager:show(MultiConfirmBox:new{
-- No real need for a way to remove default one, we can just
-- toggle between setting a default OR a fallback (if a default
-- one is set, no fallback will ever be used - if a fallback one
-- is set, no default is wanted; so when we set one below, we
-- remove the other).
text=T(_("Set default or fallback hyphenation pattern to %1?\nDefault will always take precedence while fallback will only be used if the language of the book can't be automatically determined."),v.name),