ui: wrap regexText in gettext() for translations

also fix a small typo in recovery keys text

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
Oguz Bektas 2021-02-04 16:32:47 +01:00 committed by Thomas Lamprecht
parent 42eef1451c
commit a65eb0ec29
1 changed files with 2 additions and 2 deletions

View File

@ -524,7 +524,7 @@ Ext.define('PBS.login.TfaWindow', {
reference: 'totp', reference: 'totp',
allowBlank: false, allowBlank: false,
regex: /^[0-9]{6}$/, regex: /^[0-9]{6}$/,
regexText: 'TOTP codes consist of six decimal digits', regexText: gettext('TOTP codes consist of six decimal digits'),
}, },
], ],
}, },
@ -551,7 +551,7 @@ Ext.define('PBS.login.TfaWindow', {
reference: 'recoveryKey', reference: 'recoveryKey',
allowBlank: false, allowBlank: false,
regex: /^[0-9a-f]{4}(-[0-9a-f]{4}){3}$/, regex: /^[0-9a-f]{4}(-[0-9a-f]{4}){3}$/,
regexText: 'Does not looks like a valid recovery key', regexText: gettext('Does not look like a valid recovery key'),
}, },
{ {
xtype: 'box', xtype: 'box',