summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/blob/blob_file_dropzone.js
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-04-30 17:21:39 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-04-30 17:21:39 +0000
commit6a9b6c22ef25bf867e1cddeb7981e19aade8ecec (patch)
treece19d4836d0feca4cfc811a5402da4783d0b1785 /app/assets/javascripts/blob/blob_file_dropzone.js
parent2432a540cff461c5d9c0346dd4021229078d674d (diff)
downloadgitlab-ce-6a9b6c22ef25bf867e1cddeb7981e19aade8ecec.tar.gz
Internationalisation of blob directory
This is one of many MRs opened in order to improve the overall internationalisation of the GitLab codebase. i18n documentation https://docs.gitlab.com/ee/development/i18n/externalization.html
Diffstat (limited to 'app/assets/javascripts/blob/blob_file_dropzone.js')
-rw-r--r--app/assets/javascripts/blob/blob_file_dropzone.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/blob/blob_file_dropzone.js b/app/assets/javascripts/blob/blob_file_dropzone.js
index cd3251ad1ca..9010cd0c3c1 100644
--- a/app/assets/javascripts/blob/blob_file_dropzone.js
+++ b/app/assets/javascripts/blob/blob_file_dropzone.js
@@ -5,6 +5,7 @@ import Dropzone from 'dropzone';
import { visitUrl } from '../lib/utils/url_utility';
import { HIDDEN_CLASS } from '../lib/utils/constants';
import csrf from '../lib/utils/csrf';
+import { sprintf, __ } from '~/locale';
Dropzone.autoDiscover = false;
@@ -73,7 +74,7 @@ export default class BlobFileDropzone {
.html(errorMessage)
.text();
$('.dropzone-alerts')
- .html(`Error uploading file: "${stripped}"`)
+ .html(sprintf(__('Error uploading file: %{stripped}'), { stripped }))
.show();
this.removeFile(file);
},
@@ -84,7 +85,7 @@ export default class BlobFileDropzone {
e.stopPropagation();
if (dropzone[0].dropzone.getQueuedFiles().length === 0) {
// eslint-disable-next-line no-alert
- alert('Please select a file');
+ alert(__('Please select a file'));
return false;
}
toggleLoading(submitButton, submitButtonLoadingIcon, true);