From 0633974a269e866430a479bcc5f55da94a5cee8a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 14 Feb 2020 08:42:04 +0100 Subject: [PATCH] luci-base: cbi.js: handle translation contexts in _() Signed-off-by: Jo-Philipp Wich (cherry picked from commit 5258080ce32b973e80111abd41fec82bf9b5e31e) --- modules/luci-base/htdocs/luci-static/resources/cbi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 3150e393f..92c41515f 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -101,7 +101,8 @@ function trimws(s) { } function _(s, c) { - return (window.TR && TR[sfh(trimws(s))]) || s; + var k = (c != null ? trimws(c) + '\u0001' : '') + trimws(s); + return (window.TR && TR[sfh(k)]) || s; } function N_(n, s, p, c) { -- 2.25.1