diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-03 15:00:44 +0200 |
---|---|---|
committer | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-03 15:00:44 +0200 |
commit | d3e86b4422453d39bf8cde7d7dc7542b174b68fc (patch) | |
tree | 05a7ce4a7455199f216fc0d2c60ee803a95c7736 /app/assets/javascripts/main.js | |
parent | d6aa8a0553e30ef2d0d303fc79515cd5cf3ba1b9 (diff) | |
download | gitlab-ce-js-i18n-m.tar.gz |
I18N JS files starting with mjs-i18n-m
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/main.js')
-rw-r--r-- | app/assets/javascripts/main.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index a2ca4b07a66..657de1a051e 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -31,6 +31,7 @@ import initPerformanceBar from './performance_bar'; import initSearchAutocomplete from './search_autocomplete'; import GlFieldErrors from './gl_field_errors'; import initUserPopovers from './user_popovers'; +import { __ } from './locale'; // expose jQuery as global (TODO: remove these) window.jQuery = jQuery; @@ -207,9 +208,9 @@ document.addEventListener('DOMContentLoaded', () => { const ref = xhrObj.status; if (ref === 401) { - Flash('You need to be logged in.'); + Flash(__('You need to be logged in.')); } else if (ref === 404 || ref === 500) { - Flash('Something went wrong on our end.'); + Flash(__('Something went wrong on our end.')); } }); |