Skip to content

Commit 7607b46

Browse files
committed
eql to == when comparing strings
1 parent 9760887 commit 7607b46

File tree

1 file changed

+1
-1
lines changed
  • app/services/discourse_translator

1 file changed

+1
-1
lines changed

app/services/discourse_translator/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def self.translate(topic_or_post)
3232
return if text_for_translation(topic_or_post).blank?
3333
detected_lang = detect(topic_or_post)
3434

35-
return detected_lang, get_text(topic_or_post) if (detected_lang&.to_s.eql? I18n.locale.to_s)
35+
return detected_lang, get_text(topic_or_post) if (detected_lang&.to_s == I18n.locale.to_s)
3636
unless translate_supported?(detected_lang, I18n.locale)
3737
raise TranslatorError.new(
3838
I18n.t(

0 commit comments

Comments
 (0)