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>
This commit is contained in:
Jo-Philipp Wich 2023-08-07 23:33:56 +02:00
parent a435d4e11a
commit 107ed061a8

View file

@ -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 {