instance method missing_translation

Ruby on Rails 7.0.10

Since v6.1.7.10 Private

Available in: v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

missing_translation(key, options)

No documentation comment.

Parameters

key req
options req
Source
# File actionview/lib/action_view/helpers/translation_helper.rb, line 142
        def missing_translation(key, options)
          keys = I18n.normalize_keys(options[:locale] || I18n.locale, key, options[:scope])

          title = +"translation missing: #{keys.join(".")}"

          options.each do |name, value|
            unless name == :scope
              title << ", " << name.to_s << ": " << ERB::Util.html_escape(value)
            end
          end

          if ActionView::Base.debug_missing_translation
            content_tag("span", keys.last.to_s.titleize, class: "translation_missing", title: title)
          else
            title
          end
        end

Defined in actionview/lib/action_view/helpers/translation_helper.rb line 142 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Helpers::TranslationHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close