Sha256: 8f33efc8ef51aa4a15ba886cabdc8f7b918b0b36a25a56be7fda592a844fa32b

Contents?: true

Size: 834 Bytes

Versions: 12

Compression:

Stored size: 834 Bytes

Contents

# coding: utf-8
class EventsController < ApplicationController
  def create
  end

  def show()
    redirect_to :edit, notice: I18n.t('cb.a')

    # args are ignored
    I18n.t("cb.b", i: "Hello")

    # pattern not reported as unused
    I18n.t("hash.pattern.#{some_value}", i: "Hello")

    # pattern also not reported as unused
    I18n.t("hash.pattern2." + some_value, i: "Hello")

    # same as above but with scope argument
    I18n.t(some_value, scope: [:hash, :pattern3])

    # missing:
    I18n.t 'pattern_missing.a', scope: :hash, other: 1

    # missing:
    I18n.t :b, scope: [:hash, :pattern_missing], other: 1

    # missing, but not yet detected as such :(
    I18n.t "#{stuff}.pattern_missing.c"

    # not missing
    I18n.t "hash.#{stuff}.a"

    # relative key
    I18n.t(".success")
  end

  def update
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
i18n-tasks-0.8.7 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.8.6 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.8.5 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.8.4 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.8.3 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.8.2 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.8.1 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.8.0 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.7.13 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.7.12 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.7.11 spec/fixtures/app/controllers/events_controller.rb
i18n-tasks-0.7.10 spec/fixtures/app/controllers/events_controller.rb