diff options
author | Andras Timar <atimar@suse.com> | 2012-04-14 14:22:13 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-04-14 14:24:06 +0200 |
commit | 3f00358bfdad0a18fe053c3d154f74e3aa6afba9 (patch) | |
tree | 4808b98f8d68068a75c8d5cc8bc2d1cabdece95b /l10ntools | |
parent | af0e727b5dfcdea0555748e7e6415d70fe7665a9 (diff) |
export x-comments to sdf file into the 'helptext' field
helptext field has not been in use for a while, so we can
use that to hold the x-comment
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/inc/export.hxx | 1 | ||||
-rwxr-xr-x | l10ntools/scripts/po2lo | 2 | ||||
-rw-r--r-- | l10ntools/source/cfgmerge.cxx | 4 | ||||
-rw-r--r-- | l10ntools/source/export.cxx | 4 |
4 files changed, 7 insertions, 4 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index 760a7454fb46..bf1809bfb54e 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -72,6 +72,7 @@ typedef boost::unordered_map<rtl::OString, MergeData*, rtl::OStringHash> MergeDataHashMap; #define SOURCE_LANGUAGE rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US")) +#define X_COMMENT rtl::OString(RTL_CONSTASCII_STRINGPARAM("x-comment")) #define LIST_REFID "LIST_REFID" typedef OStringHashMap ExportListEntry; diff --git a/l10ntools/scripts/po2lo b/l10ntools/scripts/po2lo index 4bcfb8b41e3a..cdf8892fc950 100755 --- a/l10ntools/scripts/po2lo +++ b/l10ntools/scripts/po2lo @@ -51,7 +51,7 @@ class Entry: prefix += "%s." % self.items[3] self.keys = [] # 10..13 are translation types - for idx in range(10, 14): + for idx in [10,12,13]: try: if len(self.items[idx]): t = {10:'text', 12:'quickhelptext', 13:'title'}[idx] diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx index 2c39fc68ee52..b8f6c19c0d54 100644 --- a/l10ntools/source/cfgmerge.cxx +++ b/l10ntools/source/cfgmerge.cxx @@ -483,6 +483,7 @@ void CfgExport::WorkOnRessourceEnd() if ( pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))].getLength() ) { rtl::OString sFallback = pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))]; + rtl::OString sXComment = pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("x-comment"))]; rtl::OString sLocalId = pStackData->sIdentifier; rtl::OString sGroupId; if ( aStack.size() == 1 ) { @@ -512,7 +513,8 @@ void CfgExport::WorkOnRessourceEnd() sOutput += sCur; sOutput += "\t"; - sOutput += sText; sOutput += "\t\t\t\t"; + sOutput += sText; sOutput += "\t"; + sOutput += sXComment; sOutput += "\t\t\t"; pOutputStream << sOutput.getStr() << '\n'; } diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 60c4a7388b6f..329fd197f74f 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -1006,8 +1006,8 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew ) sXText = pResData->sText[ SOURCE_LANGUAGE ]; } - if (!pResData->sHelpText[ sCur ].isEmpty()) - sXHText = pResData->sHelpText[ sCur ]; + if (!pResData->sText[ X_COMMENT ].isEmpty()) + sXHText = pResData->sText[ X_COMMENT ]; else { sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ]; } |