1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-23 02:04:46 +02:00

Merge pull request #6180 from mailcow/fix/6046

[Web] add missing translation for ratelimit in templates overview
This commit is contained in:
FreddleSpl0it 2024-11-20 10:02:34 +01:00 committed by GitHub
commit bb310600b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 19 deletions

View File

@ -693,8 +693,8 @@ jQuery(function($){
} else if (item.attributes.rl_frame === "d"){ } else if (item.attributes.rl_frame === "d"){
item.attributes.rl_frame = lang_rl.day; item.attributes.rl_frame = lang_rl.day;
} }
item.attributes.rl_value = escapeHtml(item.attributes.rl_value); item.attributes.rl_value = (!item.attributes.rl_value) ? "∞" : escapeHtml(item.attributes.rl_value);
item.attributes.ratelimit = item.attributes.rl_value + " " + item.attributes.rl_frame;
if (item.template.toLowerCase() == "default"){ if (item.template.toLowerCase() == "default"){
item.action = '<div class="btn-group">' + item.action = '<div class="btn-group">' +
@ -818,14 +818,8 @@ jQuery(function($){
} }
}, },
{ {
title: 'rl_frame', title: lang_edit.ratelimit,
data: 'attributes.rl_frame', data: 'attributes.ratelimit',
defaultContent: '',
class: 'none',
},
{
title: 'rl_value',
data: 'attributes.rl_value',
defaultContent: '', defaultContent: '',
class: 'none', class: 'none',
}, },
@ -1183,7 +1177,8 @@ jQuery(function($){
} else if (item.attributes.rl_frame === "d"){ } else if (item.attributes.rl_frame === "d"){
item.attributes.rl_frame = lang_rl.day; item.attributes.rl_frame = lang_rl.day;
} }
item.attributes.rl_value = escapeHtml(item.attributes.rl_value); item.attributes.rl_value = (!item.attributes.rl_value) ? "∞" : escapeHtml(item.attributes.rl_value);
item.attributes.ratelimit = item.attributes.rl_value + " " + item.attributes.rl_frame;
item.attributes.quota = humanFileSize(item.attributes.quota); item.attributes.quota = humanFileSize(item.attributes.quota);
@ -1328,14 +1323,8 @@ jQuery(function($){
} }
}, },
{ {
title: "rl_frame", title: lang_edit.ratelimit,
data: 'attributes.rl_frame', data: 'attributes.ratelimit',
defaultContent: '',
class: 'none',
},
{
title: 'rl_value',
data: 'attributes.rl_value',
defaultContent: '', defaultContent: '',
class: 'none', class: 'none',
}, },

View File

@ -41,6 +41,7 @@ $template_data = [
'mailboxes' => $mailboxes, 'mailboxes' => $mailboxes,
'lang_mailbox' => json_encode($lang['mailbox']), 'lang_mailbox' => json_encode($lang['mailbox']),
'lang_rl' => json_encode($lang['ratelimit']), 'lang_rl' => json_encode($lang['ratelimit']),
'lang_edit' => json_encode($lang['edit']),
'lang_datatables' => json_encode($lang['datatables']), 'lang_datatables' => json_encode($lang['datatables']),
]; ];

View File

@ -68,6 +68,7 @@
var acl = '{{ acl_json|raw }}'; var acl = '{{ acl_json|raw }}';
var lang = {{ lang_mailbox|raw }}; var lang = {{ lang_mailbox|raw }};
var lang_rl = {{ lang_rl|raw }}; var lang_rl = {{ lang_rl|raw }};
var lang_edit = {{ lang_edit|raw }};
var lang_datatables = {{ lang_datatables|raw }}; var lang_datatables = {{ lang_datatables|raw }};
var csrf_token = '{{ csrf_token }}'; var csrf_token = '{{ csrf_token }}';
var pagination_size = Math.trunc('{{ pagination_size }}'); var pagination_size = Math.trunc('{{ pagination_size }}');