Standardize directory/folder to folder (#7328)

Closes <https://github.com/koreader/koreader/issues/7157>.
pull/7339/head
Frans de Jonge 3 years ago committed by GitHub
parent 75356f2837
commit 1bd4636a03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -301,7 +301,7 @@ function CloudStorage:cloudFile(item, path)
},
{
{
text = _("Choose download directory"),
text = _("Choose download folder"),
callback = function()
require("ui/downloadmgr"):new{
show_hidden = G_reader_settings:readSetting("show_hidden"),
@ -341,7 +341,7 @@ end
function CloudStorage:onMenuHold(item)
if item.type == "folder_long_press" then
local title = T(_("Select this directory?\n\n%1"), BD.dirpath(item.url))
local title = T(_("Select this folder?\n\n%1"), BD.dirpath(item.url))
local onConfirm = self.onConfirm
local button_dialog
button_dialog = ButtonDialogTitle:new{

@ -422,7 +422,7 @@ function FileManager:setupLayout()
local realpath = BaseUtil.realpath(file)
table.insert(buttons, {
{
text = _("Set as HOME directory"),
text = _("Set as HOME folder"),
callback = function()
setHome(realpath)
UIManager:close(self.file_dialog)
@ -610,7 +610,7 @@ function FileManager:tapPlus()
},
{
{
text = _("Set as HOME directory"),
text = _("Set as HOME folder"),
callback = function()
self:setHome(self.file_chooser.path)
UIManager:close(self.file_dialog)
@ -619,7 +619,7 @@ function FileManager:tapPlus()
},
{
{
text = _("Go to HOME directory"),
text = _("Go to HOME folder"),
callback = function()
self:goHome()
UIManager:close(self.file_dialog)
@ -779,7 +779,7 @@ end
function FileManager:setHome(path)
path = path or self.file_chooser.path
UIManager:show(ConfirmBox:new{
text = T(_("Set '%1' as HOME directory?"), BD.dirpath(path)),
text = T(_("Set '%1' as HOME folder?"), BD.dirpath(path)),
ok_text = _("Set as HOME"),
ok_callback = function()
G_reader_settings:saveSetting("home_dir", path)

@ -272,7 +272,7 @@ function FileManagerMenu:setUpdateItemTable()
separator = true,
},
{
text = _("Shorten home directory"),
text = _("Shorten home folder"),
checked_func = function()
return G_reader_settings:nilOrTrue("shorten_home_dir")
end,

@ -169,7 +169,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
end,
},
{ -- setting used by dictquicklookup
text = _("Set Wikipedia 'Save as EPUB' directory"),
text = _("Set Wikipedia 'Save as EPUB' folder"),
keep_menu_open = true,
callback = function()
local choose_directory = function()
@ -179,11 +179,11 @@ function ReaderWikipedia:addToMainMenu(menu_items)
if not default_dir then default_dir = require("apps/filemanager/filemanagerutil").getDefaultDir() end
local dialog
dialog = ButtonDialogTitle:new{
title = T(_("Current Wikipedia 'Save as EPUB' directory:\n\n%1\n"), BD.dirpath(default_dir)),
title = T(_("Current Wikipedia 'Save as EPUB' folder:\n\n%1\n"), BD.dirpath(default_dir)),
buttons = {
{
{
text = _("Keep this directory"),
text = _("Keep this folder"),
callback = function()
UIManager:close(dialog)
end,
@ -191,7 +191,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
},
{
{
text = _("Select another directory"),
text = _("Select another folder"),
callback = function()
UIManager:close(dialog)
-- Use currently read book's directory as starting point,
@ -224,7 +224,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
onConfirm = function(path)
G_reader_settings:saveSetting("wikipedia_save_dir", path)
UIManager:show(InfoMessage:new{
text = T(_("Wikipedia 'Save as EPUB' directory set to:\n%1"), BD.dirpath(path)),
text = T(_("Wikipedia 'Save as EPUB' folder set to:\n%1"), BD.dirpath(path)),
})
end
}
@ -249,7 +249,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
local text = _([[
Wikipedia articles can be saved as an EPUB for more comfortable reading.
You can select an existing directory, or use a default directory named "Wikipedia" in your reader's home directory.
You can select an existing directory, or use a default directory named "Wikipedia" in your reader's home folder.
Where do you want them saved?]])
UIManager:show(ConfirmBox:new{
@ -261,10 +261,10 @@ Where do you want them saved?]])
end
G_reader_settings:saveSetting("wikipedia_save_dir", wikipedia_dir)
UIManager:show(InfoMessage:new{
text = T(_("Wikipedia 'Save as EPUB' directory set to:\n%1"), BD.dirpath(wikipedia_dir)),
text = T(_("Wikipedia 'Save as EPUB' folder set to:\n%1"), BD.dirpath(wikipedia_dir)),
})
end,
cancel_text = _("Select directory"),
cancel_text = _("Select folder"),
cancel_callback = function()
choose_directory()
end,
@ -277,7 +277,7 @@ Where do you want them saved?]])
end,
},
{ -- setting used by dictquicklookup
text = _("Save Wikipedia EPUB in current book directory"),
text = _("Save Wikipedia EPUB in current book folder"),
checked_func = function()
return G_reader_settings:isTrue("wikipedia_save_in_book_dir")
end,

@ -17,7 +17,7 @@ end
-- @treturn string path chosen by the user
function CloudMgr:chooseDir()
local cloud_storage = CloudStorage:new{
title = _("Long-press to select directory"),
title = _("Long-press to select folder"),
item = self.item,
onConfirm = function(dir_path)
self.onConfirm(dir_path)

@ -715,7 +715,7 @@ common_settings.document = {
common_settings.language = Language:getLangMenuTable()
common_settings.screenshot = {
text = _("Screenshot directory"),
text = _("Screenshot folder"),
callback = function()
local Screenshoter = require("ui/widget/screenshoter")
Screenshoter:chooseFolder()

@ -53,7 +53,7 @@ The file browser will only show document or ebook files that KOReader can read.
In the file browser, you can tap on any file to open it. Long press on any file to bring up a menu with more options. The location path display above the list of files and folders shows you which folder you're viewing. The `../` entry, at the top of the listed folders, lets you go *up* one level. For instance, if you are at `/mnt/onboard` now, tapping the `../` will bring you to `/mnt/`.
Once you have found the folder you have your books listed in, you can long press the selection that opens that folder and you should see a message box popup with the option to **Set as HOME directory**.
Once you have found the folder you have your books listed in, you can long press the selection that opens that folder and you should see a message box popup with the option to **Set as HOME folder**.
## Defaults <a id="defaults"></a>

@ -65,7 +65,7 @@ function Screensaver:chooseFolder()
local buttons = {}
table.insert(buttons, {
{
text = _("Choose screensaver directory"),
text = _("Choose screensaver folder"),
callback = function()
UIManager:close(self.choose_dialog)
require("ui/downloadmgr"):new{
@ -94,7 +94,7 @@ function Screensaver:chooseFolder()
screensaver_dir = DataStorage:getDataDir() .. "/screenshots/"
end
self.choose_dialog = ButtonDialogTitle:new{
title = T(_("Current screensaver image directory:\n%1"), BD.dirpath(screensaver_dir)),
title = T(_("Current screensaver image folder:\n%1"), BD.dirpath(screensaver_dir)),
buttons = buttons
}
UIManager:show(self.choose_dialog)

@ -30,7 +30,7 @@ local PathChooser = FileChooser:extend{
function PathChooser:init()
if self.title == true then -- default title depending on options
if self.select_directory and not self.select_file then
self.title = _("Long-press to select directory")
self.title = _("Long-press to select folder")
elseif not self.select_directory and self.select_file then
self.title = _("Long-press to select file")
else

@ -61,14 +61,14 @@ function Screenshoter:chooseFolder()
local buttons = {}
table.insert(buttons, {
{
text = _("Choose screenshot directory"),
text = _("Choose screenshot folder"),
callback = function()
UIManager:close(self.choose_dialog)
require("ui/downloadmgr"):new{
onConfirm = function(path)
G_reader_settings:saveSetting("screenshot_dir", path .. "/")
UIManager:show(InfoMessage:new{
text = T(_("Screenshot directory set to:\n%1"), BD.dirpath(path)),
text = T(_("Screenshot folder set to:\n%1"), BD.dirpath(path)),
timeout = 3,
})
end,
@ -86,7 +86,7 @@ function Screenshoter:chooseFolder()
})
local screenshot_dir = G_reader_settings:readSetting("screenshot_dir") or DataStorage:getDataDir() .. "/screenshots/"
self.choose_dialog = ButtonDialogTitle:new{
title = T(_("Current screenshot directory:\n%1"), BD.dirpath(screenshot_dir)),
title = T(_("Current screenshot folder:\n%1"), BD.dirpath(screenshot_dir)),
buttons = buttons
}
UIManager:show(self.choose_dialog)

@ -248,7 +248,7 @@ function Calibre:getWirelessMenuTable()
end,
},
{
text = _("Set inbox directory"),
text = _("Set inbox folder"),
enabled_func = isEnabled,
callback = function()
CalibreWireless:setInboxDir()

@ -65,7 +65,7 @@ function MoveToArchive:addToMainMenu(menu_items)
end,
},
{
text = _("Set archive directory"),
text = _("Set archive folder"),
keep_menu_open = true,
callback = function()
self:setArchiveDirectory()

@ -115,7 +115,7 @@ function NewsDownloader:addToMainMenu(menu_items)
callback = function() self:changeFeedConfig() end,
},
{
text = _("Set custom download directory"),
text = _("Set custom download folder"),
keep_menu_open = true,
callback = function() self:setCustomDownloadDirectory() end,
},

@ -83,7 +83,7 @@ function Send2Ebook:addToMainMenu(menu_items)
callback = self.removeReadActicles,
},
{
text = _("Set custom download directory"),
text = _("Set custom download folder"),
keep_menu_open = true,
callback = self.setCustomDownloadDirectory,
},

Loading…
Cancel
Save