summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-16 10:12:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-03-16 10:25:41 +0000
commitc9be863a12bc7419a0a1302700f747f0a7e1052b (patch)
treeb7a4fcc75ab420e22440e205eeec8f42f2f4ef59 /l10ntools
parenta57c44486aa3d0e7ff0df9897950453d66c789c9 (diff)
Resolves: tdf#98473 replace || with ‖ to avoid illegal gtk3 action names
again, was reverted by commit 48c2e04bdb60429823cb8b12a14d954af544a2bf Date: Mon Mar 14 22:10:23 2016 +0100 which I'm assuming was a merge error Change-Id: Iad3c2149438822d1e8b1406e35372a3e2b50bfa3
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/merge.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 3922e89f0b9d..7789e3bad730 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -121,13 +121,22 @@ bool MergeEntrys::GetText( OString &rReturn,
return bReturn;
}
+namespace
+{
+ OString GetDoubleBars()
+ {
+ //DOUBLE VERTICAL LINE instead of || because the translations make their
+ //way into action_names under gtk3 where || is illegal
+ return OUStringToOString(OUString(static_cast<sal_Unicode>(0x2016)), RTL_TEXTENCODING_UTF8);
+ }
+}
OString MergeEntrys::GetQTZText(const ResData& rResData, const OString& rOrigText)
{
const OString sFilename = rResData.sFilename.copy(rResData.sFilename.lastIndexOf('/')+1);
const OString sKey =
PoEntry::genKeyId(sFilename + rResData.sGId + rResData.sId + rResData.sResTyp + rOrigText);
- return sKey + "||" + rOrigText;
+ return sKey + GetDoubleBars() + rOrigText;
}
@@ -411,9 +420,9 @@ void MergeDataFile::InsertEntry(
const OString sTemp = rInFilename + rGID + rLID + rTYP;
pMergeEntrys->InsertEntry(
nLANG,
- rTEXT.isEmpty()? rTEXT : PoEntry::genKeyId(sTemp + rTEXT) + "||" + rTEXT,
- rQHTEXT.isEmpty()? rQHTEXT : PoEntry::genKeyId(sTemp + rQHTEXT) + "||" + rQHTEXT,
- rTITLE.isEmpty()? rTITLE : PoEntry::genKeyId(sTemp + rTITLE) + "||" + rTITLE );
+ rTEXT.isEmpty()? rTEXT : PoEntry::genKeyId(sTemp + rTEXT) + GetDoubleBars() + rTEXT,
+ rQHTEXT.isEmpty()? rQHTEXT : PoEntry::genKeyId(sTemp + rQHTEXT) + GetDoubleBars() + rQHTEXT,
+ rTITLE.isEmpty()? rTITLE : PoEntry::genKeyId(sTemp + rTITLE) + GetDoubleBars() + rTITLE );
}
else
{