Commits

Ivo Hinkelmann  committed 6578a01

txtl10n: cleanup / remove all -QQ and quiet parts

  • Participants
  • Parent commits f41758f

Comments (0)

Files changed (9)

File l10ntools/inc/lngmerge.hxx

                     const ByteString &rPrj , 
                     const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID );
 public:
-	LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat, bool bQuiet_in );
+	LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat );
 	~LngParser();
 
 	BOOL CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );

File l10ntools/source/cfglex.l

 		fprintf( stdout, " FileIn:   Source files (*.src)\n" );
 		fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 		fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
-		fprintf( stdout, " -QQ: quiet output\n" );
         fprintf( stdout, " -e: Disable writing errorlog\n" );
 		fprintf( stdout, " -b: Break when Token \"HelpText\" found in source\n" );
 		fprintf( stdout, " -u: [english] and [german] are allowed, Id is Taken from DataBase \n" );

File l10ntools/source/cfgmerge.cxx

 BOOL bErrorLog;
 BOOL bForce;
 BOOL bUTF8;
-bool bQuiet;
 ByteString sPrj;
 ByteString sPrjRoot;
 ByteString sInputFileName;
 	bErrorLog       = TRUE;
 	bForce          = FALSE;
 	bUTF8           = TRUE;
-    bQuiet          = false;
     sPrj            = "";
 	sPrjRoot        = "";
 	sInputFileName  = "";
 			nState = STATE_FORCE;
 			bForce = TRUE;
 		}
-		else if ( sSwitch == "-QQ" ) {
-		    bQuiet = true;
-        }
         else if ( sSwitch == "-L" ) {
 			nState = STATE_LANGUAGES;
 		}
 	// command line is not valid
 	return NULL;
 }
-int isQuiet(){
-    if( bQuiet )    return 1;
-    else            return 0;
-}
 /*****************************************************************************/
 int InitCfgExport( char *pOutput , char* pFilename )
 /*****************************************************************************/

File l10ntools/source/export.cxx

 BOOL bBreakWhenHelpText;
 BOOL bUnmerge;
 BOOL bUTF8;
-bool bQuiet;
 ByteString sPrj;
 ByteString sPrjRoot;
 ByteString sActFileName;
     Export::sForcedLanguages = "";
 	sTempFile = "";
 	pTempFile = NULL;
-    bQuiet = false;
 	USHORT nState = STATE_NON;
 	BOOL bInput = FALSE;
 
 		else if (sSwitch == "-p"  || sSwitch == "-P" ) {
 			nState = STATE_PRJ; // next token specifies the cur. project
 		}
-		else if (sSwitch == "-qq"  || sSwitch == "-QQ" ) {
-			bQuiet = true;  
-		}
 
 		else if (sSwitch == "-r"  || sSwitch == "-R" ) {
 			nState = STATE_ROOT; // next token specifies path to project root
 	return NULL;
 }
 /*****************************************************************************/
-int isQuiet(){
-/*****************************************************************************/
-   if( bQuiet ) return 1;
-   else         return 0;
-}
-/*****************************************************************************/
 int InitExport( char *pOutput , char* pFilename )
 /*****************************************************************************/
 {

File l10ntools/source/helpex.cxx

 ByteString sOutputFileX;
 ByteString sOutputFileY;
 ByteString sSDFFile;
-bool bQuiet;
 
 /*****************************************************************************/
 BOOL ParseCommandLine( int argc, char* argv[])
 	bUTF8 = TRUE;
 	sPrj = "";
 	sPrjRoot = "";
-	bQuiet = false;
     Export::sLanguages = "";
     Export::sForcedLanguages = "";
 
 			nState = STATE_ERRORLOG;
 			bErrorLog = FALSE;
 		}
