summaryrefslogtreecommitdiff
path: root/transex3
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-04-29 15:48:14 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-04-29 15:48:14 +0000
commit72e8d39533dd1142cab1fd473b8f8d13d1f23df4 (patch)
tree3bbf6edaa97f98b1c8aba68fd17084c1e52b8ff3 /transex3
parentcaa6f1c26924886f6dd5ac348050f0d1cb9f0d17 (diff)
INTEGRATION: CWS mergem8 (1.8.56); FILE MERGED
2003/04/07 12:26:47 nf 1.8.56.1: Fixes: #107095# for new ulf file format and #108524# to support x-no-translate
Diffstat (limited to 'transex3')
-rw-r--r--transex3/source/lngex.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/transex3/source/lngex.cxx b/transex3/source/lngex.cxx
index fe5d89db7c03..b2777d0b1cf7 100644
--- a/transex3/source/lngex.cxx
+++ b/transex3/source/lngex.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: lngex.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: nf $ $Date: 2001-06-27 12:08:41 $
+ * last change: $Author: hr $ $Date: 2003-04-29 16:48:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,7 +74,8 @@
#define STATE_BREAKHELP 0x0008
#define STATE_UNMERGE 0x0009
#define STATE_UTF8 0x000A
-#define STATE_LANGUAGES 0x000B
+#define STATE_ULF 0x000B
+#define STATE_LANGUAGES 0x000C
// set of global variables
ByteString sInputFile;
@@ -82,6 +83,7 @@ BOOL bEnableExport;
BOOL bMergeMode;
BOOL bErrorLog;
BOOL bUTF8;
+BOOL bULF; // ULF = Unicode Language File
ByteString sPrj;
ByteString sPrjRoot;
ByteString sOutputFile;
@@ -95,6 +97,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
bMergeMode = FALSE;
bErrorLog = TRUE;
bUTF8 = TRUE;
+ bULF = FALSE;
sPrj = "";
sPrjRoot = "";
Export::sLanguages = "";
@@ -131,6 +134,10 @@ BOOL ParseCommandLine( int argc, char* argv[])
nState = STATE_UTF8;
bUTF8 = FALSE;
}
+ else if ( ByteString( argv[ i ]).ToUpperAscii() == "-ULF" ) {
+ nState = STATE_ULF;
+ bULF = TRUE;
+ }
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-L" ) {
nState = STATE_LANGUAGES;
}
@@ -186,7 +193,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
void Help()
/*****************************************************************************/
{
- fprintf( stdout, "Syntax:LNGEX[-p Prj][-r PrjRoot]-i FileIn -o FileOut[-m DataBase][-e][-b][-u][-NOUTF8][-L l1,l2,...]\n" );
+ fprintf( stdout, "Syntax:LNGEX[-p Prj][-r PrjRoot]-i FileIn -o FileOut[-m DataBase][-e][-b][-u][-NOUTF8][-ULF][-L l1,l2,...]\n" );
fprintf( stdout, " Prj: Project\n" );
fprintf( stdout, " PrjRoot: Path to project root (..\\.. etc.)\n" );
fprintf( stdout, " FileIn: Source file (*.lng)\n" );
@@ -196,6 +203,7 @@ void Help()
fprintf( stdout, " -b: no function\n" );
fprintf( stdout, " -u: no function\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 (01,33,46,49...)\n" );
fprintf( stdout, " A fallback language can be defined like this: l1=f1.\n" );
fprintf( stdout, " f1, f2,... are also elements of (01,33,46,49...)\n" );
@@ -222,7 +230,7 @@ int _cdecl main( int argc, char *argv[] )
fprintf( stdout, "\nProcessing File %s ...\n", sInputFile.GetBuffer());
if ( sOutputFile.Len()) {
- LngParser aParser( sInputFile, bUTF8 );
+ LngParser aParser( sInputFile, bUTF8, bULF );
if ( bMergeMode )
aParser.Merge( sMergeSrc, sOutputFile );
else