diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-08-26 13:17:12 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-08-26 13:17:12 +0200 |
commit | d4db8f570730be85039435919ec78b119d7da3f5 (patch) | |
tree | be0ed8a9c41e7c5dbf723709c3998379a388e060 /l10ntools | |
parent | 3276498b1d3b6337e33621b351755b02abea6e30 (diff) |
masterfix: #i10000# modify extract date and dummy fields for string database
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/java/jpropex/java/JPropEx.java | 7 | ||||
-rw-r--r-- | l10ntools/scripts/tool/sdf.py | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java index be59d7f29479..ceeeb5083982 100644 --- a/l10ntools/java/jpropex/java/JPropEx.java +++ b/l10ntools/java/jpropex/java/JPropEx.java @@ -145,8 +145,11 @@ public class JPropEx //String path = makeAbs( inputFileArg ); path = path.replace( rootArg + "/" , "" ); path = path.replace("/","\\"); - return new SdfEntity( projectArg , path , "" /* dummy1 */ , resourceType , "", "" , "" , "" , "" /* dummy2 */ , - sourceLanguage , "", "" , "" , "" , "2002-02-02 02:02:02" ); + // TODO: Make this static + java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date = dateformat.format( new Date() ); + return new SdfEntity( projectArg , path , "0" /* dummy1 */ , resourceType , "", "" , "" , "" , "0" /* dummy2 */ , + sourceLanguage , "", "" , "" , "" , date ); } private void merge() diff --git a/l10ntools/scripts/tool/sdf.py b/l10ntools/scripts/tool/sdf.py index dd413b14f75f..96afbed1452c 100644 --- a/l10ntools/scripts/tool/sdf.py +++ b/l10ntools/scripts/tool/sdf.py @@ -26,6 +26,7 @@ #************************************************************************* from pseudo import PseudoSet,PseudoOrderedDict +from time import gmtime, strftime class SdfData: _filename = ""; @@ -114,7 +115,7 @@ class SdfEntity: const._DATE_POS = 14 def __init__(self, project="", source_file="", dummy1="0", resource_type="", gid="", lid="", helpid="", platform="", dummy2="0", langid="", - text="", helptext="", quickhelptext="", title="", date="2002-02-02 02:02:02"): + text="", helptext="", quickhelptext="", title="", date=""): self.project = project; self.source_file = source_file; self.dummy1 = dummy1; @@ -129,7 +130,11 @@ class SdfEntity: self.helptext = helptext; self.quickhelptext = quickhelptext; self.title = title; - self.date = date; + if date != "": + self.date = date; + else: + self.date = strftime("%Y-%m-%d %H:%M:%S",gmtime()) + def set_properties(self, line): splitted = line.split("\t") |