module

Devise::I18n

Constants

EN_YAML = ({{ read_file("/tmp/tmp.jFfLMC/src/src/locales/en.yml") }}).strip

Bundled en dictionary (compile-time, byte-identical to the gem's config/locales/en.yml).

Class methods

current

Словарь текущей локали (nil пока не загружена — lookup уйдёт в en).

Source
en

en-словарь (парсится лениво, один раз). Зарегистрированный devise-i18n-словарь en — надмножество словаря самого гема.

Source
load_locale(path : String) : Nil
Source
loaded_locales
Source
locale
Source
locale=(loc : String) : String
Source
register_yaml(loc : String, yaml : String) : Nil

Boot-time регистрация словаря сырой YAML-строкой (без файла — запекается в бинарь шарды-словаря). Аналог добавления файлов в I18n.load_path на инициализации railtie. Рантайм-запись локали не затрагивает: словарь парсится лениво при первом lookup.

Source
t(path : String, scope : String | Nil = nil, count : Int32 | Nil = nil, **opts) : String | Nil

Основной вход. Зеркалит цепочку I18n-вызовов гема: Devise.t("user.signed_in", scope: "devise.sessions") → "devise.sessions.user.signed_in" → "devise.sessions.signed_in" Devise.t("errors.messages.not_saved", count: 3, resource: "User") Интерполяция %{name} из opts (+ %{count}).

Source
translate(path : String, scope : String | Nil, count : Int32 | Nil, interp : Hash(String, String)) : String | Nil
Source

Nested types