mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: add i18n for the rest of QR code strings
https://fedorahosted.org/freeipa/ticket/4402 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
parent
325bbf5bbf
commit
15e85db8f8
@ -27,9 +27,10 @@ define([
|
|||||||
'./details',
|
'./details',
|
||||||
'./facet',
|
'./facet',
|
||||||
'./qrcode',
|
'./qrcode',
|
||||||
|
'./text',
|
||||||
'./search',
|
'./search',
|
||||||
'./entity'],
|
'./entity'],
|
||||||
function(IPA, $, menu, phases, reg, mod_details, mod_facet, QRCode) {
|
function(IPA, $, menu, phases, reg, mod_details, mod_facet, QRCode, text) {
|
||||||
/**
|
/**
|
||||||
* OTP tokens module
|
* OTP tokens module
|
||||||
* @class
|
* @class
|
||||||
@ -386,7 +387,7 @@ otptoken.qr_widget = function(spec) {
|
|||||||
that.show_uri_link = $('<a/>', {
|
that.show_uri_link = $('<a/>', {
|
||||||
name: 'show-uri',
|
name: 'show-uri',
|
||||||
href: '#',
|
href: '#',
|
||||||
text: 'Show configuration uri',
|
text: text.get('@i18n:objects.otptoken.show_uri'),
|
||||||
click: function(e) {
|
click: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
that.update_display_mode(!that.show_link);
|
that.update_display_mode(!that.show_link);
|
||||||
@ -437,11 +438,11 @@ otptoken.qr_widget = function(spec) {
|
|||||||
that.show_link = !!show_link;
|
that.show_link = !!show_link;
|
||||||
|
|
||||||
if (that.show_link) {
|
if (that.show_link) {
|
||||||
that.show_uri_link.text('Show QR code');
|
that.show_uri_link.text(text.get('@i18n:objects.otptoken.show_qr'));
|
||||||
that.qr_control.hide();
|
that.qr_control.hide();
|
||||||
that.uri_control.show();
|
that.uri_control.show();
|
||||||
} else {
|
} else {
|
||||||
that.show_uri_link.text('Show configuration uri');
|
that.show_uri_link.text(text.get('@i18n:objects.otptoken.show_uri'));
|
||||||
that.qr_control.show();
|
that.qr_control.show();
|
||||||
that.uri_control.hide();
|
that.uri_control.hide();
|
||||||
}
|
}
|
||||||
@ -487,7 +488,7 @@ otptoken.adder_dialog_qrcode_post_op = function(object) {
|
|||||||
var uri = data.result.result.uri;
|
var uri = data.result.result.uri;
|
||||||
var qr_dialog = otptoken.qr_dialog({
|
var qr_dialog = otptoken.qr_dialog({
|
||||||
name: 'qr_dialog',
|
name: 'qr_dialog',
|
||||||
title: 'Configure your token',
|
title: '@i18n:objects.otptoken.config_title',
|
||||||
widgets: [
|
widgets: [
|
||||||
{
|
{
|
||||||
$type: 'qrcode',
|
$type: 'qrcode',
|
||||||
@ -499,9 +500,7 @@ otptoken.adder_dialog_qrcode_post_op = function(object) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
qr_dialog.open();
|
qr_dialog.open();
|
||||||
qr_dialog.show_message('Configure your token by scanning the QR code \
|
qr_dialog.show_message(text.get('@i18n:objects.otptoken.config_instructions'));
|
||||||
below. Click on the QR core if you see this on \
|
|
||||||
the device you want to configure.');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -377,9 +377,13 @@
|
|||||||
},
|
},
|
||||||
"otptoken": {
|
"otptoken": {
|
||||||
"add_token": "Add OTP Token",
|
"add_token": "Add OTP Token",
|
||||||
|
"config_title": "Configure your token",
|
||||||
|
"config_instructions": "Configure your token by scanning the QR code below. Click on the QR code if you see this on the device you want to configure.",
|
||||||
"details": "OTP Token Settings",
|
"details": "OTP Token Settings",
|
||||||
"disable": "Disable token",
|
"disable": "Disable token",
|
||||||
"enable": "Enable token",
|
"enable": "Enable token",
|
||||||
|
"show_qr": "Show QR code",
|
||||||
|
"show_uri": "Show configuration uri",
|
||||||
"type_hotp": "Counter-based (HOTP)",
|
"type_hotp": "Counter-based (HOTP)",
|
||||||
"type_totp": "Time-based (TOTP)"
|
"type_totp": "Time-based (TOTP)"
|
||||||
},
|
},
|
||||||
|
@ -521,9 +521,13 @@ class i18n_messages(Command):
|
|||||||
},
|
},
|
||||||
"otptoken": {
|
"otptoken": {
|
||||||
"add_token": _("Add OTP Token"),
|
"add_token": _("Add OTP Token"),
|
||||||
|
"config_title": _("Configure your token"),
|
||||||
|
"config_instructions": _("Configure your token by scanning the QR code below. Click on the QR code if you see this on the device you want to configure."),
|
||||||
"details": _("OTP Token Settings"),
|
"details": _("OTP Token Settings"),
|
||||||
"disable": _("Disable token"),
|
"disable": _("Disable token"),
|
||||||
"enable": _("Enable token"),
|
"enable": _("Enable token"),
|
||||||
|
"show_qr": _("Show QR code"),
|
||||||
|
"show_uri": _("Show configuration uri"),
|
||||||
"type_hotp": _("Counter-based (HOTP)"),
|
"type_hotp": _("Counter-based (HOTP)"),
|
||||||
"type_totp": _("Time-based (TOTP)"),
|
"type_totp": _("Time-based (TOTP)"),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user