Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate filter clashes with gettext filter #108

Open
inthegarage opened this issue Aug 2, 2016 · 3 comments
Open

Translate filter clashes with gettext filter #108

inthegarage opened this issue Aug 2, 2016 · 3 comments

Comments

@inthegarage
Copy link

If people are using the gettext translate filter then the one packed with this control clashes and only partially works. It would be better if gettext version is marked as dependency with the control (like lokijs) so that users of this control can use the full functionality of gettext whilst also using this control.
Also there is no need to write your own translate functionality when it already exists here:

[(https://github.com/rubenv/angular-gettext)]

Please consider removing this filter from future versions of this control. In the meantime we are having to remove it from this control's source code which isn't ideal.
Thank you.

@alexandernst
Copy link
Owner

I'm not really sure how the i18n code in this library would clash with anything else. Could you give me some more details on this issue? Or maybe a demo on jsbin (or similar)?

@inthegarage
Copy link
Author

Thanks Alex for the swift reply, here is the plunkr:
https://plnkr.co/edit/Gj2r9C

You will see directives work just fine, however the filters do not as your filter comes across this one. Angular does not provide namspacing in 1.x
'Show' should be '[MISSING] Show'
This library is very popular with Angular uses and it will cause people problems if trying to use it with your control.
The easy solution is just to rename yours, the long term one would be to use a translator plugin and remove your own translate code. The reason that will be the best long term solution is that it will allow people to plugin in their own translator without having to worry about internals.
Please let me know what further info you need.

@inthegarage
Copy link
Author

I see the effect isn't quite the same to our application, what I see is that the labels are attempted to be translated (on the select control), so as you'd expect the effect is random as probably a "random" filter is being picked up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants