diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-02 16:36:20 +0200 |
---|---|---|
committer | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-16 17:35:00 +0200 |
commit | 0b38e0a24792650b58ed0ad2a5e9ea8f95b7960e (patch) | |
tree | 3adab1e56a76ea1cc257db10e3ee5f62c7552ba0 /app/assets/javascripts/gl_field_error.js | |
parent | 112193e8a6dea1a42e234e06244b1a20dd7d711b (diff) | |
download | gitlab-ce-0b38e0a24792650b58ed0ad2a5e9ea8f95b7960e.tar.gz |
I18N of JS files starting with gjs-i18n-g-files
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.js | 3 |
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 = { |