summaryrefslogtreecommitdiff
path: root/l10ntools/java
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/java')
-rw-r--r--l10ntools/java/jpropex/java/JPropEx.java8
-rw-r--r--l10ntools/java/jpropex/java/SdfEntity.java36
-rwxr-xr-xl10ntools/java/jpropex/jpropex4
3 files changed, 28 insertions, 20 deletions
diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java
index 224bed783cf6..be59d7f29479 100644
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@ -121,6 +121,7 @@ public class JPropEx
String key;
SdfEntity currentStr;
String value;
+ String str;
for( Enumeration e = prop.propertyNames() ; e.hasMoreElements() ; )
{
key = (String) e.nextElement();
@@ -129,8 +130,11 @@ public class JPropEx
currentStr.setLid( key );
value = prop.getProperty( key , "" );
//if( value.equals("") ) System.err.println("Warning: in file "+inputFileArg+" the string with the key "+key+" has a empty string!");
- currentStr.setText( (prop.getProperty( key )).replaceAll("\t" , " " ) ); // TODO: Quoting!!!!
- data.add( currentStr );
+ str = (prop.getProperty( key )).replaceAll("\t" , " " ); // remove tab
+ str = str.replaceAll("\n"," "); // remove return
+ currentStr.setText( str );
+ if( str.length() > 0 )
+ data.add( currentStr );
}
data.write( outputFileArg );
}
diff --git a/l10ntools/java/jpropex/java/SdfEntity.java b/l10ntools/java/jpropex/java/SdfEntity.java
index 52dc61ca40ca..c2f6a5d788b1 100644
--- a/l10ntools/java/jpropex/java/SdfEntity.java
+++ b/l10ntools/java/jpropex/java/SdfEntity.java
@@ -98,23 +98,25 @@ public class SdfEntity implements Cloneable{
public void setProperties( String line ){
- String[] splitted = line.split("\t");
-
- setProject( splitted[ SdfEntity.PROJECT_POS ] );
- setSource_file( splitted[ SdfEntity.SOURCE_FILE_POS ] );
- setDummy1( splitted[ SdfEntity.DUMMY1_POS ] );
- setResource_type( splitted[ SdfEntity.RESOURCE_TYPE_POS ] );
- setGid( splitted[ SdfEntity.GID_POS ] );
- setLid( splitted[ SdfEntity.LID_POS ] );
- setHelpid( splitted[ SdfEntity.HELPID_POS ] );
- setPlatform( splitted[ SdfEntity.PLATFORM_POS ] );
- setDummy2( splitted[ SdfEntity.DUMMY2_POS ] );
- setLangid( splitted[ SdfEntity.LANGID_POS ] );
- setText( splitted[ SdfEntity.TEXT_POS ] );
- setHelptext( splitted[ SdfEntity.HELPTEXT_POS ] );
- setQuickhelptext( splitted[ SdfEntity.QUICKHELPTEXT_POS ] );
- setTitle( splitted[ SdfEntity.TITLE_POS ] );
- setDate( splitted[ SdfEntity.DATE_POS ] );
+ if( line != null )
+ {
+ String[] splitted = line.split("\t",15);
+ setProject( splitted[ SdfEntity.PROJECT_POS ] );
+ setSource_file( splitted[ SdfEntity.SOURCE_FILE_POS ] );
+ setDummy1( splitted[ SdfEntity.DUMMY1_POS ] );
+ setResource_type( splitted[ SdfEntity.RESOURCE_TYPE_POS ] );
+ setGid( splitted[ SdfEntity.GID_POS ] );
+ setLid( splitted[ SdfEntity.LID_POS ] );
+ setHelpid( splitted[ SdfEntity.HELPID_POS ] );
+ setPlatform( splitted[ SdfEntity.PLATFORM_POS ] );
+ setDummy2( splitted[ SdfEntity.DUMMY2_POS ] );
+ setLangid( splitted[ SdfEntity.LANGID_POS ] );
+ setText( splitted[ SdfEntity.TEXT_POS ] );
+ setHelptext( splitted[ SdfEntity.HELPTEXT_POS ] );
+ setQuickhelptext( splitted[ SdfEntity.QUICKHELPTEXT_POS ] );
+ setTitle( splitted[ SdfEntity.TITLE_POS ] );
+ setDate( splitted[ SdfEntity.DATE_POS ] );
+ }
}
public String getFileId(){
diff --git a/l10ntools/java/jpropex/jpropex b/l10ntools/java/jpropex/jpropex
index 2d62d13b093e..8c9982f2b1d3 100755
--- a/l10ntools/java/jpropex/jpropex
+++ b/l10ntools/java/jpropex/jpropex
@@ -3,8 +3,10 @@ if [ x${SOLARENV}x = xx ]; then
echo No environment found, please use 'configure' or 'setsolar'
exit 1
fi
+
if [ x${JAVA_HOME}x = xx ]; then
- echo No Java found!
+ echo ERROR: No java found
exit 1
fi
+
exec java -DSOLARSRC=${SOLARSRC} -DWORK_STAMP=${WORK_STAMP} -DUSE_SHELL= -jar ${SOLARVER}/${INPATH}/bin${UPDMINOREXT}/jpropex.jar "$@"