Skip to content

Commit

Permalink
fix rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolbcn committed Oct 19, 2018
1 parent 6d71f86 commit 935fb59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/rosetta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def build_phrases_from_translations(translations, phrases, current_key = [])
build_phrases_from_translations(value, phrases, current_key + [key])
else
next if value.blank?

phrases << build_phrase(keys: current_key + [key], phrase: value)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rosetta/repositories/local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def file_translations(filename)
# rubocop:disable Style/Send
def load_translations_in_file(filename)
type = File.extname(filename).tr('.', '').downcase
return {} unless type == 'yml' || type == 'yaml'
return {} unless %w[yml yaml].include?(type)

translations = I18n.backend.send(:load_yml, filename)
unless translations.is_a?(Hash)
Expand Down

0 comments on commit 935fb59

Please sign in to comment.