Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeze the "." character used in comparisons #181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/stringex/localization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module Localization
include DefaultConversions

class << self

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra empty line detected at class body beginning.

DOT = ".".freeze

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

def backend
@backend ||= i18n_present? ? Backend::I18n : Backend::Internal
end
Expand All @@ -36,7 +39,7 @@ def store_translations(locale, scope, data)
end

def translate(scope, key, options = {})
return if key == "." # I18n doesn't support dots as translation keys so we don't either
return if key == DOT # I18n doesn't support dots as translation keys so we don't either
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [95/80]


locale = options[:locale] || self.locale

Expand Down