luci-base: cbi.js: collapse whitespace before language string hashing
To mirror the behavior of the Lua runtime, we need to collapse whitepace
in translation source strings before doing the string table lookup.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit aca2c4ba4e
)
This commit is contained in:
parent
e994b09333
commit
f463570590
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ function sfh(s) {
|
|||
}
|
||||
|
||||
function _(s) {
|
||||
return (window.TR && TR[sfh(s)]) || s;
|
||||
return (window.TR && TR[sfh(String(s).trim().replace(/[ \t\n]+/g, ' '))]) || s;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue