Enables the following syntax in views, controllers and models:
| syntax | description |
|---|---|
"foo.bar".t |
equivalent to I18n.t("foo.bar")
|
Catalog.t |
gets the human name of the Catalog model (plural by default) |
Catalog.ts |
gets the human name of the Catalog model (singular) |
Catalog.tmf('name') |
gets the human name of the Catalog model's name attribute |
Catalog.t_action('new') |
gets the human name of the Catalog model's new action label (falls back on generic action labels) |
Furthermore, all these methods get the following features:
- fallback on the
defaultkey: if the lookup forfoo.bar.baz.batis unsucessful, we'll look forfoo.bar.default.bat, thenfoo.default.bat, etc. - missing keys display + logging: in development mode, missing keys are signaled in the UI and logged in
log/missing_keys.log