summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-08-07 23:33:56 +0200
committerJo-Philipp Wich <jo@mein.io>2023-08-07 23:33:56 +0200
commit107ed061a8b68f080df122770690d513f52eeed0 (patch)
treebd4e6de4df2a950d6371b43dcf55354bfd671893
parenta435d4e11a1f0701200ad392000dbaf0d0135405 (diff)
luci-base: dispatcher.uc: fix `N_()` fallback implementation
The fallback implementation of `N_()` accessed the wrong variable, a global `n` instead of the local `args`. Adjust the expression to reference the correct variable. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/ucode/dispatcher.uc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc
index 831922ac1d..7ff34afba9 100644
--- a/modules/luci-base/ucode/dispatcher.uc
+++ b/modules/luci-base/ucode/dispatcher.uc
@@ -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 {