diff options
-rw-r--r-- | install/ui/src/freeipa/otptoken.js | 15 | ||||
-rw-r--r-- | install/ui/test/data/ipa_init.json | 4 | ||||
-rw-r--r-- | ipalib/plugins/internal.py | 4 |
3 files changed, 15 insertions, 8 deletions
diff --git a/install/ui/src/freeipa/otptoken.js b/install/ui/src/freeipa/otptoken.js index c32df3c00..5e395e4a1 100644 --- a/install/ui/src/freeipa/otptoken.js +++ b/install/ui/src/freeipa/otptoken.js @@ -27,9 +27,10 @@ define([ './details', './facet', './qrcode', + './text', './search', './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 * @class @@ -386,7 +387,7 @@ otptoken.qr_widget = function(spec) { that.show_uri_link = $('<a/>', { name: 'show-uri', href: '#', - text: 'Show configuration uri', + text: text.get('@i18n:objects.otptoken.show_uri'), click: function(e) { e.preventDefault(); that.update_display_mode(!that.show_link); @@ -437,11 +438,11 @@ otptoken.qr_widget = function(spec) { that.show_link = !!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.uri_control.show(); } 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.uri_control.hide(); } @@ -487,7 +488,7 @@ otptoken.adder_dialog_qrcode_post_op = function(object) { var uri = data.result.result.uri; var qr_dialog = otptoken.qr_dialog({ name: 'qr_dialog', - title: 'Configure your token', + title: '@i18n:objects.otptoken.config_title', widgets: [ { $type: 'qrcode', @@ -499,9 +500,7 @@ otptoken.adder_dialog_qrcode_post_op = function(object) { }); qr_dialog.open(); - qr_dialog.show_message('Configure your token by scanning the QR code \ - below. Click on the QR core if you see this on \ - the device you want to configure.'); + qr_dialog.show_message(text.get('@i18n:objects.otptoken.config_instructions')); }); diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 857f8ee3f..2f42b3613 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -377,9 +377,13 @@ }, "otptoken": { "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", "disable": "Disable token", "enable": "Enable token", + "show_qr": "Show QR code", + "show_uri": "Show configuration uri", "type_hotp": "Counter-based (HOTP)", "type_totp": "Time-based (TOTP)" }, diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py index e4ebac066..af51cab63 100644 --- a/ipalib/plugins/internal.py +++ b/ipalib/plugins/internal.py @@ -521,9 +521,13 @@ class i18n_messages(Command): }, "otptoken": { "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"), "disable": _("Disable token"), "enable": _("Enable token"), + "show_qr": _("Show QR code"), + "show_uri": _("Show configuration uri"), "type_hotp": _("Counter-based (HOTP)"), "type_totp": _("Time-based (TOTP)"), }, |