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 substitute conflicts with angular-gettext #162

Open
kwisatz opened this issue Dec 24, 2015 · 4 comments
Open

translate substitute conflicts with angular-gettext #162

kwisatz opened this issue Dec 24, 2015 · 4 comments

Comments

@kwisatz
Copy link

kwisatz commented Dec 24, 2015

We discovered an issue with the translate substitution when this module is used together with angular-gettext.

If dialogs.main is instantiated after gettext, then its translate filter will override gettext's and make all translated text disappear from your app.

The workaround we're using at this time is to make sure to instantiate gettext last.

@niemyjski
Copy link
Collaborator

Are they overriding one of our methods or one of angulars? What ever is causing this should respect angular core implementations (if being used)

@kwisatz
Copy link
Author

kwisatz commented Dec 28, 2015

While I was writing this up I was indeed wondering where the fault would lie. I don't exactly know who's overriding what though, particularly since I'm not overly familiar with angular-translate and not at all with the translate.sub module or how you would go about checking that you don't – or willingly do – override an existing directive/service/filter.

@kwisatz
Copy link
Author

kwisatz commented Dec 28, 2015

OK, looks like my initial search was not too good. Just found this, with mentions angular-gettext overriding the core translate filter and directive: rubenv/angular-gettext#105 and it specifically mentions the dialogs module.

@JoeFirebaugh
Copy link

Ya, I wrote that ticket back on angular-gettext, and I almost opened one here. I would be interested in using Angular Dialog Service again, if it dropped it's dependency on ng-translate. I've since rolled my own service that uses a JQuery Bootstrap 3 plugin. Maybe this project shouldn't be in the business of having or needing translated bundles. Just my two cents.

What I think is nice about this project is this:
dialogs.create(url, ctrlr, data, opts, ctrlAs)

I personally would want to make my own Error/Notification/Progress dialogs, so I would have my own helper functions and templates that would call dialogs.create().

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

3 participants