summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorSeth Chaiklin <sdc.blanco@youmail.dk>2019-12-16 16:53:19 +0100
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2019-12-18 07:59:24 +0100
commit1bc50aca32a2c76017a552a06dca2c941ab38f7a (patch)
tree666f7b390224cbc87ac2d9c4470473d260d2d345 /cui/source
parent09ff0a177753fdb6337239d908b72385913fbf51 (diff)
tdf#127294 Remove spaces; follow design guidelines for tips-of-the-day
- converted to design guidelines all quotes all menus items apostrophe (U+2019) em-dash (U+2014) minus (U+2212) expanded contractions - Corrected spelling and grammar mistakes. - Simplified wording in some tips - tried to clarify uri explanation in relation to help Change-Id: Ic9984fdc09813d2b43324a104d5c30420671c6b9 Reviewed-on: https://gerrit.libreoffice.org/85228 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/tipofthedaydlg.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx
index 25722420ddfc..7d6a05b72a0f 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -79,6 +79,21 @@ void TipOfTheDayDialog::UpdateTip()
// text
OUString aText = CuiResId(std::get<0>(TIPOFTHEDAY_STRINGARRAY[nCurrentTip]));
+//replace MOD1 & MOD2 shortcuts depending on platform
+#ifdef MACOSX
+ const OUString aMOD1 = CuiResId(STR_CMD);
+ const OUString aMOD2 = CuiResId(STR_Option);
+#else
+ const OUString aMOD1 = CuiResId(STR_CTRL);
+ const OUString aMOD2 = CuiResId(STR_Alt);
+#endif
+ sal_Int32 aPos;
+ aPos = aText.indexOf("%MOD1");
+ if (aPos != -1)
+ aText = aText.replaceAt(aPos, 5, aMOD1);
+ aPos = aText.indexOf("%MOD2");
+ if (aPos != -1)
+ aText = aText.replaceAt(aPos, 5, aMOD2);
m_pText->set_label(aText);
// hyperlink
@@ -91,7 +106,7 @@ void TipOfTheDayDialog::UpdateTip()
{
// Links may have some %PRODUCTVERSION which need to be expanded
aText = Translate::ExpandVariables(aLink);
- sal_Int32 aPos = aText.indexOf("%LANGUAGENAME");
+ aPos = aText.indexOf("%LANGUAGENAME");
if (aPos != -1)
{
OUString aLang = LanguageTag(utl::ConfigManager::getUILocale()).getLanguage();