Standardize select/choose to choose (#8128)

Closes #8105.
reviewable/pr8131/r1
hius07 3 years ago committed by GitHub
parent a558376471
commit 684fd6c12d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -344,7 +344,7 @@ end
function CloudStorage:onMenuHold(item) function CloudStorage:onMenuHold(item)
if item.type == "folder_long_press" then if item.type == "folder_long_press" then
local title = T(_("Select this folder?\n\n%1"), BD.dirpath(item.url)) local title = T(_("Choose this folder?\n\n%1"), BD.dirpath(item.url))
local onConfirm = self.onConfirm local onConfirm = self.onConfirm
local button_dialog local button_dialog
button_dialog = ButtonDialogTitle:new{ button_dialog = ButtonDialogTitle:new{
@ -358,7 +358,7 @@ function CloudStorage:onMenuHold(item)
end, end,
}, },
{ {
text = _("Select"), text = _("Choose"),
callback = function() callback = function()
if onConfirm then if onConfirm then
onConfirm(item.url) onConfirm(item.url)

@ -139,7 +139,7 @@ function DropBoxApi:listFolder(path, token, folder_mode)
-- Add special folder. -- Add special folder.
if folder_mode then if folder_mode then
table.insert(dropbox_list, 1, { table.insert(dropbox_list, 1, {
text = _("Long-press to select current folder"), text = _("Long-press to choose current folder"),
url = path, url = path,
type = "folder_long_press", type = "folder_long_press",
}) })

@ -192,7 +192,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
}, },
{ {
{ {
text = _("Select another folder"), text = _("Choose other folder"),
callback = function() callback = function()
UIManager:close(dialog) UIManager:close(dialog)
-- Use currently read book's directory as starting point, -- Use currently read book's directory as starting point,
@ -250,7 +250,7 @@ function ReaderWikipedia:addToMainMenu(menu_items)
local text = _([[ local text = _([[
Wikipedia articles can be saved as an EPUB for more comfortable reading. Wikipedia articles can be saved as an EPUB for more comfortable reading.
You can select an existing folder, or use a default folder named "Wikipedia" in your reader's home folder. You can choose an existing folder, or use a default folder named "Wikipedia" in your reader's home folder.
Where do you want them saved?]]) Where do you want them saved?]])
UIManager:show(ConfirmBox:new{ UIManager:show(ConfirmBox:new{
@ -265,7 +265,7 @@ Where do you want them saved?]])
text = T(_("Wikipedia 'Save as EPUB' folder set to:\n%1"), BD.dirpath(wikipedia_dir)), text = T(_("Wikipedia 'Save as EPUB' folder set to:\n%1"), BD.dirpath(wikipedia_dir)),
}) })
end, end,
cancel_text = _("Select folder"), cancel_text = _("Choose folder"),
cancel_callback = function() cancel_callback = function()
choose_directory() choose_directory()
end, end,

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

@ -294,7 +294,7 @@ function FileChooser:genItemTableFromPath(path)
if dir.name == ".." then if dir.name == ".." then
text = up_folder_arrow text = up_folder_arrow
elseif dir.name == "." then -- possible with show_current_dir_for_hold elseif dir.name == "." then -- possible with show_current_dir_for_hold
text = _("Long-press to select current folder") text = _("Long-press to choose current folder")
elseif dir.name == "./." then -- added as content of an unreadable directory elseif dir.name == "./." then -- added as content of an unreadable directory
text = _("Current folder not readable. Some content may not be shown.") text = _("Current folder not readable. Some content may not be shown.")
else else

@ -30,11 +30,11 @@ local PathChooser = FileChooser:extend{
function PathChooser:init() function PathChooser:init()
if self.title == true then -- default title depending on options if self.title == true then -- default title depending on options
if self.select_directory and not self.select_file then if self.select_directory and not self.select_file then
self.title = _("Long-press to select folder") self.title = _("Long-press to choose a folder")
elseif not self.select_directory and self.select_file then elseif not self.select_directory and self.select_file then
self.title = _("Long-press to select file") self.title = _("Long-press to choose a file")
else else
self.title = _("Long-press to select") self.title = _("Long-press to choose")
end end
end end
self.show_hidden = G_reader_settings:isTrue("show_hidden") self.show_hidden = G_reader_settings:isTrue("show_hidden")
@ -42,7 +42,7 @@ function PathChooser:init()
self.file_filter = function() return false end -- filter out regular files self.file_filter = function() return false end -- filter out regular files
end end
if self.select_directory then if self.select_directory then
-- Let FileChooser display "Long press to select current folder" -- Let FileChooser display "Long-press to choose current folder"
self.show_current_dir_for_hold = true self.show_current_dir_for_hold = true
end end
FileChooser.init(self) FileChooser.init(self)
@ -104,15 +104,15 @@ function PathChooser:onMenuHold(item)
if self.detailed_file_info then if self.detailed_file_info then
local filesize = util.getFormattedSize(attr.size) local filesize = util.getFormattedSize(attr.size)
local lastmod = os.date("%Y-%m-%d %H:%M", attr.modification) local lastmod = os.date("%Y-%m-%d %H:%M", attr.modification)
title = T(_("Select this file?\n\n%1\n\nFile size: %2 bytes\nLast modified: %3"), title = T(_("Choose this file?\n\n%1\n\nFile size: %2 bytes\nLast modified: %3"),
BD.filepath(path), filesize, lastmod) BD.filepath(path), filesize, lastmod)
else else
title = T(_("Select this file?\n\n%1"), BD.filepath(path)) title = T(_("Choose this file?\n\n%1"), BD.filepath(path))
end end
elseif attr.mode == "directory" then elseif attr.mode == "directory" then
title = T(_("Select this folder?\n\n%1"), BD.dirpath(path)) title = T(_("Choose this folder?\n\n%1"), BD.dirpath(path))
else -- just in case we get something else else -- just in case we get something else
title = T(_("Select this path?\n\n%1"), BD.path(path)) title = T(_("Choose this path?\n\n%1"), BD.path(path))
end end
local onConfirm = self.onConfirm local onConfirm = self.onConfirm
self.button_dialog = ButtonDialogTitle:new{ self.button_dialog = ButtonDialogTitle:new{
@ -126,7 +126,7 @@ function PathChooser:onMenuHold(item)
end, end,
}, },
{ {
text = _("Select"), text = _("Choose"),
callback = function() callback = function()
if onConfirm then if onConfirm then
onConfirm(path) onConfirm(path)

@ -436,14 +436,14 @@ If fallback is disabled, the screensaver image will stay in place after closing
local set_image_text = _([[ local set_image_text = _([[
You can either choose an existing file: You can either choose an existing file:
- Select a file - Choose a file
or specify a new file: or specify a new file:
- First select a folder - First choose a folder
- Then add the name of the new file - Then add the name of the new file
or delete the path: or delete the path:
- First select a folder - First choose a folder
- Clear the name of the file]]) - Clear the name of the file]])
-- menu entry: Cache settings -- menu entry: Cache settings
@ -495,7 +495,7 @@ function CoverImage:menuEntryCache()
end, end,
}, },
self:menuEntrySetPath("cover_image_cache_path", _("Cover cache folder"), _("Current cache path:\n%1"), self:menuEntrySetPath("cover_image_cache_path", _("Cover cache folder"), _("Current cache path:\n%1"),
("Select a cache folder. The contents of the old folder will be migrated."), default_cache_path, true, false, self.migrateCache), ("Choose a cache folder. The contents of the old folder will be migrated."), default_cache_path, true, false, self.migrateCache),
{ {
text = _("Clear cached covers"), text = _("Clear cached covers"),
help_text_func = function() help_text_func = function()
@ -738,7 +738,7 @@ function CoverImage:addToMainMenu(menu_items)
}, },
-- menu entry: set fallback image -- menu entry: set fallback image
self:menuEntrySetPath("cover_image_fallback_path", _("Set fallback path"), self:menuEntrySetPath("cover_image_fallback_path", _("Set fallback path"),
_("The fallback image used on document close is:\n%1"), _("You can select a fallback image."), default_fallback_path, false, false), _("The fallback image used on document close is:\n%1"), _("You can choose a fallback image."), default_fallback_path, false, false),
-- menu entry: fallback -- menu entry: fallback
{ {
text = _("Turn on fallback image"), text = _("Turn on fallback image"),

@ -658,7 +658,7 @@ function OPDSBrowser:showDownloads(item)
-- Set download folder and book info buttons. -- Set download folder and book info buttons.
table.insert(buttons, { table.insert(buttons, {
{ {
text = _("Select folder"), text = _("Choose folder"),
callback = function() callback = function()
require("ui/downloadmgr"):new{ require("ui/downloadmgr"):new{
onConfirm = function(path) onConfirm = function(path)

@ -331,7 +331,7 @@ function TextEditor:newFile()
UIManager:show(ConfirmBox:new{ UIManager:show(ConfirmBox:new{
text = _([[To start editing a new file, you will have to: text = _([[To start editing a new file, you will have to:
- First select a folder - First choose a folder
- Then enter a name for the new file - Then enter a name for the new file
- And start editing it - And start editing it

Loading…
Cancel
Save