Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-05-02 17:36:20 +0300
committerBrandon Labuschagne <blabuschagne@gitlab.com>2019-05-16 18:35:00 +0300
commit0b38e0a24792650b58ed0ad2a5e9ea8f95b7960e (patch)
tree3adab1e56a76ea1cc257db10e3ee5f62c7552ba0 /app/assets/javascripts/gl_field_error.js
parent112193e8a6dea1a42e234e06244b1a20dd7d711b (diff)
I18N of JS files starting with g
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
Diffstat (limited to 'app/assets/javascripts/gl_field_error.js')
-rw-r--r--app/assets/javascripts/gl_field_error.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/gl_field_error.js b/app/assets/javascripts/gl_field_error.js
index a5b8c357e8a..04301c9ce12 100644
--- a/app/assets/javascripts/gl_field_error.js
+++ b/app/assets/javascripts/gl_field_error.js
@@ -1,4 +1,5 @@
import $ from 'jquery';
+import { __ } from '~/locale';
/**
* This class overrides the browser's validation error bubbles, displaying custom
@@ -61,7 +62,7 @@ export default class GlFieldError {
this.inputElement = $(input);
this.inputDomElement = this.inputElement.get(0);
this.form = formErrors;
- this.errorMessage = this.inputElement.attr('title') || 'This field is required.';
+ this.errorMessage = this.inputElement.attr('title') || __('This field is required.');
this.fieldErrorElement = $(`<p class='${errorMessageClass} hidden'>${this.errorMessage}</p>`);
this.state = {