Edit the time in the 24 hour clock when calibre's interface language is set to German. Fixes #1001809 (Localization issue on scheduled news downloading)

This commit is contained in:
Kovid Goyal 2012-05-20 09:26:23 +05:30
parent 82cb4bd7b5
commit 1c17a69e93

View File

@ -22,6 +22,7 @@ from calibre.ptempfile import PersistentTemporaryFile
from calibre.utils.date import utcnow from calibre.utils.date import utcnow
from calibre.utils.network import internet_connected from calibre.utils.network import internet_connected
from calibre import force_unicode from calibre import force_unicode
from calibre.utils.localization import get_lang, canonicalize_lang
def convert_day_time_schedule(val): def convert_day_time_schedule(val):
day_of_week, hour, minute = val day_of_week, hour, minute = val
@ -57,6 +58,8 @@ class DaysOfWeek(Base):
self.time = QTimeEdit(self) self.time = QTimeEdit(self)
self.time.setDisplayFormat('hh:mm AP') self.time.setDisplayFormat('hh:mm AP')
if canonicalize_lang(get_lang()) in {'deu', 'nds'}:
self.time.setDisplayFormat('HH:mm')
self.hl = QHBoxLayout() self.hl = QHBoxLayout()
self.l1 = QLabel(_('&Download after:')) self.l1 = QLabel(_('&Download after:'))
self.l1.setBuddy(self.time) self.l1.setBuddy(self.time)