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

Provider #140

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Provider #140

wants to merge 3 commits into from

Conversation

gabegorelick
Copy link
Collaborator

Implement most functionality of gettextCatalog as a provider. This allows clients to inject gettextCatalogProvider into the config phase of Angular's lifecycle.

string = context ? $interpolate(string)(context) : string;
return addTranslatedMarkers(string);
},
angular.extend(this, provider);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain what is going on here? I'm not exactly sure I understand what this does.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an Angular provider definition, this is the provider. So when we extend this we're adding fields onto the provider. this.$get is a special function that returns the service. The service is just the provider plus some extra functions that don't make sense in the provider since services like $http aren't available yet.

@smehrbrodt
Copy link

Will this be merged at some point? I need to translate some data I pass to the UI Router which is initialized in the config phase.

@berliner
Copy link

I'd be interested in the status of this issue too. Came here from #138

@junish
Copy link

junish commented Aug 20, 2015

I hope this PR is merged after resolving conflicts.

@GitYouss
Copy link

+1
This is indeed a welcome enhancement.

@crissdev
Copy link
Contributor

Interesting...I was just about implementing this just because of the same reason as @smehrbrodt pointed. @rubenv Any plans on merging this in the near future?
@gabegorelick does this PR needs more than a rebase?

@intellix
Copy link

+1 - Also need this for translating URLs defined in the config stage and would love this to be merged

@lwalter
Copy link

lwalter commented Apr 29, 2016

+1 is there a reason this hasn't been merged yet?

@intellix intellix mentioned this pull request Aug 18, 2016
@d4ncer
Copy link

d4ncer commented Jan 25, 2017

+1 - Need to translate intercepted server responses

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

Successfully merging this pull request may close these issues.

10 participants