summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtransex3/scripts/localize.pl38
-rw-r--r--transex3/source/localize.cxx23
-rw-r--r--transex3/source/srciter.cxx28
3 files changed, 25 insertions, 64 deletions
diff --git a/transex3/scripts/localize.pl b/transex3/scripts/localize.pl
index 76a26d305c2e..b9e478ba66bd 100755
--- a/transex3/scripts/localize.pl
+++ b/transex3/scripts/localize.pl
@@ -78,6 +78,7 @@ my $sdf_regex = "((([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t
my $file_types = "(src|hrc|xcs|xcu|lng|ulf|xrm|xhp|xcd|xgf|xxl|xrb)";
# Always use this date to prevent cvs conflicts
my $default_date = "2002-02-02 02:02:02";
+my @sdfparticles;
#### main ####
parse_options();
@@ -386,9 +387,19 @@ sub merge_gsicheck{
$sdffile = $tmpfile;
}
#########################################################
+# find search function
+sub wanted
+{
+ my $file = $File::Find::name;
+ if( -f $file && $file =~ /.*localize.sdf$/ && !( $file =~ /.*\.svn.*/ ) ) {
+ push @sdfparticles , $file;
+ if( $bVerbose eq "1" ) { print STDOUT "$file\n"; }
+ else { print "."; }
+ }
+}
+
sub collectfiles{
print STDOUT "### Localize\n";
- my @sdfparticles;
my $localizehash_ref;
my ( $bAll , $bUseLocalize, $langhash_ref , $bHasSourceLanguage , $bFakeEnglish ) = parseLanguages();
@@ -400,15 +411,7 @@ sub collectfiles{
print STDOUT "### Searching sdf particles\n";
my $working_path = getcwd();
chdir $srcpath;
- find sub {
- my $file = $File::Find::name;
- if( -f && $file =~ /.*localize.sdf$/ ) {
- push @sdfparticles , $file;
- if( $bVerbose eq "1" ) { print STDOUT "$file\n"; }
- else { print "."; }
-
- }
- } , getcwd() ;#"."; #$srcpath;
+ find ( { wanted => \&wanted , follow => 1 }, getcwd() );
chdir $working_path;
my $nFound = $#sdfparticles +1;
@@ -437,7 +440,7 @@ sub collectfiles{
# -e
# if ( -x $command ){
if( $command ){
- if( !$bVerbose ){ $args .= " -QQ -skip_links "; }
+ if( !$bVerbose ){ $args .= " -QQ "; }
$args .= " -e -f $localizeSDF -l ";
my $bFlag="";
if( $bAll ) {$args .= " en-US";}
@@ -452,14 +455,7 @@ sub collectfiles{
remove_duplicates( \@list );
foreach my $isokey ( @list ){
switch :{
- #( $isokey=~ /^de$/i )
- # && do{
- # if( $bFlag eq "TRUE" ){ $args .= ",de"; }
- # else {
- # $args .= "de"; $bFlag = "TRUE";
- # }
- # };
- ( $isokey=~ /^en-US$/i )
+ ( $isokey=~ /^en-US$/i )
&& do{
if( $bFlag eq "TRUE" ){ $args .= ",en-US"; }
else {
@@ -479,9 +475,6 @@ sub collectfiles{
my $rc = system( $command.$args );
- #my $output = `$command.$args`;
- #my $rc = $? << 8;
-
if( $rc < 0 ){ print STDERR "ERROR: localize rc = $rc\n"; exit( -1 ); }
( $localizehash_ref ) = read_file( $localizeSDF , $langhash_ref );
@@ -492,7 +485,6 @@ sub collectfiles{
## Fill fackback hash
my( $fallbackhashhash_ref ) = fetch_fallback( \@sdfparticles , $localizeSDF , $langhash_ref );
-# my( $fallbackhashhash_ref ) = fetch_fallback( \@sdfparticles , $localizeSDF , $langhash_ref );
my %block;
my $cur_fallback;
if( !$bAll) {
diff --git a/transex3/source/localize.cxx b/transex3/source/localize.cxx
index 40ad101ec747..c03c885b0c51 100644
--- a/transex3/source/localize.cxx
+++ b/transex3/source/localize.cxx
@@ -93,24 +93,6 @@ const char *PositiveList[] = {
"chart2/source/controller/menu/MenuItems_tmpl.hrc",
"chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc",
"chart2/source/controller/dialogs/res_Trendline_tmpl.hrc",
- "svx.lnk/inc/globlmn_tmpl.hrc",
- "sw.lnk/source/ui/inc/swmn_tmpl.hrc",
- "sw.lnk/source/ui/inc/swacc_tmpl.hrc",
- "sw.lnk/source/ui/inc/toolbox_tmpl.hrc",
- "offmgr.lnk/inc/offmenu_tmpl.hrc",
- "offmgr.lnk/source/offapp/intro/intro_tmpl.hrc",
- "dbaccess.lnk/source/ui/inc/toolbox_tmpl.hrc",
- "svx.lnk/source/intro/intro_tmpl.hrc",
- "dbaccess.lnk/source/ui/dlg/AutoControls_tmpl.hrc",
- "svx.lnk/source/unodialogs/textconversiondlgs/chinese_direction_tmpl.hrc",
- "chart2.lnk/source/controller/dialogs/res_DataLabel_tmpl.hrc",
- "chart2.lnk/source/controller/dialogs/res_LegendPosition_tmpl.hrc",
- "chart2.lnk/source/controller/dialogs/res_Statistic_tmpl.hrc",
- "chart2.lnk/source/controller/dialogs/res_Titlesx_tmpl.hrc",
- "chart2.lnk/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc",
- "chart2.lnk/source/controller/menu/MenuItems_tmpl.hrc",
- "chart2.lnk/source/controller/dialogs/res_ErrorBar_tmpl.hrc",
- "chart2.lnk/source/controller/dialogs/res_Trendline_tmpl.hrc",
"NULL"
};
@@ -816,7 +798,6 @@ void Help()
"\tFileName: Output file when extract mode, input file when merge mode\n"
"\tl1...ln: supported languages (\"all\" for all languages).\n"
"\tf1...fn: fallback languages for supported languages\n"
- "\tskip_links: do not follow linked directorys"
"\tQQ: quiet output)"
);
@@ -903,8 +884,8 @@ int _cdecl main( int argc, char *argv[] )
nState = STATE_FILENAME;
else if ( sSwitch.Equals( "-QQ" ))
bQuiet2 = true;
- else if ( ByteString( argv[ i ]).ToUpperAscii().Equals( "-SKIP_LINKS" ))
- bSkipLinks = true;
+ // else if ( ByteString( argv[ i ]).ToUpperAscii().Equals( "-SKIP_LINKS" ))
+ // bSkipLinks = true;
else if ( ByteString( argv[ i ]).ToUpperAscii().Equals( "-O" ) )
nState = STATE_OUTPUT;
else {
diff --git a/transex3/source/srciter.cxx b/transex3/source/srciter.cxx
index 7bdc41e44155..d2cbb2352570 100644
--- a/transex3/source/srciter.cxx
+++ b/transex3/source/srciter.cxx
@@ -66,19 +66,13 @@ void SourceTreeIterator::ExecuteDirectory( transex::Directory& aDirectory )
if ( bInExecute ) {
rtl::OUString sDirName = aDirectory.getDirectoryName();
- static rtl::OUString WCARD1 ( rtl::OUString::createFromAscii( "unxlngi" ) );
- static rtl::OUString WCARD2 ( rtl::OUString::createFromAscii( "unxsoli" ) );
- static rtl::OUString WCARD3 ( rtl::OUString::createFromAscii( "wntmsci" ) );
- static rtl::OUString WCARD4 ( rtl::OUString::createFromAscii( "unxsols" ) );
- static rtl::OUString WCARD5 ( rtl::OUString::createFromAscii( "common" ) );
- static rtl::OUString WCARD6 ( rtl::OUString::createFromAscii( "unxmacx" ) );
- static rtl::OUString WCARD7 ( rtl::OUString::createFromAscii( "unxlngx" ) );
- static rtl::OUString WCARD8 ( rtl::OUString::createFromAscii( "unxsolsx" ) );
- static rtl::OUString WCARD9 ( rtl::OUString::createFromAscii( "unxsolsu" ) );
- static rtl::OUString WCARD10 ( rtl::OUString::createFromAscii( "wntmscx" ) );
- static rtl::OUString WCARD11 ( rtl::OUString::createFromAscii( "unxubti8" ) );
- static rtl::OUString WCARD12 ( rtl::OUString::createFromAscii( "unxsolx" ) );
- static rtl::OUString WCARD13 ( rtl::OUString::createFromAscii( "unxsolu" ) );
+ static rtl::OUString WCARD1 ( rtl::OUString::createFromAscii( "unxlng" ) );
+ static rtl::OUString WCARD2 ( rtl::OUString::createFromAscii( "unxsol" ) );
+ static rtl::OUString WCARD3 ( rtl::OUString::createFromAscii( "wntmsc" ) );
+ static rtl::OUString WCARD4 ( rtl::OUString::createFromAscii( "common" ) );
+ static rtl::OUString WCARD5 ( rtl::OUString::createFromAscii( "unxmac" ) );
+ static rtl::OUString WCARD6 ( rtl::OUString::createFromAscii( "unxubt" ) );
+ static rtl::OUString WCARD7 ( rtl::OUString::createFromAscii( ".svn" ) );
if( sDirName.indexOf( WCARD1 , 0 ) > -1 ||
@@ -87,13 +81,7 @@ void SourceTreeIterator::ExecuteDirectory( transex::Directory& aDirectory )
sDirName.indexOf( WCARD4 , 0 ) > -1 ||
sDirName.indexOf( WCARD5 , 0 ) > -1 ||
sDirName.indexOf( WCARD6 , 0 ) > -1 ||
- sDirName.indexOf( WCARD7 , 0 ) > -1 ||
- sDirName.indexOf( WCARD8 , 0 ) > -1 ||
- sDirName.indexOf( WCARD9 , 0 ) > -1 ||
- sDirName.indexOf( WCARD10 , 0 ) > -1 ||
- sDirName.indexOf( WCARD11 , 0 ) > -1 ||
- sDirName.indexOf( WCARD12 , 0 ) > -1 ||
- sDirName.indexOf( WCARD13 , 0 ) > -1
+ sDirName.indexOf( WCARD7 , 0 ) > -1
) return;
//printf("**** %s \n", OUStringToOString( sDirName , RTL_TEXTENCODING_UTF8 , sDirName.getLength() ).getStr() );