diff options
author | Andras Timar <atimar@suse.com> | 2012-11-18 12:47:54 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-11-18 12:48:24 +0100 |
commit | 889574a50c8f5bdffed9f3eb70426cedae0a589c (patch) | |
tree | b93a26fbe5d6ac56ae1abeee98cea9cde114d3ef /l10ntools | |
parent | 302a099e5264742204b625f1cce949892d8a84f9 (diff) |
put filename into msgctxt, because po entries must be unique
Change-Id: I700b668863c2b20cdf60fa672a994b8ae4dc613a
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/po.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index df9efe31bc64..2ccaed61bb17 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -452,7 +452,8 @@ PoEntry::PoEntry(const OString& rSDFLine, const TYPE eType) copy(vParts[SOURCEFILE].lastIndexOf("\\")+1)); OString sMsgCtxt = - vParts[GROUPID] + "\n" + + vParts[SOURCEFILE].copy(vParts[SOURCEFILE].lastIndexOf("\\")+1) + + "\n" + vParts[GROUPID] + "\n" + (vParts[LOCALID].isEmpty() ? "" : vParts[LOCALID] + "\n") + vParts[RESOURCETYPE]; switch(eType){ @@ -527,7 +528,7 @@ OString PoEntry::getSourceFile() const OString PoEntry::getGroupId() const { assert( m_bIsInitialized ); - return m_pGenPo->getMsgCtxt().getToken(0,'\n'); + return m_pGenPo->getMsgCtxt().getToken(1,'\n'); } //Get localid @@ -538,7 +539,7 @@ OString PoEntry::getLocalId() const if (sMsgCtxt.indexOf('\n')==sMsgCtxt.lastIndexOf('\n')) return OString(); else - return sMsgCtxt.getToken(1,'\n'); + return sMsgCtxt.getToken(2,'\n'); } //Get the type of component from which entry is extracted @@ -547,9 +548,9 @@ OString PoEntry::getResourceType() const assert( m_bIsInitialized ); const OString sMsgCtxt = m_pGenPo->getMsgCtxt(); if (sMsgCtxt.indexOf('\n')==sMsgCtxt.lastIndexOf('\n')) - return sMsgCtxt.getToken(1,'\n').getToken(0,'.'); - else return sMsgCtxt.getToken(2,'\n').getToken(0,'.'); + else + return sMsgCtxt.getToken(3,'\n').getToken(0,'.'); } //Get the type of entry |