Commits

Anonymous committed dfe74b8

cws l10ntools: #i107386# #i107993# #ii107992# #i107991# #i108587# Added some buildtypes , fix for broken localize_sl regarding UPDMINOREXT , pmladeks localize.pl ooo enforcer patch

Comments (0)

Files changed (7)

cairo/prj/build.lst

-lcairo	cairo	: zlib soltools NULL
+lcairo	cairo	: ZLIB:zlib soltools NULL
 lcairo	cairo			    usr1	-	all	lcairo_mkout NULL
 lcairo	cairo\pixman		    nmake	-	all	lcairo_pixman NULL
 lcairo	cairo\cairo		    nmake	-	all	lcairo_cairo lcairo_pixman NULL

lingucomponent/prj/build.lst

-lc  lingucomponent  :      linguistic libtextcat svl hyphen HUNSPELL:hunspell NULL
+lc  lingucomponent  :      linguistic libtextcat svl HYPHEN:hyphen HUNSPELL:hunspell NULL
 lc	lingucomponent								usr1	-	all	lc_mkout NULL
 lc  lingucomponent\inc                                      nmake   -   all lc_inc NULL
 lc  lingucomponent\source\lingutil                          nmake   -   all lc_util lc_inc NULL

solenv/bin/localize

     export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT}
 fi
 
-if [ x${SOLARVER}x = xx -o x${UPDMINOR}x = xx  ]; then
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx  ]; then
     exec perl -w $SOLARVERSION/$INPATH/bin/localize.pl "$@"
 else
-    exec perl -w $SOLARVERSION/$INPATH/bin.$UPDMINOR/localize.pl "$@"
+    exec perl -w $SOLARVERSION/$INPATH/bin$UPDMINOREXT/localize.pl "$@"
 fi
 

solenv/bin/localize_sl

+#!/bin/sh
+if [ x${SOLARENV}x = xx ]; then
+    echo No environment found, please use 'setsolar'
+exit 1
+fi
+
+if [ "${OS?}" = MACOSX ]; then
+    export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT}
+else
+    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT}
+fi
+
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx  ]; then
+    exec $SOLARVERSION/$INPATH/bin/localize_sl "$@"
+else
+    exec $SOLARVERSION/$INPATH/bin$UPDMINOREXT/localize_sl "$@"
+fi
+

transex3/prj/build.lst

-tr	transex3	:	tools libxslt berkeleydb LUCENE:lucene NULL
+tr	transex3	:	tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene NULL
 tr	transex3						usr1	-	all	tr_mkout NULL
 tr	transex3\inc					nmake	-	all	tr_inc NULL
 tr	transex3\source					nmake	-	all	tr_src tr_inc NULL

transex3/scripts/localize.pl

 my $languages;
 #my %sl_modules;     # Contains all modules where en-US and de is source language
 my $use_default_date = '0';
+my $force_ooo_module = '0';
 my %is_ooo_module;
 my %is_so_module;
 my $DELIMITER;
 sub is_openoffice_module
 {
     my $module              = shift;
-    return "TRUE", if defined $is_ooo_module{ $module };
+    return "TRUE", if ( $force_ooo_module || defined $is_ooo_module{ $module } );
     return "";
 }
 
             foreach my $string( @sdf_file ){
                 print DESTFILE "$string\n";
             }
-            close ( DESTFILE );     
+            close ( DESTFILE );
             if( move( $current_l10n_file , $current_l10n_file.".backup" ) ){
                 if( copy( $tmpfile , $current_l10n_file ) ){ 
                     unlink $l10n_file.".backup";  
     my $extract;
     my $success = GetOptions('f=s' => \$sdffile , 'l=s' => \$languages , 's=s' => \$srcpath ,  'h' => \$help , 'v' => \$bVerbose , 
                              'm' => \$merge , 'e' => \$extract , 'x' => \$no_sort , 'd' => \$use_default_date , 'c' => \$create_dirs ,
-                             'n' => \$no_gsicheck );
+                             'n' => \$no_gsicheck , 'o' => \$force_ooo_module );
     $outputfile = $sdffile;
     
     #print STDOUT "DBG: lang = $languages\n";
             exit(1);
         }
     }
-    if( $help || !$success || $#ARGV > 1 || ( !$sdffile ) ){
+    if( $help ){
+        usage();
+        exit(0);
+    }
+    if( !$success || $#ARGV > 1 || ( !$sdffile ) ){
         usage();
         exit(1);
     }
     print STDERR "    -h              File with localize.sdf's\n!";
     print STDERR "    -n              No gsicheck\n"; 
     print STDERR "    -i              Module to merge\n";
+    print STDERR "    -o              force using ooo localization from the l10n module instead of l10n_so; \n";
+    print STDERR "                    useful if the type can't be detected by the .svn tags; \n";
     print STDERR "    -v              Verbose\n";
     print STDERR "\nExample:\n";
     print STDERR "\nlocalize -e -l en-US,pt-BR=en-US -f my.sdf\n( Extract en-US and pt-BR with en-US fallback )\n";

transex3/source/localize.cxx

     bool hasPwd = treeconfig.getActiveRepositories( repos );
     if( hasPwd ) cout << "Found special path!\n";
 
+    string minor_ext;
+    bool has_minor_ext; 
+    
+    if( Export::GetEnv("UPDMINOREXT") != NULL )
+    {
+        minor_ext     = string( Export::GetEnv("UPDMINOREXT") );
+        has_minor_ext = minor_ext.size();
+    }
+    else
+        has_minor_ext = false;
+
     // localize through all repositories
     for( vector<string>::iterator iter = repos.begin(); iter != repos.end() ; ++iter )
     {
-        string curRepository = string( Export::GetEnv("SOURCE_ROOT_DIR") ) + "/" + *iter;
+        string curRepository;
+        if( has_minor_ext ) 
+            curRepository = string( Export::GetEnv("SOURCE_ROOT_DIR") ) + "/" + *iter + minor_ext;
+        else
+            curRepository = string( Export::GetEnv("SOURCE_ROOT_DIR") ) + "/" + *iter;
         cout << "Localizing repository " << curRepository << "\n";
         SourceTreeLocalizer aIter( ByteString( curRepository.c_str() ) , sVersion , (sOutput.Len() > 0) , bQuiet2 , bSkipLinks );
         aIter.SetLanguageRestriction( sLanguages );