Commit 609b748d authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Tim Zallmann

Internationalisation of u2f directory

This is one of many MRs opened in order to improve the overall
internationalisation of the GitLab codebase.

This commit only targets Vanilla JS files.

i18n documentation
https://docs.gitlab.com/ee/development/i18n/externalization.html
parent 72db0691
import { __ } from '~/locale';
export default class U2FError {
constructor(errorCode, u2fFlowType) {
this.errorCode = errorCode;
......@@ -8,15 +10,17 @@ export default class U2FError {
message() {
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) {
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') {
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.');
}
}
......@@ -11943,6 +11943,9 @@ msgstr ""
msgid "There is already a repository with that name on disk"
msgstr ""
msgid "There was a problem communicating with your device."
msgstr ""
msgid "There was an error adding a todo."
msgstr ""
......@@ -12051,6 +12054,12 @@ msgstr ""
msgid "This date is before the start date, so this epic won't appear in the roadmap."
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."
msgstr ""
......@@ -12724,6 +12733,9 @@ msgstr ""
msgid "Type"
msgstr ""
msgid "U2F only works with HTTPS-enabled websites. Contact your administrator for more details."
msgstr ""
msgid "URL"
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