module I18n::Processes::HtmlKeys
Constants
- HTML_KEY_PATTERN
- MAYBE_PLURAL_HTML_KEY_PATTERN
Public Instance Methods
html_key?(full_key, locale)
click to toggle source
# File lib/i18n/processes/html_keys.rb, line 8 def html_key?(full_key, locale) # rubocop:disable Style/DoubleNegation !!(full_key =~ HTML_KEY_PATTERN || full_key =~ MAYBE_PLURAL_HTML_KEY_PATTERN && depluralize_key(split_key(full_key, 2)[1], locale) =~ HTML_KEY_PATTERN) # rubocop:enable Style/DoubleNegation end