We are using ember-i18n for our project and are trying to clean up the syntax of our translation string keys. For example:
{{t 'order-reports.sub-nav.groups.title'}}
… would be a lot nicer if it was simply:
{{t 'groups.title'}}
We want to have our translation strings ‘namespaced’ by the container names. For example, in a component sub-nav
, the translation strings would be:
'component:sub-nav': {
'groups': {
'title': 'Groups',
...
}
}
To accomplish this we want to implement a helper that will automatically prefix whatever string it is passed with the container name.
I know that this.__proto__.debugContainerKey
contains the name for the container object. I want to try and access that property from inside of a helper. But so far it seems the only way I can access application context from within the helper is through the use of services. I am not sure if services could be applicable to this situation.