From 2f528025b20854cf918d95f6781b5e2052ddf929 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 25 Mar 2010 17:19:23 +0100 Subject: cws l10ntooling18: #i109622# try to auto fix bad quote --- l10ntools/inc/export.hxx | 2 ++ l10ntools/source/export.cxx | 12 ++++++------ l10ntools/source/merge.cxx | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) (limited to 'l10ntools') 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/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/merge.cxx b/l10ntools/source/merge.cxx index 3284b7026107..ace119da106c 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( int idx = 0; idx < rReturn.Len(); idx++ ) + { + if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && 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 ) -- cgit v1.2.1 From f0b4543e5d07906c9f2a3c0afcae736740d7c0ac Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 12 Apr 2010 16:02:27 +0200 Subject: #i110810# rename output files --- l10ntools/source/localize.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index b869098faed7..9379590d089c 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -959,8 +959,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() , (*iter).length() ); + aIter.Extract( sFileNameWithExt ); + } + if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());} } } if( hasPwd ) @@ -973,7 +981,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());} } } -- cgit v1.2.1 From 0f641fbfd20f06811ec4bdd886ff7ab16d058375 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 13 Apr 2010 18:26:22 +0200 Subject: l10ntooling18: #i109378# set path to gsicheck in localize.pl --- l10ntools/scripts/localize.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index 8b6a8231ebce..a6a370385f21 100755 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -392,11 +392,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 .= fix_cygwin_path("$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck"); + my $errfile = $sdffile.".err"; $command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile"; #my $rc = system( $command ); -- cgit v1.2.1 From de0b00d03dd81bc77b65dd310268b7e523e62630 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 10 May 2010 19:22:34 +0200 Subject: removed cygwin_path / added mkdir --- l10ntools/scripts/localize.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index a6a370385f21..47f4e91d8b7f 100755 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -284,9 +284,11 @@ sub write_sdf foreach my $lang( keys( %{ $string_hash } ) ) { my @sdf_file; + next , if( $lang eq "en-US" ); + + mkdir $l10n_file."/$lang"; + my $current_l10n_file = $l10n_file."/$lang/localize.sdf"; - # mkdir!!!! - my $current_l10n_file = $WIN eq "TRUE" ? $l10n_file."\\$lang\\localize.sdf" : $l10n_file."/$lang/localize.sdf"; print "Writing '$current_l10n_file'\n"; if( open DESTFILE , "< $current_l10n_file" ){ @@ -393,7 +395,7 @@ sub merge_gsicheck{ close ( $TMPHANDLE ); $command = "$ENV{WRAPCMD} " if( $ENV{WRAPCMD} ); - $command .= fix_cygwin_path("$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck"); + $command .= "$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck"; my $errfile = $sdffile.".err"; $command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile"; -- cgit v1.2.1 From 03772c9d2d0261426fe455fcd191677579131d0c Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 27 May 2010 14:50:17 +0200 Subject: l10ntooling18: fixed some windows build issues --- l10ntools/source/localize.cxx | 2 +- l10ntools/source/merge.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 9379590d089c..ec34650060ea 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -965,7 +965,7 @@ int _cdecl main( int argc, char *argv[] ) { ByteString sFileNameWithExt( sFileName ); sFileNameWithExt += ByteString( "." ); - sFileNameWithExt += ByteString( (*iter).c_str() , (*iter).length() ); + sFileNameWithExt += ByteString( (*iter).c_str() ); aIter.Extract( sFileNameWithExt ); } if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());} diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index ace119da106c..b98bc53a6adb 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -55,7 +55,7 @@ BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn, { BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel ); ByteString test( rReturn ); - for( int idx = 0; idx < rReturn.Len(); idx++ ) + for( USHORT idx = 0; idx < rReturn.Len(); idx++ ) { if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && rReturn.GetChar( idx-1 ) == '\\' ) { -- cgit v1.2.1 From b00bc48046d9f886d172cb7be09a219dec554bab Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 31 May 2010 17:06:03 +0200 Subject: l10ntooling18: #i110687# fetch cfg file from solver --- l10ntools/prj/d.lst | 1 + 1 file changed, 1 insertion(+) (limited to 'l10ntools') diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst index f75c16b43764..1eb46aafc08b 100644 --- a/l10ntools/prj/d.lst +++ b/l10ntools/prj/d.lst @@ -50,6 +50,7 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help ..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx ..\inc\l10ntools\file.hxx %_DEST%\inc%_EXT%\l10ntools\file.hxx ..\inc\l10ntools\vosapp.hxx %_DEST%\inc%_EXT%\l10ntools\vosapp.hxx +..\source\filter\merge\FCFGMerge.cfg %_DEST%\inc%_EXT%\l10ntools\FCFGMerge.cfg ..\inc\utf8conv.hxx %_DEST%\inc%_EXT%\l10ntools\utf8conv.hxx ..\%__SRC%\lib\transex.lib %_DEST%\lib%_EXT%\transex.lib -- cgit v1.2.1 From 0742e8e31b30b5ea203bbad44510c6d41b7e9793 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 11 Jun 2010 13:07:26 +0200 Subject: l10ntooling18: idx-1 > 0 -> idx >= 1 --- l10ntools/source/merge.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'l10ntools') diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index b98bc53a6adb..e15a5c8a28fa 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -57,7 +57,7 @@ BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn, ByteString test( rReturn ); for( USHORT idx = 0; idx < rReturn.Len(); idx++ ) { - if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && rReturn.GetChar( idx-1 ) == '\\' ) + if( rReturn.GetChar( idx ) == '\"' && ( idx >= 1 ) && rReturn.GetChar( idx-1 ) == '\\' ) { rReturn.Erase( idx-1 , 1 ); } -- cgit v1.2.1