include/sfx2/strings.hrc | 1 + sfx2/source/dialog/backingwindow.cxx | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-)
New commits: commit a8ef5e9e495e95eb79138ad74f6492ec2c0cffea Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Tue Aug 27 18:10:40 2024 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Tue Sep 3 15:35:47 2024 +0200 Donate must not point to Extension Cherry-picks missing pieces from I83d10d7230722d38914934d59d70ece471e62599 and Ia8205dd32ee7fd3f67ae2c3f6fec4366c2c4d4f7 Change-Id: Ie4742d6e10fc16aad725a3660c86634626004a42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172473 Tested-by: Hossein <hoss...@libreoffice.org> Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> Reviewed-by: Hossein <hoss...@libreoffice.org> Tested-by: Jenkins (cherry picked from commit 4fad15c3bd56cd6c3cd4894a0e83702bcf54db56) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172750 Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc index 35997819573d..d8e1de9ae66c 100644 --- a/include/sfx2/strings.hrc +++ b/include/sfx2/strings.hrc @@ -259,6 +259,7 @@ #define STR_GET_INVOLVED_TEXT NC_("STR_GET_INVOLVED_TEXT", "Help us make %PRODUCTNAME even better!") #define STR_GET_INVOLVED_BUTTON NC_("STR_GET_INVOLVED_BUTTON", "Get involved") #define STR_DONATE_TEXT NC_("STR_DONATE_TEXT", "Your donations support our worldwide community.") +// Translators: text will be abbreviated at >8 characters, eg. "Please D..." #define STR_DONATE_BUTTON NC_("STR_DONATE_BUTTON", "Donate") #define STR_WHATSNEW_TEXT NC_("STR_WHATSNEW", "You are running version %PRODUCTVERSION of %PRODUCTNAME for the first time. Do you want to learn what's new?") #define STR_WHATSNEW_BUTTON NC_("STR_WHATSNEW_BUTTON", "Release Notes") diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 323f5ae554ed..599f2fc28c83 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -197,7 +197,13 @@ BackingWindow::BackingWindow(vcl::Window* i_pParent) if (officecfg::Office::Common::Misc::ShowDonation::get()) { mxExtensionsButton->set_from_icon_name(BMP_DONATE); - mxExtensionsButton->set_label(SfxResId(STR_DONATE_BUTTON)); + OUString sDonate(SfxResId(STR_DONATE_BUTTON)); + if (sDonate.getLength() > 8) + { + mxExtensionsButton->set_tooltip_text(sDonate); + sDonate = OUString::Concat(sDonate.subView(0, 7)) + "..."; + } + mxExtensionsButton->set_label(sDonate); } mxDropTarget = mxAllRecentThumbnails->GetDropTarget(); @@ -544,9 +550,15 @@ IMPL_LINK(BackingWindow, ExtLinkClickHdl, weld::Button&, rButton,void) try { - OUString sURL(officecfg::Office::Common::Menus::ExtensionsURL::get() + - "?LOvers=" + utl::ConfigManager::getProductVersion() + - "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47() ); + OUString sURL; + if (officecfg::Office::Common::Misc::ShowDonation::get()) + sURL = officecfg::Office::Common::Menus::DonationURL::get() + + "?BCP47=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47() + + "&LOlang=" + LanguageTag(utl::ConfigManager::getUILocale()).getLanguage(); + else + sURL = officecfg::Office::Common::Menus::ExtensionsURL::get() + + "?LOvers=" + utl::ConfigManager::getProductVersion() + + "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47(); Reference<css::system::XSystemShellExecute> const xSystemShellExecute(