From 1c17a69e9302f4dfe5398b4eb88818bf3455868e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 May 2012 09:26:23 +0530 Subject: [PATCH] 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) --- src/calibre/gui2/dialogs/scheduler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/dialogs/scheduler.py b/src/calibre/gui2/dialogs/scheduler.py index 64e3c2e0a3..2ae4619d7a 100644 --- a/src/calibre/gui2/dialogs/scheduler.py +++ b/src/calibre/gui2/dialogs/scheduler.py @@ -22,6 +22,7 @@ from calibre.ptempfile import PersistentTemporaryFile from calibre.utils.date import utcnow from calibre.utils.network import internet_connected from calibre import force_unicode +from calibre.utils.localization import get_lang, canonicalize_lang def convert_day_time_schedule(val): day_of_week, hour, minute = val @@ -57,6 +58,8 @@ class DaysOfWeek(Base): self.time = QTimeEdit(self) self.time.setDisplayFormat('hh:mm AP') + if canonicalize_lang(get_lang()) in {'deu', 'nds'}: + self.time.setDisplayFormat('HH:mm') self.hl = QHBoxLayout() self.l1 = QLabel(_('&Download after:')) self.l1.setBuddy(self.time)