summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/i18n/po_linter_spec.rb
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2019-01-30 05:10:37 +0000
committerLuke Bennett <lbennett@gitlab.com>2019-01-31 04:56:51 +0000
commite33e3d29ae56ddd10b66513c35f3e318ea375cb9 (patch)
treece5d1515f93c1e38a01c95b5e0f07f1b572f3763 /spec/lib/gitlab/i18n/po_linter_spec.rb
parentb5f089f2b7100dffb1a346e95022f88e6ff06415 (diff)
downloadgitlab-ce-e33e3d29ae56ddd10b66513c35f3e318ea375cb9.tar.gz
Autofixed some untranslated stringsi18n-cop
Diffstat (limited to 'spec/lib/gitlab/i18n/po_linter_spec.rb')
-rw-r--r--spec/lib/gitlab/i18n/po_linter_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/i18n/po_linter_spec.rb b/spec/lib/gitlab/i18n/po_linter_spec.rb
index 3dbc23d2aaf..de56ae10f7e 100644
--- a/spec/lib/gitlab/i18n/po_linter_spec.rb
+++ b/spec/lib/gitlab/i18n/po_linter_spec.rb
@@ -49,14 +49,14 @@ describe Gitlab::I18n::PoLinter do
let(:po_path) { 'spec/fixtures/newlines.po' }
it 'has an error for a normal string' do
- message_id = "You are going to remove %{group_name}.\\nRemoved groups CANNOT be restored!\\nAre you ABSOLUTELY sure?"
+ message_id = _("You are going to remove %{group_name}.\\nRemoved groups CANNOT be restored!\\nAre you ABSOLUTELY sure?")
expected_message = "is defined over multiple lines, this breaks some tooling."
expect(errors[message_id]).to include(expected_message)
end
it 'has an error when a translation is defined over multiple lines' do
- message_id = "You are going to remove %{group_name}.\\nRemoved groups CANNOT be restored!\\nAre you ABSOLUTELY sure?"
+ message_id = _("You are going to remove %{group_name}.\\nRemoved groups CANNOT be restored!\\nAre you ABSOLUTELY sure?")
expected_message = "has translations defined over multiple lines, this breaks some tooling."
expect(errors[message_id]).to include(expected_message)
@@ -137,7 +137,7 @@ describe Gitlab::I18n::PoLinter do
let(:po_path) { 'spec/fixtures/unescaped_chars.po' }
it 'contains an error' do
- message_id = 'You are going to transfer %{project_name_with_namespace} to another owner. Are you ABSOLUTELY sure?'
+ message_id = _('You are going to transfer %{project_name_with_namespace} to another owner. Are you ABSOLUTELY sure?')
expected_error = 'translation contains unescaped `%`, escape it using `%%`'
expect(errors[message_id]).to include(expected_error)
@@ -324,7 +324,7 @@ describe Gitlab::I18n::PoLinter do
it 'adds an error message when translating fails' do
errors = []
- expect(FastGettext::Translation).to receive(:_) { raise 'broken' }
+ expect(FastGettext::Translation).to receive(:_) { raise _('broken') }
linter.validate_translation(errors, entry)
@@ -335,7 +335,7 @@ describe Gitlab::I18n::PoLinter do
entry = fake_translation(msgid: 'Tests|Hello', translation: 'broken')
errors = []
- expect(FastGettext::Translation).to receive(:s_) { raise 'broken' }
+ expect(FastGettext::Translation).to receive(:s_) { raise _('broken') }
linter.validate_translation(errors, entry)