[Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 18 04:02:32 PST 2012
l10ntools/source/po.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 124dc60e5519ee4d1c2454050b6f54a7b020905d
Author: Andras Timar <atimar at suse.com>
Date: Sun Nov 18 13:04:33 2012 +0100
Revert "put filename into msgctxt, because po entries must be unique"
This reverts commit 889574a50c8f5bdffed9f3eb70426cedae0a589c.
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 2ccaed6..df9efe3 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -452,8 +452,7 @@ PoEntry::PoEntry(const OString& rSDFLine, const TYPE eType)
copy(vParts[SOURCEFILE].lastIndexOf("\\")+1));
OString sMsgCtxt =
- vParts[SOURCEFILE].copy(vParts[SOURCEFILE].lastIndexOf("\\")+1) +
- "\n" + vParts[GROUPID] + "\n" +
+ vParts[GROUPID] + "\n" +
(vParts[LOCALID].isEmpty() ? "" : vParts[LOCALID] + "\n") +
vParts[RESOURCETYPE];
switch(eType){
@@ -528,7 +527,7 @@ OString PoEntry::getSourceFile() const
OString PoEntry::getGroupId() const
{
assert( m_bIsInitialized );
- return m_pGenPo->getMsgCtxt().getToken(1,'\n');
+ return m_pGenPo->getMsgCtxt().getToken(0,'\n');
}
//Get localid
@@ -539,7 +538,7 @@ OString PoEntry::getLocalId() const
if (sMsgCtxt.indexOf('\n')==sMsgCtxt.lastIndexOf('\n'))
return OString();
else
- return sMsgCtxt.getToken(2,'\n');
+ return sMsgCtxt.getToken(1,'\n');
}
//Get the type of component from which entry is extracted
@@ -548,9 +547,9 @@ OString PoEntry::getResourceType() const
assert( m_bIsInitialized );
const OString sMsgCtxt = m_pGenPo->getMsgCtxt();
if (sMsgCtxt.indexOf('\n')==sMsgCtxt.lastIndexOf('\n'))
- return sMsgCtxt.getToken(2,'\n').getToken(0,'.');
+ return sMsgCtxt.getToken(1,'\n').getToken(0,'.');
else
- return sMsgCtxt.getToken(3,'\n').getToken(0,'.');
+ return sMsgCtxt.getToken(2,'\n').getToken(0,'.');
}
//Get the type of entry
More information about the Libreoffice-commits
mailing list