atticoos / angular-translate-once

:currency_exchange: Extension of angular-translate for one time bindings
53 stars 11 forks source link

Support for `translate-namespace` #18

Open schmkr opened 8 years ago

schmkr commented 8 years ago

angular-translate has a translate-namespace directive.

Would it be possible to support this directive with translate-once?

Example:

<div translate-namespace="CONTENT">
  <div>
      <h3 translate-once=".HEADERS.TITLE"></h3>
      <h3 translate-once=".HEADERS.WELCOME"></h3>
  </div>
  <div translate-namespace=".HEADERS">
      <h3 translate-once=".TITLE">.TITLE</h3>
      <h3 translate-once=".WELCOM"></h3>
  </div>
</div>
atticoos commented 8 years ago

I would imagine so!

If we look at how the translate directive accesses translateNamespace, we can see that it's relatively simple.

It would require isolating the scope on translate-once directives, I'm not sure if this might create a breaking change for some people

DoubleDot commented 7 years ago

Any update on this?