summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2012-12-13 15:32:02 +0100
committerAndras Timar <atimar@suse.com>2012-12-14 12:12:38 +0100
commitc0476ad5b0aa8758603b4a2b9f6f8feed130b1b4 (patch)
tree2a21c07210cdacf3b6578037373d4ad715c8c42b /l10ntools
parentec3cc4fdb5785074bbe415b41c6f80063b7395ed (diff)
Fix adding keyid to po when read from file
Change-Id: I29fdd23da97f1102974a6b5821c224264a37efc3
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/po.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index c59a4f8a4e31..41167bc62fcc 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -813,14 +813,7 @@ void PoIfstream::readEntry( PoEntry& rPoEntry )
(sType == "text" || sType == "quickhelptext" || sType == "title")&&
!aGenPo.getMsgId().isEmpty() )
{
- if( rPoEntry.m_pGenPo )
- {
- *(rPoEntry.m_pGenPo) = aGenPo;
- }
- else
- {
- rPoEntry.m_pGenPo = new GenPoEntry( aGenPo );
- }
+ //Generate keyid if po file not includes it
const OString sExtractCom = aGenPo.getExtractCom();
if( sExtractCom.isEmpty() ||
( sExtractCom.getLength() != 4 &&
@@ -832,6 +825,14 @@ void PoIfstream::readEntry( PoEntry& rPoEntry )
aGenPo.getReference() + sMsgCtxt +
aGenPo.getMsgId() ) );
}
+ if( rPoEntry.m_pGenPo )
+ {
+ *(rPoEntry.m_pGenPo) = aGenPo;
+ }
+ else
+ {
+ rPoEntry.m_pGenPo = new GenPoEntry( aGenPo );
+ }
rPoEntry.m_bIsInitialized = true;
}
else