projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a435d4e
)
luci-base: dispatcher.uc: fix `N_()` fallback implementation
author
Jo-Philipp Wich
<jo@mein.io>
Mon, 7 Aug 2023 21:33:56 +0000
(23:33 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Mon, 7 Aug 2023 21:33:56 +0000
(23:33 +0200)
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>
modules/luci-base/ucode/dispatcher.uc
patch
|
blob
|
history
diff --git
a/modules/luci-base/ucode/dispatcher.uc
b/modules/luci-base/ucode/dispatcher.uc
index 831922ac1d6a14fc949e35854dceb231e4c066f8..7ff34afba9632bb3d74339a8c0d81bb1008f5d73 100644
(file)
--- 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 {