-		else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-QQ" ) {
-            bQuiet = true;
-        }
         else if ( ByteString( argv[ i ]).ToUpperAscii() == "-UTF8" ) {
 			nState = STATE_UTF8;
 			bUTF8 = TRUE;
 void Help()
 /*****************************************************************************/
 {
-	fprintf( stdout, "Syntax: HELPEX[-p Prj][-r PrjRoot]-i FileIn ( -o FileOut | -x path -y relfile )[-m DataBase][-e][-b][-u][-L l1,l2,...][-QQ] -LF l1,l2 \n" );
+	fprintf( stdout, "Syntax: HELPEX[-p Prj][-r PrjRoot]-i FileIn ( -o FileOut | -x path -y relfile )[-m DataBase][-e][-b][-u][-L l1,l2,...] -LF l1,l2 \n" );
 	fprintf( stdout, " Prj:      Project\n" );
 	fprintf( stdout, " PrjRoot:  Path to project root (..\\.. etc.)\n" );
 	fprintf( stdout, " FileIn:   Source file (*.lng)\n" );
 	fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 	fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
-	fprintf( stdout, " -QQ: quiet output\n" );
 	fprintf( stdout, " -L: Restrict the handled languages. l1,l2,... are elements of (en-US,fr,de...)\n" );
 	fprintf( stdout, "     A fallback language can be defined like this: l1=f1.\n" );
 	fprintf( stdout, "     f1, f2,... are also elements of (en-US,fr,de...)\n" );

File l10ntools/source/lngex.cxx

 BOOL bErrorLog;
 BOOL bUTF8;
 BOOL bULF; // ULF = Unicode Language File
-bool bQuiet;
 ByteString sPrj;
 ByteString sPrjRoot;
 ByteString sOutputFile;
 	bErrorLog = TRUE;
 	bUTF8 = TRUE;
 	bULF = FALSE;
-    bQuiet = false;
 	sPrj = "";
 	sPrjRoot = "";
 	Export::sLanguages = "";
 		else if ( sSwitch == "-R" ) {
 			nState = STATE_ROOT; // next token specifies path to project root
 		}
-		else if ( sSwitch == "-QQ" ) {
-			bQuiet = true;
-		}
 		else if ( sSwitch == "-M" ) {
 			nState = STATE_MERGESRC; // next token specifies the merge database
 		}
 	fprintf( stdout, " FileIn:   Source file (*.lng)\n" );
 	fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 	fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
-	fprintf( stdout, " -QQ: quite output\n" );
-	//fprintf( stdout, " -NOUTF8: disable UTF8 as language independent encoding\n" );
-	//fprintf( stdout, " -ULF: enables Unicode Language File format, leads to UTF8 encoded version of lng files" );
 	fprintf( stdout, " -L: Restrict the handled languages. l1,l2,... are elements of (de,en-US...)\n" );
 	fprintf( stdout, "     A fallback language can be defined like this: l1=f1.\n" );
 	fprintf( stdout, "     f1, f2,... are also elements of (de,en-US...)\n" );
         fflush( stdout ); 
 
 	if ( sOutputFile.Len()) {
-		LngParser aParser( sInputFile, bUTF8, bULF , bQuiet );
+		LngParser aParser( sInputFile, bUTF8, bULF );
 		if ( bMergeMode )
 			aParser.Merge( sMergeSrc, sOutputFile , sPrj );
 		else

File l10ntools/source/lngmerge.cxx

 // class LngParser
 //
 /*****************************************************************************/
-LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat , bool bQuiet_in )
+LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat )
 /*****************************************************************************/
 				:
 				nError( LNG_OK ),
 				pLines( NULL ),
                 sSource( rLngFile ),
 				bDBIsUTF8( bUTF8 ),
-				bULF( bULFFormat ),
-                bQuiet( bQuiet_in )
+				bULF( bULFFormat )
 {
 	pLines = new LngLineList( 100, 100 );
 	DirEntry aEntry( String( sSource, RTL_TEXTENCODING_ASCII_US ));

File l10ntools/source/localize.cxx

 	ByteString sLanguageRestriction;
    
 	ByteString sOutputFile;
-	bool bQuiet2;
 
     int nFileCnt;
     
 	);
 
 public:
-	SourceTreeLocalizer( const ByteString &rRoot, const ByteString &rVersion , bool bLocal , bool bQuiet2_in , bool skip_links );
+	SourceTreeLocalizer( const ByteString &rRoot, const ByteString &rVersion , bool bLocal , bool skip_links );
 	~SourceTreeLocalizer();
     
     ByteString getSourceLanguages( ByteString sLanguageRestriction , ByteString sCommand );
 
 /*****************************************************************************/
 SourceTreeLocalizer::SourceTreeLocalizer(
-	const ByteString &rRoot, const ByteString &rVersion, bool bLocal_in , bool bQuiet2_in , bool skip_links )
+	const ByteString &rRoot, const ByteString &rVersion, bool bLocal_in , bool skip_links )
 /*****************************************************************************/
 				: SourceTreeIterator( rRoot, rVersion , bLocal_in ),
 				nMode( LOCALIZE_NONE ),
-                bQuiet2( bQuiet2_in ),
                 nFileCnt( 0 )
 {
         bSkipLinks  = skip_links ;
 		sCommand += getSourceLanguages( sLanguageRestriction , sCommand );
 	    }
             
-	    if( bQuiet2 ){
-                //sCommand +=" -QQ ";
-            }
             //printf("DBG: %s\n",sCommand.GetBuffer());
             if (system(sCommand.GetBuffer()) == -1)
                 fprintf(stderr, "%s failed\n", sCommand.GetBuffer());
 {
 	ByteString rDirectory( rtl::OUStringToOString( aDirectory , RTL_TEXTENCODING_UTF8 , aDirectory.getLength() ) ) ;
 	if ( nMode == LOCALIZE_NONE ){
-		if( !bQuiet2 ) fprintf( stdout, "%s\n", rDirectory.GetBuffer());
     }
 	else
 		WorkOnDirectory( rDirectory );
 	ByteString sFile( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
 
 	ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
-	if( !bQuiet2 ) fprintf( stdout, "##### %s #####\n", sBCur.GetBuffer());
 
 	ULONG nIndex = 0;
 	ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US );
 			sCommand += " -l ";
 			sCommand += sLanguageRestriction;
 		}
