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>
This commit is contained in:
parent
3eeb9ef303
commit
aca2c4ba4e
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ function sfh(s) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function _(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