Namespaces are supported by grunt-angular-translate, but not the https://angular-translate.github.io/docs/#/api/pascalprecht.translate.directive:translateNamespace directive. The translate-namespace directive allows a developer to avoid repeating the namespace in a view by extracting it to a parent element.
That is, given the following example:
<div translate-namespace="CONTENT">
<div translate-namespace=".HEADERS">
<h3 translate id="example_title">.TITLE</h3>
<h3 translate id="example_welcome">.WELCOME</h3>
</div>
<span translate>COMMON.FIRST_LINE</span>
</div>
Expected:
{
"CONTENT": {
"HEADERS": {
"TITLE": "",
"WELCOME": ""
}
}
"COMMON": {
"FIRST_LINE": ""
}
}
Actual:
{
"0": {
"TITLE": "",
"WELCOME": ""
}
"COMMON": {
"FIRST_LINE": ""
}
}
Namespaces are supported by grunt-angular-translate, but not the https://angular-translate.github.io/docs/#/api/pascalprecht.translate.directive:translateNamespace directive. The
translate-namespacedirective allows a developer to avoid repeating the namespace in a view by extracting it to a parent element.That is, given the following example:
Expected:
Actual: