Skip to content

Commit

Permalink
eql to == when comparing strings
Browse files Browse the repository at this point in the history
  • Loading branch information
nattsw committed Feb 6, 2025
1 parent 9760887 commit 7607b46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/discourse_translator/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def self.translate(topic_or_post)
return if text_for_translation(topic_or_post).blank?
detected_lang = detect(topic_or_post)

return detected_lang, get_text(topic_or_post) if (detected_lang&.to_s.eql? I18n.locale.to_s)
return detected_lang, get_text(topic_or_post) if (detected_lang&.to_s == I18n.locale.to_s)
unless translate_supported?(detected_lang, I18n.locale)
raise TranslatorError.new(
I18n.t(
Expand Down

0 comments on commit 7607b46

Please sign in to comment.