diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2020-09-11 00:44:03 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2020-09-11 10:26:38 +0200 |
commit | 627e13079adb5ff6281530c9584da9065d6410ab (patch) | |
tree | 2a0ea8dabe18a2cf039bfe51311e1256086dd217 | |
parent | 8ee88230c110ae90b439a52bc2906d6c5383967f (diff) |
Additions: Clean-up and localize labels
Change-Id: I7073df0d277399745a9c7e0de4d240121ce7b37b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102410
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
-rw-r--r-- | cui/inc/strings.hrc | 3 | ||||
-rw-r--r-- | cui/source/dialogs/AdditionsDialog.cxx | 19 |
2 files changed, 12 insertions, 10 deletions
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index d1b39a67e541..92f5b665c7ee 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -393,11 +393,12 @@ #define RID_SVXSTR_DELETEUSERCOLOR2 NC_("RID_SVXSTR_DELETEUSERCOLOR2", "Please select the color to delete") #define RID_SVXSTR_ADDITIONS_INSTALLBUTTON NC_("RID_SVXSTR_ADDITIONS_INSTALLBUTTON", "Install") +#define RID_SVXSTR_ADDITIONS_INSTALLEDBUTTON NC_("RID_SVXSTR_ADDITIONS_INSTALLEDBUTTON", "Installed") +#define RID_SVXSTR_ADDITIONS_INSTALLING NC_("RID_SVXSTR_ADDITIONS_INSTALLING", "Installing") #define RID_SVXSTR_ADDITIONS_LICENCE NC_("RID_SVXSTR_ADDITIONS_LICENCE", "License:") #define RID_SVXSTR_ADDITIONS_REQUIREDVERSION NC_("RID_SVXSTR_ADDITIONS_REQUIREDVERSION","Required version: >=") #define RID_SVXSTR_ADDITIONS_SEARCHING NC_("RID_SVXSTR_ADDITIONS_SEARCHING", "Searching...") #define RID_SVXSTR_ADDITIONS_LOADING NC_("RID_SVXSTR_ADDITIONS_LOADING", "Loading...") -#define RID_SVXSTR_ADDITIONS_NORESULTS NC_("ID_SVXSTR_ADDITIONS_NORESULTS", "No results found") #define RID_SVXSTR_ADDITIONS_DIALOG_TITLE_PREFIX NC_("RID_SVXSTR_ADDITIONS_DIALOG_TITLE_PREFIX", "Extensions") #endif diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index fcae696e7e5f..c9b70b2bf908 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -408,7 +408,8 @@ void SearchAndParseThread::CheckInstalledExtensions() else { rInfo->m_xButtonInstall->set_sensitive(false); - rInfo->m_xButtonInstall->set_label("Installed"); + rInfo->m_xButtonInstall->set_label( + CuiResId(RID_SVXSTR_ADDITIONS_INSTALLEDBUTTON)); } } } @@ -756,14 +757,14 @@ IMPL_LINK_NOARG(AdditionsItem, ShowMoreHdl, weld::Button&, void) IMPL_LINK_NOARG(AdditionsItem, InstallHdl, weld::Button&, void) { - m_xButtonInstall->set_label("Installing"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLING)); m_xButtonInstall->set_sensitive(false); OUString aExtensionFile; bool bResult = getExtensionFile(aExtensionFile); // info vector json data if (!bResult) { - m_xButtonInstall->set_label("Install"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON)); m_xButtonInstall->set_sensitive(true); SAL_INFO("cui.dialogs", "Couldn't get the extension file."); @@ -778,36 +779,36 @@ IMPL_LINK_NOARG(AdditionsItem, InstallHdl, weld::Button&, void) { m_pParentDialog->m_xExtensionManager->addExtension( aExtensionFile, uno::Sequence<beans::NamedValue>(), "user", xAbortChannel, xCmdEnv); - m_xButtonInstall->set_label("Installed"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLEDBUTTON)); } catch (const ucb::CommandFailedException) { SAL_WARN("cui.dialogs", "Additions: addExtension CommandFailedException occurred."); - m_xButtonInstall->set_label("Install"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON)); m_xButtonInstall->set_sensitive(true); } catch (const ucb::CommandAbortedException) { SAL_WARN("cui.dialogs", "Additions: addExtension CommandAbortedException occurred."); - m_xButtonInstall->set_label("Install"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON)); m_xButtonInstall->set_sensitive(true); } catch (const deployment::DeploymentException) { SAL_WARN("cui.dialogs", "Additions: addExtension DeploymentException occurred."); - m_xButtonInstall->set_label("Install"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON)); m_xButtonInstall->set_sensitive(true); } catch (const lang::IllegalArgumentException) { SAL_WARN("cui.dialogs", "Additions: addExtension IllegalArgumentException occurred."); - m_xButtonInstall->set_label("Install"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON)); m_xButtonInstall->set_sensitive(true); } catch (const css::uno::Exception) { SAL_WARN("cui.dialogs", "Additions: addExtension Exception occurred."); - m_xButtonInstall->set_label("Install"); + m_xButtonInstall->set_label(CuiResId(RID_SVXSTR_ADDITIONS_INSTALLBUTTON)); m_xButtonInstall->set_sensitive(true); } } |