diff options
-rw-r--r-- | po/en.po | 18 | ||||
-rw-r--r-- | res/lang/en.bin | bin | 15782 -> 15922 bytes | |||
-rw-r--r-- | src/ui/documentwidget.c | 29 |
3 files changed, 33 insertions, 14 deletions
@@ -546,6 +546,24 @@ msgstr "AUTO-RELOAD" | |||
546 | msgid "dlg.autoreload" | 546 | msgid "dlg.autoreload" |
547 | msgstr "Select the auto-reload interval for this tab." | 547 | msgstr "Select the auto-reload interval for this tab." |
548 | 548 | ||
549 | msgid "reload.never" | ||
550 | msgstr "Never" | ||
551 | |||
552 | msgid "reload.onceperday" | ||
553 | msgstr "Once per day" | ||
554 | |||
555 | #, c-format | ||
556 | msgid "num.minutes" | ||
557 | msgid_plural "num.minutes.n" | ||
558 | msgstr[0] "%d minute" | ||
559 | msgstr[1] "%d minutes" | ||
560 | |||
561 | #, c-format | ||
562 | msgid "num.hours" | ||
563 | msgid_plural "num.hours.n" | ||
564 | msgstr[0] "%d hour" | ||
565 | msgstr[1] "%d hours" | ||
566 | |||
549 | msgid "link.newtab" | 567 | msgid "link.newtab" |
550 | msgstr "Open Link in New Tab" | 568 | msgstr "Open Link in New Tab" |
551 | 569 | ||
diff --git a/res/lang/en.bin b/res/lang/en.bin index f408cef4..995ceff0 100644 --- a/res/lang/en.bin +++ b/res/lang/en.bin | |||
Binary files differ | |||
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index f6b68034..67cefc9b 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -85,24 +85,25 @@ enum iReloadInterval { | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | static int seconds_ReloadInterval_(enum iReloadInterval d) { | 87 | static int seconds_ReloadInterval_(enum iReloadInterval d) { |
88 | static const int times[] = { 0, 1, 5, 15, 60, 4 * 60, 12 * 60, 24 * 60 }; | 88 | static const int mins[] = { 0, 1, 5, 15, 60, 4 * 60, 12 * 60, 24 * 60 }; |
89 | if (d < 0 || d >= max_ReloadInterval) return 0; | 89 | if (d < 0 || d >= max_ReloadInterval) return 0; |
90 | return times[d]; | 90 | return mins[d] * 60; |
91 | } | 91 | } |
92 | 92 | ||
93 | static const char *label_ReloadInterval_(enum iReloadInterval d) { | 93 | static const char *label_ReloadInterval_(enum iReloadInterval d) { |
94 | static const char *labels[] = { | 94 | switch (d) { |
95 | "Never", | 95 | case never_RelodPeriod: |
96 | "1 minute", | 96 | return cstr_Lang("reload.never"); |
97 | "5 minutes", | 97 | case day_ReloadInterval: |
98 | "15 minutes", | 98 | return cstr_Lang("reload.onceperday"); |
99 | "1 hour", | 99 | case minute_ReloadInterval: |
100 | "4 hours", | 100 | case fiveMinutes_ReloadInterval: |
101 | "12 hours", | 101 | case fifteenMinutes_ReloadInterval: |
102 | "Once per day" | 102 | return formatCStr_Lang("num.minutes.n", seconds_ReloadInterval_(d) / 60); |
103 | }; | 103 | default: |
104 | if (d < 0 || d >= max_ReloadInterval) return 0; | 104 | return formatCStr_Lang("num.hours.n", seconds_ReloadInterval_(d) / 3600); |
105 | return labels[d]; | 105 | } |
106 | return ""; | ||
106 | } | 107 | } |
107 | 108 | ||
108 | struct Impl_PersistentDocumentState { | 109 | struct Impl_PersistentDocumentState { |