|
|
|
## Enables the following syntaxes 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 (fallbacks on generic action labels)|
|
|
|
|
|
|
|
|
Furthermore, all these methods get the following features:
|
|
|
|
- fallback on the `default` key: if the lookup for `foo.bar.baz.bat` is unsucessful, we'll look for `foo.bar.default.bat`, then `foo.default.bat`, etc.
|
|
|
|
- missing keys display + logging: __in development mode__, missing keys are signaled in the UI and logged in `log/missing_keys.log` |