Skip to content

Commit 0563adb

Browse files
RickLiuM2A1T90MQ-9systemcrash
authored andcommitted
luci-app: fix translation strings
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 <[email protected]>
1 parent 598b7ca commit 0563adb

File tree

8 files changed

+9
-9
lines changed
  • applications
  • modules
    • luci-base/htdocs/luci-static/resources/tools
    • luci-mod-status/htdocs/luci-static/resources/view/status

8 files changed

+9
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22
'require tools.views as views';
33

4-
return views.LogreadBox("acme", "acme");
4+
return views.LogreadBox("acme", _('ACME Log'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22
'require tools.views as views';
33

4-
return views.LogreadBox("adblock-", "adblock");
4+
return views.LogreadBox("adblock-", _('Adblock Log'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22
'require tools.views as views';
33

4-
return views.LogreadBox(" banIP/", "banIP firewall logs");
4+
return views.LogreadBox(" banIP/", _('banIP firewall Log'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22
'require tools.views as views';
33

4-
return views.LogreadBox("banIP-", "banIP");
4+
return views.LogreadBox("banIP-", _('banIP Log'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22
'require tools.views as views';
33

4-
return views.LogreadBox("clamav", "clamav");
4+
return views.LogreadBox("clamav", _('ClamAV Log'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22
'require tools.views as views';
33

4-
return views.LogreadBox("nextdns", "nextdns");
4+
return views.LogreadBox("nextdns", _('NextDNS Log'));

modules/luci-base/htdocs/luci-static/resources/tools/views.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var CBILogreadBox = function(logtag, name) {
2525
logTextFilter: '',
2626
invertLogTextSearch: false,
2727
logTagFilter: logtag ? logtag : '',
28-
logName: name ? name : _('System'),
28+
logName: name ? name : _('System Log'),
2929
fetchMaxRows: 1000,
3030

3131
facilities: [
@@ -233,7 +233,7 @@ var CBILogreadBox = function(logtag, name) {
233233
filterMaxRows.addEventListener('change', handleLogFilterChange);
234234

235235
return E([], [
236-
E('h2', {}, [ `${this.logName} ${_('Log')}` ]),
236+
E('h2', {}, [ this.logName ]),
237237
E('div', { 'id': 'content_syslog' }, [
238238
E('div', { class: 'cbi-section-descr' }, this.logTagFilter ? _('The syslog output, pre-filtered for messages related to: ' + this.logTagFilter) : '') ,
239239
E('div', { 'style': 'margin-bottom:10px' }, [
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22
'require tools.views as views';
33

4-
return views.LogreadBox(null, _('System'));
4+
return views.LogreadBox(null, _('System Log'));

0 commit comments

Comments
 (0)