diff options
author | Andras Timar <atimar@suse.com> | 2012-11-18 13:04:33 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-11-18 13:04:33 +0100 |
commit | 124dc60e5519ee4d1c2454050b6f54a7b020905d (patch) | |
tree | 906738af160d90e063d05d9370e164d96bfaf08c /l10ntools/source | |
parent | 889574a50c8f5bdffed9f3eb70426cedae0a589c (diff) |
Revert "put filename into msgctxt, because po entries must be unique"
This reverts commit 889574a50c8f5bdffed9f3eb70426cedae0a589c.
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/po.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index 2ccaed61bb17..df9efe31bc64 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 |