-        if( bQuiet2 ){
-            sCommand +=" -QQ ";
-        }
 
 		DirEntry aPath( aEntry.GetPath());
 		DirEntry aOldCWD;
 			fprintf(stderr, "%s failed\n", sCommand.GetBuffer());
         nFileCnt++;
         printf(".");
-        //if( bQuiet2 ){ printf("."); }
         SvFileStream aInStream( aOut.GetFull(), STREAM_READ );
 		if ( !aInStream.IsOpen()) {
 			fprintf( stderr, 
 	fprintf( stdout,
 		"As part of the L10N framework, localize extracts and merges translations\n"
 		"out of and into the whole source tree.\n\n"
-		"Syntax: localize -e -l en-US -f FileName [-QQ]\n"
+		"Syntax: localize -e -l en-US -f FileName \n"
 		"Parameter:\n"
 		"\t-e: Extract mode\n"
 		"\tFileName: Output file when extract mode, input file when merge mode\n"
 		"\tl1...ln: supported languages (\"all\" for all languages).\n"
-        "\tQQ: quiet output)"
 	);
 
 	fprintf( stdout,
 
 	BOOL bExport    = FALSE;
 	BOOL bMerge     = FALSE;
-	bool bQuiet     = false;
-    bool bQuiet2    = false; 
 	bool bSkipLinks = false;
     
 	ByteString sLanguages;
 	ByteString sFileName;
 	ByteString sOutput;
 
-    bQuiet2 = true; 
     bExport = TRUE;
 
 	for( int i = 1; i < argc; i++ ) {
 				return Error();
 			bExport = TRUE;
 		}
-		else if( sSwitch.Equals( "-Q" )) {
-			bQuiet = true;
-		}
 		else if ( sSwitch.Equals( "-I" ) )
 			nState = STATE_ISOCODE;
 		else if ( sSwitch.Equals( "-L" ) )
 			nState = STATE_LANGUAGES;
 		else if ( sSwitch.Equals( "-F" ) )
 			nState = STATE_FILENAME;
-        else if ( sSwitch.Equals( "-QQ" ))
-            bQuiet2 = true;
 		else if ( ByteString( argv[ i ]).ToUpperAscii().Equals( "-O" ) )
 			nState = STATE_OUTPUT;
 		else {
         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 );
+        SourceTreeLocalizer aIter( ByteString( curRepository.c_str() ) , sVersion , (sOutput.Len() > 0) , bSkipLinks );
         aIter.SetLanguageRestriction( sLanguages );	 
         if ( bExport ){
-            if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
+            fflush( stdout );
             if( *iter == "ooo" )
                 aIter.Extract( sFileName );
             else
                 sFileNameWithExt += ByteString( (*iter).c_str() );
                 aIter.Extract( sFileNameWithExt );
             }
-            if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
+            printf("\n%d files found!\n",aIter.GetFileCnt());
         }
     }
     if( hasPwd )
         string pwd;
         Export::getCurrentDir( pwd );
         cout << "Localizing repository " << pwd << "\n";
-        SourceTreeLocalizer aIter( ByteString( pwd.c_str() ) , sVersion , (sOutput.Len() > 0) , bQuiet2 , bSkipLinks );
+        SourceTreeLocalizer aIter( ByteString( pwd.c_str() ) , sVersion , (sOutput.Len() > 0) , bSkipLinks );
         aIter.SetLanguageRestriction( sLanguages );	 
         if ( bExport ){
-            if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
+            fflush( stdout );
             aIter.Extract( sFileName );
-            if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
+            printf("\n%d files found!\n",aIter.GetFileCnt());
         }
  
     }

File l10ntools/source/xrmmerge.cxx

 BOOL bMergeMode;
 BOOL bErrorLog;
 BOOL bUTF8;
-bool bQuiet;
 ByteString sPrj;
 ByteString sPrjRoot;
 ByteString sInputFileName;
 	sInputFileName = "";
 	sActFileName = "";
 	Export::sLanguages = "";
-    bQuiet = false;
 	USHORT nState = STATE_NON;
 	BOOL bInput = FALSE;
 
 		else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-M" ) {
 			nState = STATE_MERGESRC; // next token specifies the merge database
 		}
-		else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-QQ" ) {
-		    bQuiet = true;
-        }
         else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-E" ) {
 			nState = STATE_ERRORLOG;
 			bErrorLog = FALSE;
 	return 1;
 }
 
-int isQuiet(){
-    if( bQuiet )    return 1;
-    else            return 0;
-}
 /*****************************************************************************/
 int EndXrmExport()
 /*****************************************************************************/