From 1bd4636a037ee6c8587c706c36d7e96008ec802a Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 22 Feb 2021 18:44:16 +0100 Subject: [PATCH] Standardize directory/folder to folder (#7328) Closes . --- frontend/apps/cloudstorage/cloudstorage.lua | 4 ++-- frontend/apps/filemanager/filemanager.lua | 8 ++++---- frontend/apps/filemanager/filemanagermenu.lua | 2 +- .../apps/reader/modules/readerwikipedia.lua | 18 +++++++++--------- frontend/ui/cloudmgr.lua | 2 +- .../ui/elements/common_settings_menu_table.lua | 2 +- frontend/ui/quickstart.lua | 2 +- frontend/ui/screensaver.lua | 4 ++-- frontend/ui/widget/pathchooser.lua | 2 +- frontend/ui/widget/screenshoter.lua | 6 +++--- plugins/calibre.koplugin/main.lua | 2 +- plugins/movetoarchive.koplugin/main.lua | 2 +- plugins/newsdownloader.koplugin/main.lua | 2 +- plugins/send2ebook.koplugin/main.lua | 2 +- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/frontend/apps/cloudstorage/cloudstorage.lua b/frontend/apps/cloudstorage/cloudstorage.lua index fafaa2d69..10b4247c4 100644 --- a/frontend/apps/cloudstorage/cloudstorage.lua +++ b/frontend/apps/cloudstorage/cloudstorage.lua @@ -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{ diff --git a/frontend/apps/filemanager/filemanager.lua b/frontend/apps/filemanager/filemanager.lua index 41f6e9dc6..4360efe96 100644 --- a/frontend/apps/filemanager/filemanager.lua +++ b/frontend/apps/filemanager/filemanager.lua @@ -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) diff --git a/frontend/apps/filemanager/filemanagermenu.lua b/frontend/apps/filemanager/filemanagermenu.lua index 87537c477..054814438 100644 --- a/frontend/apps/filemanager/filemanagermenu.lua +++ b/frontend/apps/filemanager/filemanagermenu.lua @@ -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, diff --git a/frontend/apps/reader/modules/readerwikipedia.lua b/frontend/apps/reader/modules/readerwikipedia.lua index 31ade8227..919dc108c 100644 --- a/frontend/apps/reader/modules/readerwikipedia.lua +++ b/frontend/apps/reader/modules/readerwikipedia.lua @@ -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, diff --git a/frontend/ui/cloudmgr.lua b/frontend/ui/cloudmgr.lua index 5269762cd..979f41cff 100644 --- a/frontend/ui/cloudmgr.lua +++ b/frontend/ui/cloudmgr.lua @@ -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) diff --git a/frontend/ui/elements/common_settings_menu_table.lua b/frontend/ui/elements/common_settings_menu_table.lua index 4e9b233c4..e232c176c 100644 --- a/frontend/ui/elements/common_settings_menu_table.lua +++ b/frontend/ui/elements/common_settings_menu_table.lua @@ -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() diff --git a/frontend/ui/quickstart.lua b/frontend/ui/quickstart.lua index 8116b379e..988e22ed1 100644 --- a/frontend/ui/quickstart.lua +++ b/frontend/ui/quickstart.lua @@ -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 diff --git a/frontend/ui/screensaver.lua b/frontend/ui/screensaver.lua index c5bdc283b..5a0d4cf59 100644 --- a/frontend/ui/screensaver.lua +++ b/frontend/ui/screensaver.lua @@ -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) diff --git a/frontend/ui/widget/pathchooser.lua b/frontend/ui/widget/pathchooser.lua index cc43679d7..695fbcb9f 100644 --- a/frontend/ui/widget/pathchooser.lua +++ b/frontend/ui/widget/pathchooser.lua @@ -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 diff --git a/frontend/ui/widget/screenshoter.lua b/frontend/ui/widget/screenshoter.lua index 0eda9b411..c6761f6ed 100644 --- a/frontend/ui/widget/screenshoter.lua +++ b/frontend/ui/widget/screenshoter.lua @@ -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) diff --git a/plugins/calibre.koplugin/main.lua b/plugins/calibre.koplugin/main.lua index ac0b2aba7..fbde7cc7d 100644 --- a/plugins/calibre.koplugin/main.lua +++ b/plugins/calibre.koplugin/main.lua @@ -248,7 +248,7 @@ function Calibre:getWirelessMenuTable() end, }, { - text = _("Set inbox directory"), + text = _("Set inbox folder"), enabled_func = isEnabled, callback = function() CalibreWireless:setInboxDir() diff --git a/plugins/movetoarchive.koplugin/main.lua b/plugins/movetoarchive.koplugin/main.lua index e332d64a2..9d59603fb 100644 --- a/plugins/movetoarchive.koplugin/main.lua +++ b/plugins/movetoarchive.koplugin/main.lua @@ -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() diff --git a/plugins/newsdownloader.koplugin/main.lua b/plugins/newsdownloader.koplugin/main.lua index ae4ef57d7..488a4e36c 100644 --- a/plugins/newsdownloader.koplugin/main.lua +++ b/plugins/newsdownloader.koplugin/main.lua @@ -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, }, diff --git a/plugins/send2ebook.koplugin/main.lua b/plugins/send2ebook.koplugin/main.lua index 771b6e49f..fd83b45cc 100644 --- a/plugins/send2ebook.koplugin/main.lua +++ b/plugins/send2ebook.koplugin/main.lua @@ -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, },