diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-01-30 05:10:37 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-01-31 04:56:51 +0000 |
commit | e33e3d29ae56ddd10b66513c35f3e318ea375cb9 (patch) | |
tree | ce5d1515f93c1e38a01c95b5e0f07f1b572f3763 /spec/models | |
parent | b5f089f2b7100dffb1a346e95022f88e6ff06415 (diff) | |
download | gitlab-ce-i18n-cop.tar.gz |
Autofixed some untranslated stringsi18n-cop
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/commit_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/concerns/prometheus_adapter_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/concerns/reactive_caching_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/concerns/spammable_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/milestone_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/project_label_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/project_services/bamboo_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/project_services/jira_service_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/project_services/mattermost_slash_commands_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/project_services/teamcity_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/repository_spec.rb | 6 |
12 files changed, 27 insertions, 27 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index a2d2d77746d..02a5db46f6c 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -201,10 +201,10 @@ describe Commit do end it 'truncates a message without a newline at natural break to 80 characters' do - message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id felis id blandit. Vivamus egestas lacinia lacus, sed rutrum mauris.' + message = _('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id felis id blandit. Vivamus egestas lacinia lacus, sed rutrum mauris.') allow(commit).to receive(:safe_message).and_return(message) - expect(commit.title).to eq('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id...') + expect(commit.title).to eq(_('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id...')) end it "truncates a message with a newline before 80 characters at the newline" do @@ -232,7 +232,7 @@ eos end it "returns entire message if there is no newline" do - message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id felis id blandit. Vivamus egestas lacinia lacus, sed rutrum mauris.' + message = _('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id felis id blandit. Vivamus egestas lacinia lacus, sed rutrum mauris.') allow(commit).to receive(:safe_message).and_return(message) expect(commit.full_title).to eq(message) @@ -260,7 +260,7 @@ Vivamus egestas lacinia lacus, sed rutrum mauris. eos allow(commit).to receive(:safe_message).and_return(message) - expect(commit.description).to eq('Vivamus egestas lacinia lacus, sed rutrum mauris.') + expect(commit.description).to eq(_('Vivamus egestas lacinia lacus, sed rutrum mauris.')) end it 'returns full commit message if commit title more than 100 characters' do diff --git a/spec/models/concerns/prometheus_adapter_spec.rb b/spec/models/concerns/prometheus_adapter_spec.rb index f4b9c57e71a..a84bbc0ed39 100644 --- a/spec/models/concerns/prometheus_adapter_spec.rb +++ b/spec/models/concerns/prometheus_adapter_spec.rb @@ -111,7 +111,7 @@ describe PrometheusAdapter, :use_clean_rails_memory_store_caching do [404, 500].each do |status| context "when Prometheus responds with #{status}" do before do - stub_all_prometheus_requests(environment.slug, status: status, body: "QUERY FAILED!") + stub_all_prometheus_requests(environment.slug, status: status, body: _("QUERY FAILED!")) end it { is_expected.to eq(success: false, result: %(#{status} - "QUERY FAILED!")) } diff --git a/spec/models/concerns/reactive_caching_spec.rb b/spec/models/concerns/reactive_caching_spec.rb index 97a4c212f1c..9b2736fd9a1 100644 --- a/spec/models/concerns/reactive_caching_spec.rb +++ b/spec/models/concerns/reactive_caching_spec.rb @@ -145,7 +145,7 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do stub_reactive_cache(instance, "preexisting") end - let(:calculation) { -> { raise "foo"} } + let(:calculation) { -> { raise _("foo")} } it 'leaves the cache untouched' do expect { go! }.to raise_error("foo") diff --git a/spec/models/concerns/spammable_spec.rb b/spec/models/concerns/spammable_spec.rb index e698207166c..c6d56413622 100644 --- a/spec/models/concerns/spammable_spec.rb +++ b/spec/models/concerns/spammable_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Spammable do - let(:issue) { create(:issue, description: 'Test Desc.') } + let(:issue) { create(:issue, description: _('Test Desc.')) } describe 'Associations' do subject { build(:issue) } diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index 2e436f2cc8a..f42b27d1da3 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -396,7 +396,7 @@ describe Milestone do it 'raises an error when using iid format' do expect { milestone.to_reference(format: :iid) } - .to raise_error(ArgumentError, 'Cannot refer to a group milestone by an internal id!') + .to raise_error(ArgumentError, _('Cannot refer to a group milestone by an internal id!')) end end end diff --git a/spec/models/project_label_spec.rb b/spec/models/project_label_spec.rb index 689d4e505e5..4a93356701c 100644 --- a/spec/models/project_label_spec.rb +++ b/spec/models/project_label_spec.rb @@ -44,7 +44,7 @@ describe ProjectLabel do it 'does not returns error when title does not change' do project_label = create(:label, project: project, name: 'Security') create(:group_label, group: group, name: 'Security') - project_label.description = 'Security related stuff.' + project_label.description = _('Security related stuff.') project_label.valid? diff --git a/spec/models/project_services/bamboo_service_spec.rb b/spec/models/project_services/bamboo_service_spec.rb index ee84fa95f0e..44432a662a9 100644 --- a/spec/models/project_services/bamboo_service_spec.rb +++ b/spec/models/project_services/bamboo_service_spec.rb @@ -199,25 +199,25 @@ describe BambooService, :use_clean_rails_memory_store_caching do end it 'sets commit status to "success" when build state contains Success' do - stub_request(body: bamboo_response(build_state: 'YAY Success!')) + stub_request(body: bamboo_response(build_state: _('YAY Success!'))) is_expected.to eq('success') end it 'sets commit status to "failed" when build state contains Failed' do - stub_request(body: bamboo_response(build_state: 'NO Failed!')) + stub_request(body: bamboo_response(build_state: _('NO Failed!'))) is_expected.to eq('failed') end it 'sets commit status to "pending" when build state contains Pending' do - stub_request(body: bamboo_response(build_state: 'NO Pending!')) + stub_request(body: bamboo_response(build_state: _('NO Pending!'))) is_expected.to eq('pending') end it 'sets commit status to :error when build state is unknown' do - stub_request(body: bamboo_response(build_state: 'FOO BAR!')) + stub_request(body: bamboo_response(build_state: _('FOO BAR!'))) is_expected.to eq(:error) end diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb index 788b3179b01..81f08190e0f 100644 --- a/spec/models/project_services/jira_service_spec.rb +++ b/spec/models/project_services/jira_service_spec.rb @@ -327,9 +327,9 @@ describe JiraService do it 'returns result with the error' do test_url = 'http://jira.example.com/rest/api/2/serverInfo' WebMock.stub_request(:get, test_url).with(basic_auth: %w(jira_username jira_password)) - .to_raise(JIRA::HTTPError.new(double(message: 'Some specific failure.'))) + .to_raise(JIRA::HTTPError.new(double(message: _('Some specific failure.')))) - expect(jira_service.test(nil)).to eq( { success: false, result: 'Some specific failure.' }) + expect(jira_service.test(nil)).to eq( { success: false, result: _('Some specific failure.') }) end end end diff --git a/spec/models/project_services/mattermost_slash_commands_service_spec.rb b/spec/models/project_services/mattermost_slash_commands_service_spec.rb index 1983e0cc967..ef2eff0c3e3 100644 --- a/spec/models/project_services/mattermost_slash_commands_service_spec.rb +++ b/spec/models/project_services/mattermost_slash_commands_service_spec.rb @@ -65,7 +65,7 @@ describe MattermostSlashCommandsService do headers: { 'Content-Type' => 'application/json' }, body: { id: 'api.command.duplicate_trigger.app_error', - message: 'This trigger word is already in use. Please choose another word.', + message: _('This trigger word is already in use. Please choose another word.'), detailed_error: '', request_id: 'obc374man7bx5r3dbc1q5qhf3r', status_code: 500 @@ -77,7 +77,7 @@ describe MattermostSlashCommandsService do succeeded, message = subject expect(succeeded).to be(false) - expect(message).to eq('This trigger word is already in use. Please choose another word.') + expect(message).to eq(_('This trigger word is already in use. Please choose another word.')) end end end @@ -109,13 +109,13 @@ describe MattermostSlashCommandsService do status: 500, headers: { 'Content-Type' => 'application/json' }, body: { - message: 'Failed to get team list.' + message: _('Failed to get team list.') }.to_json ) end it 'shows error messages' do - expect(subject).to eq([[], "Failed to get team list."]) + expect(subject).to eq([[], _("Failed to get team list.")]) end end end diff --git a/spec/models/project_services/teamcity_service_spec.rb b/spec/models/project_services/teamcity_service_spec.rb index 64b4efca43a..c01608ab4f6 100644 --- a/spec/models/project_services/teamcity_service_spec.rb +++ b/spec/models/project_services/teamcity_service_spec.rb @@ -179,25 +179,25 @@ describe TeamcityService, :use_clean_rails_memory_store_caching do end it 'sets commit status to "success" when build status contains SUCCESS' do - stub_request(build_status: 'YAY SUCCESS!') + stub_request(build_status: _('YAY SUCCESS!')) is_expected.to eq('success') end it 'sets commit status to "failed" when build status contains FAILURE' do - stub_request(build_status: 'NO FAILURE!') + stub_request(build_status: _('NO FAILURE!')) is_expected.to eq('failed') end it 'sets commit status to "pending" when build status contains Pending' do - stub_request(build_status: 'NO Pending!') + stub_request(build_status: _('NO Pending!')) is_expected.to eq('pending') end it 'sets commit status to :error when build status is unknown' do - stub_request(build_status: 'FOO BAR!') + stub_request(build_status: _('FOO BAR!')) is_expected.to eq(:error) end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 7a8dc59039e..a4664a714ec 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -366,7 +366,7 @@ describe Project do end it 'contains errors related to the project being deleted' do - expect(new_project.errors.full_messages.first).to eq('The project is still being deleted. Please try again later.') + expect(new_project.errors.full_messages.first).to eq(_('The project is still being deleted. Please try again later.')) end end diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index ac5874fd0f7..6af5082019f 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -650,7 +650,7 @@ describe Repository do context "when an author is specified" do it "uses the given email/name to set the commit's author" do expect do - repository.update_file(user, 'README', 'Updated README!', + repository.update_file(user, 'README', _('Updated README!'), branch_name: 'master', previous_path: 'README', message: 'Update README', @@ -926,7 +926,7 @@ describe Repository do end it 'returns nil when the content is not recognizable' do - repository.create_file(user, 'LICENSE', 'Gitlab B.V.', + repository.create_file(user, 'LICENSE', _('Gitlab B.V.'), message: 'Add LICENSE', branch_name: 'master') expect(repository.license_key).to be_nil @@ -970,7 +970,7 @@ describe Repository do end it 'returns nil when the content is not recognizable' do - repository.create_file(user, 'LICENSE', 'Gitlab B.V.', + repository.create_file(user, 'LICENSE', _('Gitlab B.V.'), message: 'Add LICENSE', branch_name: 'master') expect(repository.license).to be_nil |