2371 use date format set by the user for printing reports in different languages easier (by VPeric)

svn: r16021
This commit is contained in:
Jérôme Rapinat 2010-10-21 16:19:40 +00:00
parent cc43b1856a
commit 7269b0b0e8

View File

@ -39,6 +39,7 @@ _ = gettext.gettext
#------------------------------------------------------------------------ #------------------------------------------------------------------------
import TransUtils import TransUtils
import DateHandler import DateHandler
import config
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
@ -140,8 +141,9 @@ class Translator:
self.__trans = gettext.translation(TransUtils.get_localedomain(), self.__trans = gettext.translation(TransUtils.get_localedomain(),
languages=[lang], languages=[lang],
fallback=True) fallback=True)
val = config.get('preferences.date-format')
if lang in DateHandler.LANG_TO_DISPLAY: if lang in DateHandler.LANG_TO_DISPLAY:
self.__dd = DateHandler.LANG_TO_DISPLAY[lang](None) self.__dd = DateHandler.LANG_TO_DISPLAY[lang](val)
else: else:
self.__dd = DateHandler.displayer self.__dd = DateHandler.displayer