diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-02 17:49:16 +0300 |
---|---|---|
committer | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-07 20:27:52 +0300 |
commit | ed8dc177eda6d1e1f7d89f307e33e678ec47569f (patch) | |
tree | 3e0fa4bf9abdcb6076e5e67e9bd71d7e49e5045d /app/assets/javascripts/issue.js | |
parent | f7bba29cb573e74b56aba7882048aac7de0d6868 (diff) |
I18N JS files starting with i
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/issue.js')
-rw-r--r-- | app/assets/javascripts/issue.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js index cd1afb6ba83..db4607ca58d 100644 --- a/app/assets/javascripts/issue.js +++ b/app/assets/javascripts/issue.js @@ -7,6 +7,7 @@ import flash from './flash'; import TaskList from './task_list'; import CreateMergeRequestDropdown from './create_merge_request_dropdown'; import IssuablesHelper from './helpers/issuables_helper'; +import { __ } from './locale'; export default class Issue { constructor() { @@ -44,7 +45,11 @@ export default class Issue { * @param {Array} data * @param {String} issueFailMessage */ - updateTopState(isClosed, data, issueFailMessage = 'Unable to update this issue at this time.') { + updateTopState( + isClosed, + data, + issueFailMessage = __('Unable to update this issue at this time.'), + ) { if ('id' in data) { const isClosedBadge = $('div.status-box-issue-closed'); const isOpenBadge = $('div.status-box-open'); @@ -81,7 +86,7 @@ export default class Issue { } initIssueBtnEventListeners() { - const issueFailMessage = 'Unable to update this issue at this time.'; + const issueFailMessage = __('Unable to update this issue at this time.'); return $(document).on( 'click', @@ -152,6 +157,6 @@ export default class Issue { $container.html(data.html); } }) - .catch(() => flash('Failed to load related branches')); + .catch(() => flash(__('Failed to load related branches'))); } } |