luci-app-mwan3: add i18n to status page
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 6 May 2021 09:22:02 +0000 (11:22 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 6 May 2021 10:23:12 +0000 (12:23 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 2b0fbcb0c88fb073745ec99974c12f363b771ac2)

applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm

index 9a4d85a7061bd9610edfbeb900fc18b820132bd5..ee746a00bb8dba8c985529d91cb0ffd2c12b0201 100644 (file)
@@ -33,7 +33,7 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
                                                case 'online':
                                                        state = '<%:Online%>';
                                                        time = String.format(
-                                                               '<div><strong>Uptime:&nbsp;</strong>%s</div>',
+                                                               '<div><strong><%:Uptime%>:&nbsp;</strong>%s</div>',
                                                                secondsToString(status.interfaces[iface].online)
                                                        );
                                                        css = 'success';
@@ -41,7 +41,7 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
                                                case 'offline':
                                                        state = '<%:Offline%>';
                                                        time = String.format(
-                                                               '<div><strong>Downtime:&nbsp;</strong>%s</div>',
+                                                               '<div><strong><%:Downtime%>:&nbsp;</strong>%s</div>',
                                                                secondsToString(status.interfaces[iface].offline)
                                                        );
                                                        css = 'danger';
@@ -50,7 +50,7 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
                                                        state = '<%:No Tracking%>';
                                                        if ((status.interfaces[iface].uptime) > 0) {
                                                                time = String.format(
-                                                                       '<div><strong>Uptime:&nbsp;</strong>%s</div>',
+                                                                       '<div><strong><%:Uptime%>:&nbsp;</strong>%s</div>',
                                                                        secondsToString(status.interfaces[iface].uptime)
                                                                );
                                                                css = 'success';
@@ -71,11 +71,11 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
                                                css
                                        );
                                        statusview += String.format(
-                                               '<div><strong>Interface:&nbsp;</strong>%s</div>',
+                                               '<div><strong><%:Interface%>:&nbsp;</strong>%s</div>',
                                                iface
                                        );
                                        statusview += String.format(
-                                               '<div><strong>Status:&nbsp;</strong>%s</div>',
+                                               '<div><strong><%:Status%>:&nbsp;</strong>%s</div>',
                                                state
                                        );
                                        if (time)