diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-25 16:06:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-25 16:06:55 +0100 |
commit | fd257f9e1936b0bc9bc9116bd73eaa04a7dbd060 (patch) | |
tree | 7addfbd8579d9ca87d4fde7de42e3c2f5179217e /cui | |
parent | a4feeebd3780d59605ba6b4c266226c6841d043b (diff) |
Resolves: fdo#48659 force BUILDID placeholder in if missing from translation
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/about.cxx | 9 | ||||
-rw-r--r-- | cui/source/inc/about.hxx | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index dd39869da648..21473b70a972 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -78,7 +78,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : aWebsiteButton ( this, ResId( ABOUT_BTN_WEBSITE, *rId.GetResMgr() ) ), aLicenseButton ( this, ResId( ABOUT_BTN_LICENSE, *rId.GetResMgr() ) ), aCancelButton ( this, ResId( ABOUT_BTN_CANCEL, *rId.GetResMgr() ) ), - aVersionTextStr(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())), + aVersionTextStr(ResId::toString(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())).trim()), m_aVendorTextStr(ResId(ABOUT_STR_VENDOR, *rId.GetResMgr())), m_aCopyrightTextStr(ResId(ABOUT_STR_COPYRIGHT, *rId.GetResMgr())), m_aBasedTextStr(ResId(ABOUT_STR_BASED, *rId.GetResMgr())), @@ -372,9 +372,14 @@ rtl::OUString AboutDialog::GetVersionString() rtl::OUString sBuildId = GetBuildId(); - if (!(sBuildId.trim()).isEmpty()) + if (!sBuildId.trim().isEmpty()) { sVersion += " "; + if (m_sBuildStr.indexOf("$BUILDID") == -1) + { + SAL_WARN( "cui.dialogs", "translated Build Id string in translations doesn't contain $BUILDID placeholder" ); + m_sBuildStr += " $BUILDID"; + } sVersion += m_sBuildStr.replaceAll("$BUILDID", sBuildId); } diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index a665215cdd66..a666c1a3991b 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -57,7 +57,7 @@ private: CancelButton aCancelButton; String aVersionData; - String aVersionTextStr; + rtl::OUString aVersionTextStr; String m_aVendorTextStr; String m_aCopyrightTextStr; String m_aBasedTextStr; |