* src/DateHandler.py: Fallback to "C" locale instead of the ISO format. This currently basically falls back to en, but this could be enhanced by a translated fallback parser later.

svn: r4551
This commit is contained in:
Martin Hawlisch 2005-05-11 15:45:04 +00:00
parent 04ab8c1462
commit 1c8ab2cf56
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2005-05-11 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/DateHandler.py: Fallback to "C" locale instead of the ISO
format. This currently basically falls back to en, but this could
be enhanced by a translated fallback parser later.
2005-05-10 Don Allingham <don@gramps-project.org>
* src/DbPrompter.py: add callback for progressbar
* src/GrampsXMLDB.py: pass callback task

View File

@ -80,7 +80,7 @@ def get_date_formats():
try:
return _lang_to_display[_lang].formats
except:
return DateDisplay.DateDisplay.formats
return _lang_to_display["C"].formats
def set_format(value):
try:
@ -126,11 +126,14 @@ try:
parser = _lang_to_parser[_lang]()
except:
print "Date parser for",_lang,"not available, using default"
parser = DateParser.DateParser()
parser = _lang_to_parser["C"]()
try:
import GrampsKeys
val = GrampsKeys.get_date_format(_lang_to_display[_lang].formats)
except:
try:
val = GrampsKeys.get_date_format(_lang_to_display["C"].formats)
except:
val = 0
@ -138,5 +141,4 @@ try:
displayer = _lang_to_display[_lang](val)
except:
print "Date displayer for",_lang,"not available, using default"
displayer = DateDisplay.DateDisplay(val)
displayer = _lang_to_display["C"](val)