diff options
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/ucode/dispatcher.uc | 4 | ||||
-rw-r--r-- | modules/luci-base/ucode/runtime.uc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc index 39af8375ea..7ff34afba9 100644 --- a/modules/luci-base/ucode/dispatcher.uc +++ b/modules/luci-base/ucode/dispatcher.uc @@ -52,7 +52,7 @@ function error500(msg, ex) { } catch { http.write('<!--]]>--><!--\'>--><!--">-->\n'); - http.write(`<p>${trim(ex)}</p>\n`); + http.write(`<p>${trim(msg)}</p>\n`); if (ex) { http.write(`<p>${trim(ex.message)}</p>\n`); @@ -886,7 +886,7 @@ dispatch = function(_http, path) { striptags, entityencode, _: (...args) => translate(...args) ?? args[0], - N_: (...args) => ntranslate(...args) ?? (n[0] == 1 ? n[1] : n[2]), + N_: (...args) => ntranslate(...args) ?? (args[0] == 1 ? args[1] : args[2]), }); try { diff --git a/modules/luci-base/ucode/runtime.uc b/modules/luci-base/ucode/runtime.uc index e460127e2c..f14bf74480 100644 --- a/modules/luci-base/ucode/runtime.uc +++ b/modules/luci-base/ucode/runtime.uc @@ -173,7 +173,7 @@ export default function(env) { } if (!media) - error500(`Unable to render any theme header template, last error was:\n${status}`); + env.dispatcher.error500(`Unable to render any theme header template, last error was:\n${status}`); } self.env.media = media; |