summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/en.po18
-rw-r--r--res/lang/en.binbin15782 -> 15922 bytes
-rw-r--r--src/ui/documentwidget.c29
3 files changed, 33 insertions, 14 deletions
diff --git a/po/en.po b/po/en.po
index 64621034..c8c34cb9 100644
--- a/po/en.po
+++ b/po/en.po
@@ -546,6 +546,24 @@ msgstr "AUTO-RELOAD"
546msgid "dlg.autoreload" 546msgid "dlg.autoreload"
547msgstr "Select the auto-reload interval for this tab." 547msgstr "Select the auto-reload interval for this tab."
548 548
549msgid "reload.never"
550msgstr "Never"
551
552msgid "reload.onceperday"
553msgstr "Once per day"
554
555#, c-format
556msgid "num.minutes"
557msgid_plural "num.minutes.n"
558msgstr[0] "%d minute"
559msgstr[1] "%d minutes"
560
561#, c-format
562msgid "num.hours"
563msgid_plural "num.hours.n"
564msgstr[0] "%d hour"
565msgstr[1] "%d hours"
566
549msgid "link.newtab" 567msgid "link.newtab"
550msgstr "Open Link in New Tab" 568msgstr "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
87static int seconds_ReloadInterval_(enum iReloadInterval d) { 87static 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
93static const char *label_ReloadInterval_(enum iReloadInterval d) { 93static 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
108struct Impl_PersistentDocumentState { 109struct Impl_PersistentDocumentState {