From c0476ad5b0aa8758603b4a2b9f6f8feed130b1b4 Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Thu, 13 Dec 2012 15:32:02 +0100 Subject: Fix adding keyid to po when read from file Change-Id: I29fdd23da97f1102974a6b5821c224264a37efc3 --- l10ntools/source/po.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'l10ntools') 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 -- cgit