From e98d21f6821746d9c3fa10f1ee169ad5186fb3ae Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Sun, 6 Jul 2014 18:36:05 -0400 Subject: [PATCH] addon/mg: Choose "update" vs. "install" terms when using Update All too Previously the "update" terminology was only used when the Upgradable view was the active view. Now that the Update All action may be available on other views, we need to take care to use the correct terms for it too. This commit incurs in no changes to existing translatable strings. --- src/addon/manager_ui.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/addon/manager_ui.cpp b/src/addon/manager_ui.cpp index 65010055ac93..6a92cc81233c 100644 --- a/src/addon/manager_ui.cpp +++ b/src/addon/manager_ui.cpp @@ -893,22 +893,26 @@ void show_addons_manager_dialog(display& disp, addons_client& client, addons_lis const char* msg_title = NULL; const char* msg_text = NULL; + // Use the Update terminology when using Update All or working with the + // Upgradable add-ons view. + const bool updating = update_everything || updates_only; + if(ids_to_install.size() == 1 && failed_titles.empty()) { utils::string_map syms; syms["addon_title"] = addons[ids_to_install[0]].title; - msg_title = !updates_only ? _("Add-on Installed") : _("Add-on Updated"); - msg_text = !updates_only ? _("The add-on '$addon_title|' has been successfully installed.") : _("The add-on '$addon_title|' has been successfully updated."); + msg_title = !updating ? _("Add-on Installed") : _("Add-on Updated"); + msg_text = !updating ? _("The add-on '$addon_title|' has been successfully installed.") : _("The add-on '$addon_title|' has been successfully updated."); gui2::show_transient_message(disp.video(), msg_title, utils::interpolate_variables_into_string(msg_text, &syms)); } else if(failed_titles.empty()) { - msg_title = !updates_only ? _("Add-ons Installed") : _("Add-ons Updated"); - msg_text = !updates_only ? _("All add-ons installed successfully.") : _("All add-ons updated successfully."); + msg_title = !updating ? _("Add-ons Installed") : _("Add-ons Updated"); + msg_text = !updating ? _("All add-ons installed successfully.") : _("All add-ons updated successfully."); gui2::show_transient_message(disp.video(), msg_title, msg_text); } else { - msg_title = !updates_only ? _("Installation Failed") : _("Update Failed"); + msg_title = !updating ? _("Installation Failed") : _("Update Failed"); msg_text = _n( "The following add-on could not be downloaded or installed successfully:", "The following add-ons could not be downloaded or installed successfully:",