projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e994b09
)
luci-base: cbi.js: collapse whitespace before language string hashing
author
Jo-Philipp Wich
<jo@mein.io>
Thu, 16 Jan 2020 17:10:04 +0000
(18:10 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Sun, 19 Jan 2020 19:12:02 +0000
(20:12 +0100)
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
aca2c4ba4e4c847e5ae86e5539537f213678a0f3
)
modules/luci-base/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/cbi.js
b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 4c3128bfd12272027c9f4deca9b6e7068086a18d..ff198027e37df4dd7f72f7dec6fe881e62bf3752 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/cbi.js
@@
-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;
}