From eff38ed7247bb9d80117093baa3678d0f28a32a8 Mon Sep 17 00:00:00 2001 From: Paul Dee Date: Tue, 2 Nov 2021 16:12:33 +0100 Subject: luci-app-wireguard: fix i18n of "ago" Signed-off-by: Paul Dee --- .../htdocs/luci-static/resources/view/wireguard/status.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'applications/luci-app-wireguard/htdocs/luci-static/resources/view') diff --git a/applications/luci-app-wireguard/htdocs/luci-static/resources/view/wireguard/status.js b/applications/luci-app-wireguard/htdocs/luci-static/resources/view/wireguard/status.js index 8614db018e..25d5df9ffb 100644 --- a/applications/luci-app-wireguard/htdocs/luci-static/resources/view/wireguard/status.js +++ b/applications/luci-app-wireguard/htdocs/luci-static/resources/view/wireguard/status.js @@ -18,11 +18,11 @@ function timestampToStr(timestamp) { var seconds = (now.getTime() / 1000) - timestamp; var ago = ''; if (seconds < 60) { - ago = parseInt(seconds) + _('s ago'); + ago = _('%ds ago').format(parseInt(seconds)); } else if (seconds < 3600) { - ago = parseInt(seconds / 60) + _('m ago'); + ago = _('%dm ago').format(parseInt(seconds / 60)); } else if (seconds < 86401) { - ago = parseInt(seconds / 3600) + _('h ago'); + ago = _('%dh ago').format(parseInt(seconds / 3600)); } else { ago = _('over a day ago'); } -- cgit v1.2.3