From 0563adb23416cae1ed4aaa4be6376873a22ad10a Mon Sep 17 00:00:00 2001 From: Andy Chiang Date: Wed, 22 Oct 2025 16:49:29 +0700 Subject: [PATCH] luci-app: fix translation strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The current handling method introduces extraneous spaces into the translations. For instance, 'System Log', which is correctly translated to Japanese as 'システムログ' (without extra spaces), is being displayed as 'システム ログ' under the current approach. Other CJK/Southeast Asian languages are experiencing similar issues, including Chinese, Thai, and Lao. Therefore, these elements should be translated together as a single unit, rather than separately. Signed-off-by: Andy Chiang --- .../htdocs/luci-static/resources/view/acme/logread.js | 2 +- .../htdocs/luci-static/resources/view/adblock/logread.js | 2 +- .../htdocs/luci-static/resources/view/banip/firewall_log.js | 2 +- .../htdocs/luci-static/resources/view/banip/processing_log.js | 2 +- .../htdocs/luci-static/resources/view/clamav/clamav-log.js | 2 +- .../htdocs/luci-static/resources/view/nextdns/logread.js | 2 +- modules/luci-base/htdocs/luci-static/resources/tools/views.js | 4 ++-- .../htdocs/luci-static/resources/view/status/syslog.js | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/logread.js b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/logread.js index ff2294ab53..32e0cd77da 100644 --- a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/logread.js +++ b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/logread.js @@ -1,4 +1,4 @@ 'use strict'; 'require tools.views as views'; -return views.LogreadBox("acme", "acme"); \ No newline at end of file +return views.LogreadBox("acme", _('ACME Log')); \ No newline at end of file diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js index 89b8b393f7..8a86ea45ed 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js @@ -1,4 +1,4 @@ 'use strict'; 'require tools.views as views'; -return views.LogreadBox("adblock-", "adblock"); \ No newline at end of file +return views.LogreadBox("adblock-", _('Adblock Log')); \ No newline at end of file diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/firewall_log.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/firewall_log.js index db4ce15fe3..08b7364f3c 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/firewall_log.js +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/firewall_log.js @@ -1,4 +1,4 @@ 'use strict'; 'require tools.views as views'; -return views.LogreadBox(" banIP/", "banIP firewall logs"); +return views.LogreadBox(" banIP/", _('banIP firewall Log')); diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/processing_log.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/processing_log.js index 9d2e1654d7..c693610378 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/processing_log.js +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/processing_log.js @@ -1,4 +1,4 @@ 'use strict'; 'require tools.views as views'; -return views.LogreadBox("banIP-", "banIP"); +return views.LogreadBox("banIP-", _('banIP Log')); diff --git a/applications/luci-app-clamav/htdocs/luci-static/resources/view/clamav/clamav-log.js b/applications/luci-app-clamav/htdocs/luci-static/resources/view/clamav/clamav-log.js index 409a8de36f..6df6f8aaf1 100644 --- a/applications/luci-app-clamav/htdocs/luci-static/resources/view/clamav/clamav-log.js +++ b/applications/luci-app-clamav/htdocs/luci-static/resources/view/clamav/clamav-log.js @@ -1,4 +1,4 @@ 'use strict'; 'require tools.views as views'; -return views.LogreadBox("clamav", "clamav"); +return views.LogreadBox("clamav", _('ClamAV Log')); diff --git a/applications/luci-app-nextdns/htdocs/luci-static/resources/view/nextdns/logread.js b/applications/luci-app-nextdns/htdocs/luci-static/resources/view/nextdns/logread.js index 13b22476f7..d4c8e710b5 100644 --- a/applications/luci-app-nextdns/htdocs/luci-static/resources/view/nextdns/logread.js +++ b/applications/luci-app-nextdns/htdocs/luci-static/resources/view/nextdns/logread.js @@ -1,4 +1,4 @@ 'use strict'; 'require tools.views as views'; -return views.LogreadBox("nextdns", "nextdns"); +return views.LogreadBox("nextdns", _('NextDNS Log')); diff --git a/modules/luci-base/htdocs/luci-static/resources/tools/views.js b/modules/luci-base/htdocs/luci-static/resources/tools/views.js index 01cd7556ab..7b47adc9fa 100644 --- a/modules/luci-base/htdocs/luci-static/resources/tools/views.js +++ b/modules/luci-base/htdocs/luci-static/resources/tools/views.js @@ -25,7 +25,7 @@ var CBILogreadBox = function(logtag, name) { logTextFilter: '', invertLogTextSearch: false, logTagFilter: logtag ? logtag : '', - logName: name ? name : _('System'), + logName: name ? name : _('System Log'), fetchMaxRows: 1000, facilities: [ @@ -233,7 +233,7 @@ var CBILogreadBox = function(logtag, name) { filterMaxRows.addEventListener('change', handleLogFilterChange); return E([], [ - E('h2', {}, [ `${this.logName} ${_('Log')}` ]), + E('h2', {}, [ this.logName ]), E('div', { 'id': 'content_syslog' }, [ E('div', { class: 'cbi-section-descr' }, this.logTagFilter ? _('The syslog output, pre-filtered for messages related to: ' + this.logTagFilter) : '') , E('div', { 'style': 'margin-bottom:10px' }, [ diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js index a70c781571..5240decf86 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js @@ -1,4 +1,4 @@ 'use strict'; 'require tools.views as views'; -return views.LogreadBox(null, _('System')); \ No newline at end of file +return views.LogreadBox(null, _('System Log')); \ No newline at end of file -- 2.30.2