module Telegram::Bot::UpdatesController::Translation::ClassMethods

Public Instance Methods

t(key, **options)
Alias for: translate
translate(key, **options) click to toggle source

Class-level helper for lazy translations.

# File lib/telegram/bot/updates_controller/translation.rb, line 15
def translate(key, **options)
  key = "#{controller_path.tr('/', '.')}#{key}" if key.to_s.start_with?('.')
  I18n.translate(key, **options)
end
Also aliased as: t