|
|
|
@ -1114,6 +1114,7 @@ function ReaderDictionary:downloadDictionary(dict, download_location, continue)
|
|
|
|
|
--logger.dbg(headers)
|
|
|
|
|
file_size = headers and headers["content-length"]
|
|
|
|
|
|
|
|
|
|
if file_size then
|
|
|
|
|
UIManager:show(ConfirmBox:new{
|
|
|
|
|
text = T(_("Dictionary filesize is %1 (%2 bytes). Continue with download?"), util.getFriendlySize(file_size), util.getFormattedSize(file_size)),
|
|
|
|
|
ok_text = _("Download"),
|
|
|
|
@ -1123,6 +1124,14 @@ function ReaderDictionary:downloadDictionary(dict, download_location, continue)
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
else
|
|
|
|
|
logger.dbg("ReaderDictionary: Request failed; response headers:", headers)
|
|
|
|
|
UIManager:show(InfoMessage:new{
|
|
|
|
|
text = _("Failed to fetch dictionary. Are you online?"),
|
|
|
|
|
--timeout = 3,
|
|
|
|
|
})
|
|
|
|
|
return false
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
UIManager:nextTick(function()
|
|
|
|
|
UIManager:show(InfoMessage:new{
|
|
|
|
|