summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-14 17:03:59 +0200
committerobo <obo@openoffice.org>2010-06-14 17:03:59 +0200
commit59fed6a8eda9f1ed99a0ed11b12c75b8d5d606b2 (patch)
treeff8cb47c84e69ad383fa3a505f7537f8fbce11be /l10ntools
parentd2bf57099fdec91baead1d203baaad7cf9daa381 (diff)
parent0742e8e31b30b5ea203bbad44510c6d41b7e9793 (diff)
CWS-TOOLING: integrate CWS l10ntooling18
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/export.hxx2
-rw-r--r--[-rwxr-xr-x]l10ntools/scripts/localize.pl10
-rw-r--r--l10ntools/source/export.cxx12
-rw-r--r--l10ntools/source/localize.cxx14
-rw-r--r--l10ntools/source/merge.cxx16
5 files changed, 40 insertions, 14 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 13fad506b54d..d1474503882f 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -461,6 +461,8 @@ public:
bTitleFirst[ nId ] = true;
}
BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+ BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+
};
//
diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 82ef331a63d5..4aea1d933992 100755..100644
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -272,7 +272,9 @@ sub write_sdf
foreach my $lang( keys( %{ $string_hash } ) )
{
my @sdf_file;
+ next , if( $lang eq "en-US" );
+ mkdir $l10n_file."/$lang";
# mkdir!!!!
my $current_l10n_file = $l10n_file."/$lang/localize.sdf";
print "Writing '$current_l10n_file'\n";
@@ -380,11 +382,9 @@ sub merge_gsicheck{
my ( $TMPHANDLE , $tmpfile ) = File::Temp::tempfile();
close ( $TMPHANDLE );
- if( $ENV{WRAPCMD} ){
- $command = "$ENV{WRAPCMD} gsicheck";
- }else{
- $command = "gsicheck";
- }
+ $command = "$ENV{WRAPCMD} " if( $ENV{WRAPCMD} );
+ $command .= "$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck";
+
my $errfile = $sdffile.".err";
$command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile";
#my $rc = system( $command );
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index a3df11c2920b..59f29525eda4 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -2096,7 +2096,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
}
ByteString sContent;
- pEntrys->GetText( sContent, nTyp, nLangIndex );
+ pEntrys->GetTransex3Text( sContent, nTyp, nLangIndex );
//if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) {
if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) {
rText = sOrigText;
@@ -2158,7 +2158,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_TEXT, sCur , TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2211,7 +2211,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2258,7 +2258,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_TITLE, sCur, TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2343,9 +2343,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
//printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex);
ByteString sText;
BOOL bText;
- bText = pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, TRUE );
+ bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE );
if( !bText )
- bText = pEntrys->GetText( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
+ bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
// Use fallback, if data is missing in sdf file
//if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2bbec4257c76..1d1428ff2dc0 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -960,8 +960,16 @@ int _cdecl main( int argc, char *argv[] )
aIter.SetLanguageRestriction( sLanguages );
if ( bExport ){
if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
- aIter.Extract( sFileName );
- if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());}
+ if( *iter == "ooo" )
+ aIter.Extract( sFileName );
+ else
+ {
+ ByteString sFileNameWithExt( sFileName );
+ sFileNameWithExt += ByteString( "." );
+ sFileNameWithExt += ByteString( (*iter).c_str() );
+ aIter.Extract( sFileNameWithExt );
+ }
+ if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
}
}
if( hasPwd )
@@ -974,7 +982,7 @@ int _cdecl main( int argc, char *argv[] )
if ( bExport ){
if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
aIter.Extract( sFileName );
- if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());}
+ if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
}
}
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 3284b7026107..e15a5c8a28fa 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -50,6 +50,22 @@ ByteString PFormEntrys::Dump(){
return sRet;
}
+BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn,
+ USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
+{
+ BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel );
+ ByteString test( rReturn );
+ for( USHORT idx = 0; idx < rReturn.Len(); idx++ )
+ {
+ if( rReturn.GetChar( idx ) == '\"' && ( idx >= 1 ) && rReturn.GetChar( idx-1 ) == '\\' )
+ {
+ rReturn.Erase( idx-1 , 1 );
+ }
+ }
+ //if( !rReturn.Equals( test ) )
+ // printf("*CHANGED******************\n%s\n%s\n",test.GetBuffer(),rReturn.GetBuffer());
+ return rc;
+}
/*****************************************************************************/
BOOL PFormEntrys::GetText( ByteString &rReturn,
USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )