Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed May 10, 2024
1 parent 443aef1 commit 063df4c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 29 deletions.
1 change: 0 additions & 1 deletion lib/i18n/tasks/translators/google_translator.rb
Expand Up @@ -25,7 +25,6 @@ def translate_values(list, **options)
),
options[:html]
)

end

def options_for_translate_values(from:, to:, **options)
Expand Down
4 changes: 2 additions & 2 deletions spec/google_translate_spec.rb
Expand Up @@ -12,7 +12,7 @@
html_test_plrl = ['html-key.html.one', '<b>Hello %{count}</b>', '<b>Hola %{count}</b>']
html_test_multiline = ['html-key.html.multiline', "<b>Hello</b>\n<b>%{user}</b>", "<b>Hola</b>\n<b>%{user}</b>"]
array_test = ['array-key', ['Hello.', nil, '', 'Goodbye.'], ['Hola.', nil, '', 'Adiós.']]
fixnum_test = ['numeric-key', 1, 1]
fixnum_test = ['numeric-key', 1, 1]
ref_key_test = ['ref-key', :reference, :reference]

describe 'real world test' do
Expand All @@ -29,7 +29,7 @@
context 'command' do
let(:task) { i18n_task }

it 'works' do
it 'works' do # rubocop:disable RSpec/MultipleExpectations
skip 'temporarily disabled on JRuby due to https://github.com/jruby/jruby/issues/4802' if RUBY_ENGINE == 'jruby'
skip 'GOOGLE_TRANSLATE_API_KEY env var not set' unless ENV['GOOGLE_TRANSLATE_API_KEY']
skip 'GOOGLE_TRANSLATE_API_KEY env var is empty' if ENV['GOOGLE_TRANSLATE_API_KEY'].empty?
Expand Down
52 changes: 26 additions & 26 deletions spec/yaml_spec.rb
Expand Up @@ -74,32 +74,32 @@
expect(parsed.dig('en', 'folded_keep')).to eq("hello world\nnewline\n")

expected = <<~YAML
---
en:
literal: |
hello
world
newline
literal_strip: |-
hello
world
newline
literal_keep: |
hello
world
newline
folded: |
hello world
newline
folded_strip: |-
hello world
newline
folded_keep: |
hello world
newline
---
en:
literal: |
hello
world
newline
literal_strip: |-
hello
world
newline
literal_keep: |
hello
world
newline
folded: |
hello world
newline
folded_strip: |-
hello world
newline
folded_keep: |
hello world
newline
YAML

dumped = I18n::Tasks::Data::Adapter::YamlAdapter.dump(parsed, {})
Expand Down

0 comments on commit 063df4c

Please sign in to comment.