diff options
author | Andras Timar <atimar@suse.com> | 2012-04-14 17:49:58 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-04-14 17:50:29 +0200 |
commit | 1ba0ab72d12f3713f7b2b817e6f783bcb83f36a3 (patch) | |
tree | 9da5b41f4ba9ddb347b87b845885c58c8c94a606 /l10ntools/source/export.cxx | |
parent | fd1bef82a99de423005e1dfaf2935823a1fc74bd (diff) |
we only extract en-US strings, remove some complexity
Diffstat (limited to 'l10ntools/source/export.cxx')
-rw-r--r-- | l10ntools/source/export.cxx | 104 |
1 files changed, 37 insertions, 67 deletions
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 329fd197f74f..ed63e4ca5b8d 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -995,73 +995,43 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew ) rtl::OString sXQHText; rtl::OString sXTitle; - rtl::OString sCur; - - for( unsigned int n = 0; n < aLanguages.size(); n++ ){ - sCur = aLanguages[ n ]; - if (!sCur.equalsIgnoreAsciiCase("x-comment") ){ - if (!pResData->sText[ sCur ].isEmpty()) - sXText = pResData->sText[ sCur ]; - else { - sXText = pResData->sText[ SOURCE_LANGUAGE ]; - } - - if (!pResData->sText[ X_COMMENT ].isEmpty()) - sXHText = pResData->sText[ X_COMMENT ]; - else { - sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ]; - } - - if (!pResData->sQuickHelpText[ sCur ].isEmpty()) - sXQHText = pResData->sQuickHelpText[ sCur ]; - else { - sXQHText = pResData->sQuickHelpText[ SOURCE_LANGUAGE ]; - } - - if (!pResData->sTitle[ sCur ].isEmpty()) - sXTitle = pResData->sTitle[ sCur ]; - else - sXTitle = pResData->sTitle[ SOURCE_LANGUAGE ]; - - if (sXText.isEmpty()) - sXText = "-"; - - if (sXHText.isEmpty()) - { - if (!pResData->sHelpText[ SOURCE_LANGUAGE ].isEmpty()) - sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ]; - } - } - else - sXText = pResData->sText[ sCur ]; - - rtl::OString sOutput( sProject ); sOutput += "\t"; - if ( !sRoot.isEmpty()) - sOutput += sActFileName; - sOutput += "\t0\t"; - sOutput += pResData->sResTyp; sOutput += "\t"; - sOutput += sGID; sOutput += "\t"; - sOutput += sLID; sOutput += "\t"; - sOutput += pResData->sHelpId; sOutput += "\t"; - sOutput += pResData->sPForm; sOutput += "\t"; - sOutput += rtl::OString::valueOf(pResData->nWidth); sOutput += "\t"; - sOutput += sCur; sOutput += "\t"; - - - sOutput += sXText; sOutput += "\t"; - sOutput += sXHText; sOutput += "\t"; - sOutput += sXQHText; sOutput+= "\t"; - sOutput += sXTitle; sOutput += "\t"; - - aOutput << sOutput.getStr() << '\n'; - - if ( bCreateNew ) { - pResData->sText[ sCur ] = ""; - pResData->sHelpText[ sCur ] = ""; - pResData->sQuickHelpText[ sCur ]= ""; - pResData->sTitle[ sCur ] = ""; - } - } + sXText = pResData->sText[ SOURCE_LANGUAGE ]; + if (!pResData->sText[ X_COMMENT ].isEmpty()) + sXHText = pResData->sText[ X_COMMENT ]; + else + sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ]; + sXQHText = pResData->sQuickHelpText[ SOURCE_LANGUAGE ]; + sXTitle = pResData->sTitle[ SOURCE_LANGUAGE ]; + + if (sXText.isEmpty()) + sXText = "-"; + + rtl::OString sOutput( sProject ); sOutput += "\t"; + if ( !sRoot.isEmpty()) + sOutput += sActFileName; + sOutput += "\t0\t"; + sOutput += pResData->sResTyp; sOutput += "\t"; + sOutput += sGID; sOutput += "\t"; + sOutput += sLID; sOutput += "\t"; + sOutput += pResData->sHelpId; sOutput += "\t"; + sOutput += pResData->sPForm; sOutput += "\t"; + sOutput += rtl::OString::valueOf(pResData->nWidth); sOutput += "\t"; + sOutput += "en-US"; sOutput += "\t"; + + + sOutput += sXText; sOutput += "\t"; + sOutput += sXHText; sOutput += "\t"; + sOutput += sXQHText; sOutput+= "\t"; + sOutput += sXTitle; sOutput += "\t"; + + aOutput << sOutput.getStr() << '\n'; + + if ( bCreateNew ) { + pResData->sText[ SOURCE_LANGUAGE ] = ""; + pResData->sHelpText[ SOURCE_LANGUAGE ] = ""; + pResData->sQuickHelpText[ SOURCE_LANGUAGE ]= ""; + pResData->sTitle[ SOURCE_LANGUAGE ] = ""; + } } if ( pResData->pStringList ) { rtl::OString sList( "stringlist" ); |