Commit 9f592604 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch 'js-i18n-u2f' into 'master'

Internationalisation of u2f directory

See merge request gitlab-org/gitlab-ce!27749
parents 29c51742 099d3e11
import { __ } from '~/locale';
export default class U2FError { export default class U2FError {
constructor(errorCode, u2fFlowType) { constructor(errorCode, u2fFlowType) {
this.errorCode = errorCode; this.errorCode = errorCode;
...@@ -8,15 +10,17 @@ export default class U2FError { ...@@ -8,15 +10,17 @@ export default class U2FError {
message() { message() {
if (this.errorCode === window.u2f.ErrorCodes.BAD_REQUEST && this.httpsDisabled) { if (this.errorCode === window.u2f.ErrorCodes.BAD_REQUEST && this.httpsDisabled) {
return 'U2F only works with HTTPS-enabled websites. Contact your administrator for more details.'; return __(
'U2F only works with HTTPS-enabled websites. Contact your administrator for more details.',
);
} else if (this.errorCode === window.u2f.ErrorCodes.DEVICE_INELIGIBLE) { } else if (this.errorCode === window.u2f.ErrorCodes.DEVICE_INELIGIBLE) {
if (this.u2fFlowType === 'authenticate') { if (this.u2fFlowType === 'authenticate') {
return 'This device has not been registered with us.'; return __('This device has not been registered with us.');
} }
if (this.u2fFlowType === 'register') { if (this.u2fFlowType === 'register') {
return 'This device has already been registered with us.'; return __('This device has already been registered with us.');
} }
} }
return 'There was a problem communicating with your device.'; return __('There was a problem communicating with your device.');
} }
} }
...@@ -9231,6 +9231,9 @@ msgstr "" ...@@ -9231,6 +9231,9 @@ msgstr ""
msgid "There is already a repository with that name on disk" msgid "There is already a repository with that name on disk"
msgstr "" msgstr ""
msgid "There was a problem communicating with your device."
msgstr ""
msgid "There was an error loading users activity calendar." msgid "There was an error loading users activity calendar."
msgstr "" msgstr ""
...@@ -9309,6 +9312,12 @@ msgstr "" ...@@ -9309,6 +9312,12 @@ msgstr ""
msgid "This container registry has been scheduled for deletion." msgid "This container registry has been scheduled for deletion."
msgstr "" msgstr ""
msgid "This device has already been registered with us."
msgstr ""
msgid "This device has not been registered with us."
msgstr ""
msgid "This diff is collapsed." msgid "This diff is collapsed."
msgstr "" msgstr ""
...@@ -9895,6 +9904,9 @@ msgstr "" ...@@ -9895,6 +9904,9 @@ msgstr ""
msgid "Type" msgid "Type"
msgstr "" msgstr ""
msgid "U2F only works with HTTPS-enabled websites. Contact your administrator for more details."
msgstr ""
msgid "Unable to connect to server: %{error}" msgid "Unable to connect to server: %{error}"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment