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:
-rw-r--r--app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue6
-rw-r--r--app/workers/concerns/application_worker.rb2
-rw-r--r--app/workers/email_receiver_worker.rb16
-rw-r--r--app/workers/object_storage/migrate_uploads_worker.rb14
-rw-r--r--locale/gitlab.pot51
-rw-r--r--spec/frontend/.eslintrc.yml1
-rw-r--r--spec/frontend/ide/stores/modules/file_templates/mutations_spec.js10
-rw-r--r--spec/frontend/import_projects/store/mutations_spec.js4
-rw-r--r--spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js2
-rw-r--r--spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js2
-rw-r--r--spec/frontend/vuex_shared/modules/modal/mutations_spec.js6
11 files changed, 80 insertions, 34 deletions
diff --git a/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue b/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue
index 06974a12aed..f316c4fe112 100644
--- a/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue
+++ b/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue
@@ -1,9 +1,3 @@
-<script>
-export default {
- name: 'TimelineEntryItem',
-};
-</script>
-
<template>
<li class="timeline-entry">
<div class="timeline-entry-inner"><slot></slot></div>
diff --git a/app/workers/concerns/application_worker.rb b/app/workers/concerns/application_worker.rb
index d64c2f82a09..25c3a945077 100644
--- a/app/workers/concerns/application_worker.rb
+++ b/app/workers/concerns/application_worker.rb
@@ -53,7 +53,7 @@ module ApplicationWorker
schedule = now + delay.to_i
if schedule <= now
- raise ArgumentError, 'The schedule time must be in the future!'
+ raise ArgumentError, _('The schedule time must be in the future!')
end
Sidekiq::Client.push_bulk('class' => self, 'args' => args_list, 'at' => schedule)
diff --git a/app/workers/email_receiver_worker.rb b/app/workers/email_receiver_worker.rb
index bf637f82df2..c4bcda2da16 100644
--- a/app/workers/email_receiver_worker.rb
+++ b/app/workers/email_receiver_worker.rb
@@ -24,22 +24,22 @@ class EmailReceiverWorker
reason =
case error
when Gitlab::Email::UnknownIncomingEmail
- "We couldn't figure out what the email is for. Please create your issue or comment through the web interface."
+ s_("EmailError|We couldn't figure out what the email is for. Please create your issue or comment through the web interface.")
when Gitlab::Email::SentNotificationNotFoundError
- "We couldn't figure out what the email is in reply to. Please create your comment through the web interface."
+ s_("EmailError|We couldn't figure out what the email is in reply to. Please create your comment through the web interface.")
when Gitlab::Email::ProjectNotFound
- "We couldn't find the project. Please check if there's any typo."
+ s_("EmailError|We couldn't find the project. Please check if there's any typo.")
when Gitlab::Email::EmptyEmailError
can_retry = true
- "It appears that the email is blank. Make sure your reply is at the top of the email, we can't process inline replies."
+ s_("EmailError|It appears that the email is blank. Make sure your reply is at the top of the email, we can't process inline replies.")
when Gitlab::Email::UserNotFoundError
- "We couldn't figure out what user corresponds to the email. Please create your comment through the web interface."
+ s_("EmailError|We couldn't figure out what user corresponds to the email. Please create your comment through the web interface.")
when Gitlab::Email::UserBlockedError
- "Your account has been blocked. If you believe this is in error, contact a staff member."
+ s_("EmailError|Your account has been blocked. If you believe this is in error, contact a staff member.")
when Gitlab::Email::UserNotAuthorizedError
- "You are not allowed to perform this action. If you believe this is in error, contact a staff member."
+ s_("EmailError|You are not allowed to perform this action. If you believe this is in error, contact a staff member.")
when Gitlab::Email::NoteableNotFoundError
- "The thread you are replying to no longer exists, perhaps it was deleted? If you believe this is in error, contact a staff member."
+ s_("EmailError|The thread you are replying to no longer exists, perhaps it was deleted? If you believe this is in error, contact a staff member.")
when Gitlab::Email::InvalidAttachment
error.message
when Gitlab::Email::InvalidRecordError
diff --git a/app/workers/object_storage/migrate_uploads_worker.rb b/app/workers/object_storage/migrate_uploads_worker.rb
index 206eb71b898..12400d4e025 100644
--- a/app/workers/object_storage/migrate_uploads_worker.rb
+++ b/app/workers/object_storage/migrate_uploads_worker.rb
@@ -20,7 +20,7 @@ module ObjectStorage
end
def to_s
- success? ? "Migration successful." : "Error while migrating #{upload.id}: #{error.message}"
+ success? ? _("Migration successful.") : _("Error while migrating %{upload_id}: %{error_message}") % { upload_id: upload.id, error_message: error.message }
end
end
@@ -47,7 +47,7 @@ module ObjectStorage
end
def header(success, failures)
- "Migrated #{success.count}/#{success.count + failures.count} files."
+ _("Migrated %{success_count}/%{total_count} files.") % { success_count: success.count, total_count: success.count + failures.count }
end
def failures(failures)
@@ -75,9 +75,9 @@ module ObjectStorage
model_types = uploads.map(&:model_type).uniq
model_has_mount = mounted_as.nil? || model_class.uploaders[mounted_as] == uploader_class
- raise(SanityCheckError, "Multiple uploaders found: #{uploader_types}") unless uploader_types.count == 1
- raise(SanityCheckError, "Multiple model types found: #{model_types}") unless model_types.count == 1
- raise(SanityCheckError, "Mount point #{mounted_as} not found in #{model_class}.") unless model_has_mount
+ raise(SanityCheckError, _("Multiple uploaders found: %{uploader_types}") % { uploader_types: uploader_types }) unless uploader_types.count == 1
+ raise(SanityCheckError, _("Multiple model types found: %{model_types}") % { model_types: model_types }) unless model_types.count == 1
+ raise(SanityCheckError, _("Mount point %{mounted_as} not found in %{model_class}.") % { mounted_as: mounted_as, model_class: model_class }) unless model_has_mount
end
# rubocop: disable CodeReuse/ActiveRecord
@@ -110,9 +110,9 @@ module ObjectStorage
return if args.count == 4
case args.count
- when 3 then raise SanityCheckError, "Job is missing the `model_type` argument."
+ when 3 then raise SanityCheckError, _("Job is missing the `model_type` argument.")
else
- raise SanityCheckError, "Job has wrong arguments format."
+ raise SanityCheckError, _("Job has wrong arguments format.")
end
end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 0e04b67f5b8..7d6e23c80f6 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -3184,6 +3184,30 @@ msgstr ""
msgid "Email patch"
msgstr ""
+msgid "EmailError|It appears that the email is blank. Make sure your reply is at the top of the email, we can't process inline replies."
+msgstr ""
+
+msgid "EmailError|The thread you are replying to no longer exists, perhaps it was deleted? If you believe this is in error, contact a staff member."
+msgstr ""
+
+msgid "EmailError|We couldn't figure out what the email is for. Please create your issue or comment through the web interface."
+msgstr ""
+
+msgid "EmailError|We couldn't figure out what the email is in reply to. Please create your comment through the web interface."
+msgstr ""
+
+msgid "EmailError|We couldn't figure out what user corresponds to the email. Please create your comment through the web interface."
+msgstr ""
+
+msgid "EmailError|We couldn't find the project. Please check if there's any typo."
+msgstr ""
+
+msgid "EmailError|You are not allowed to perform this action. If you believe this is in error, contact a staff member."
+msgstr ""
+
+msgid "EmailError|Your account has been blocked. If you believe this is in error, contact a staff member."
+msgstr ""
+
msgid "Emails"
msgstr ""
@@ -3508,6 +3532,9 @@ msgstr ""
msgid "Error while loading the merge request. Please try again."
msgstr ""
+msgid "Error while migrating %{upload_id}: %{error_message}"
+msgstr ""
+
msgid "Error with Akismet. Please check the logs for more info."
msgstr ""
@@ -4679,6 +4706,12 @@ msgstr ""
msgid "Job has been successfully erased!"
msgstr ""
+msgid "Job has wrong arguments format."
+msgstr ""
+
+msgid "Job is missing the `model_type` argument."
+msgstr ""
+
msgid "Job is stuck. Check runners."
msgstr ""
@@ -5262,6 +5295,12 @@ msgstr ""
msgid "Metrics|Unexpected metrics data response from prometheus endpoint"
msgstr ""
+msgid "Migrated %{success_count}/%{total_count} files."
+msgstr ""
+
+msgid "Migration successful."
+msgstr ""
+
msgid "Milestone"
msgstr ""
@@ -5355,12 +5394,21 @@ msgstr ""
msgid "Most stars"
msgstr ""
+msgid "Mount point %{mounted_as} not found in %{model_class}."
+msgstr ""
+
msgid "Move"
msgstr ""
msgid "Move issue"
msgstr ""
+msgid "Multiple model types found: %{model_types}"
+msgstr ""
+
+msgid "Multiple uploaders found: %{uploader_types}"
+msgstr ""
+
msgid "Name"
msgstr ""
@@ -8307,6 +8355,9 @@ msgstr ""
msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
msgstr ""
+msgid "The schedule time must be in the future!"
+msgstr ""
+
msgid "The snippet can be accessed without any authentication."
msgstr ""
diff --git a/spec/frontend/.eslintrc.yml b/spec/frontend/.eslintrc.yml
index 0e6ca11c1f8..ff18f0e4a2d 100644
--- a/spec/frontend/.eslintrc.yml
+++ b/spec/frontend/.eslintrc.yml
@@ -15,4 +15,5 @@ globals:
rules:
jest/no-identical-title: error
jest/no-focused-tests: error
+ jest/valid-describe: error
jest/no-jasmine-globals: error
diff --git a/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js b/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js
index 8e0e3ae99a1..8e8b7f06ca2 100644
--- a/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js
+++ b/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js
@@ -9,7 +9,7 @@ describe('IDE file templates mutations', () => {
state = createState();
});
- describe(types.REQUEST_TEMPLATE_TYPES, () => {
+ describe(`${types.REQUEST_TEMPLATE_TYPES}`, () => {
it('sets isLoading', () => {
mutations[types.REQUEST_TEMPLATE_TYPES](state);
@@ -17,7 +17,7 @@ describe('IDE file templates mutations', () => {
});
});
- describe(types.RECEIVE_TEMPLATE_TYPES_ERROR, () => {
+ describe(`${types.RECEIVE_TEMPLATE_TYPES_ERROR}`, () => {
it('sets isLoading', () => {
state.isLoading = true;
@@ -27,7 +27,7 @@ describe('IDE file templates mutations', () => {
});
});
- describe(types.RECEIVE_TEMPLATE_TYPES_SUCCESS, () => {
+ describe(`${types.RECEIVE_TEMPLATE_TYPES_SUCCESS}`, () => {
it('sets isLoading to false', () => {
state.isLoading = true;
@@ -43,7 +43,7 @@ describe('IDE file templates mutations', () => {
});
});
- describe(types.SET_SELECTED_TEMPLATE_TYPE, () => {
+ describe(`${types.SET_SELECTED_TEMPLATE_TYPE}`, () => {
it('sets selectedTemplateType', () => {
mutations[types.SET_SELECTED_TEMPLATE_TYPE](state, 'type');
@@ -59,7 +59,7 @@ describe('IDE file templates mutations', () => {
});
});
- describe(types.SET_UPDATE_SUCCESS, () => {
+ describe(`${types.SET_UPDATE_SUCCESS}`, () => {
it('sets updateSuccess', () => {
mutations[types.SET_UPDATE_SUCCESS](state, true);
diff --git a/spec/frontend/import_projects/store/mutations_spec.js b/spec/frontend/import_projects/store/mutations_spec.js
index 8db8e9819ba..505545f7aa5 100644
--- a/spec/frontend/import_projects/store/mutations_spec.js
+++ b/spec/frontend/import_projects/store/mutations_spec.js
@@ -2,7 +2,7 @@ import * as types from '~/import_projects/store/mutation_types';
import mutations from '~/import_projects/store/mutations';
describe('import_projects store mutations', () => {
- describe(types.RECEIVE_IMPORT_SUCCESS, () => {
+ describe(`${types.RECEIVE_IMPORT_SUCCESS}`, () => {
it('removes repoId from reposBeingImported and providerRepos, adds to importedProjects', () => {
const repoId = 1;
const state = {
@@ -20,7 +20,7 @@ describe('import_projects store mutations', () => {
});
});
- describe(types.RECEIVE_JOBS_SUCCESS, () => {
+ describe(`${types.RECEIVE_JOBS_SUCCESS}`, () => {
it('updates importStatus of existing importedProjects', () => {
const repoId = 1;
const state = { importedProjects: [{ id: repoId, importStatus: 'started' }] };
diff --git a/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js b/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js
index 866d6eb05c6..c8deac1c086 100644
--- a/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js
+++ b/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js
@@ -23,7 +23,7 @@ const newLine = {
type: 'new',
};
-describe(SuggestionDiffRow.name, () => {
+describe('SuggestionDiffRow', () => {
let wrapper;
const factory = (options = {}) => {
diff --git a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
index c15635f2105..be6c58f0683 100644
--- a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
+++ b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js
@@ -1,7 +1,7 @@
import { shallowMount, createLocalVue } from '@vue/test-utils';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
-describe(TimelineEntryItem.name, () => {
+describe(`TimelineEntryItem`, () => {
let wrapper;
const factory = (options = {}) => {
diff --git a/spec/frontend/vuex_shared/modules/modal/mutations_spec.js b/spec/frontend/vuex_shared/modules/modal/mutations_spec.js
index d07f8ba1e65..eaaf196d1ec 100644
--- a/spec/frontend/vuex_shared/modules/modal/mutations_spec.js
+++ b/spec/frontend/vuex_shared/modules/modal/mutations_spec.js
@@ -2,7 +2,7 @@ import mutations from '~/vuex_shared/modules/modal/mutations';
import * as types from '~/vuex_shared/modules/modal/mutation_types';
describe('Vuex ModalModule mutations', () => {
- describe(types.SHOW, () => {
+ describe(`${types.SHOW}`, () => {
it('sets isVisible to true', () => {
const state = {
isVisible: false,
@@ -16,7 +16,7 @@ describe('Vuex ModalModule mutations', () => {
});
});
- describe(types.HIDE, () => {
+ describe(`${types.HIDE}`, () => {
it('sets isVisible to false', () => {
const state = {
isVisible: true,
@@ -30,7 +30,7 @@ describe('Vuex ModalModule mutations', () => {
});
});
- describe(types.OPEN, () => {
+ describe(`${types.OPEN}`, () => {
it('sets data and sets isVisible to true', () => {
const data = { id: 7 };
const state = {