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

Get multiple translations for a list of keys #14

Closed
wants to merge 3 commits into from

Conversation

NisStrom
Copy link

No description provided.

@ocombe
Copy link
Member

ocombe commented Jan 12, 2016

Thanks, could you fix the errors ?

src/translate.service.ts(177,31): error TS7006: Parameter 'keys' implicitly has an 'any' type.

src/translate.service.ts(177,37): error TS7006: Parameter 'interpolateParams' implicitly has an 'any' type.

src/translate.service.ts(181,47): error TS7006: Parameter 'res' implicitly has an 'any' type.

src/translate.service.ts(185,7): error TS7017: Index signature of object type implicitly has an 'any' type.

src/translate.service.ts(194,17): error TS7017: Index signature of object type implicitly has an 'any' type.

src/translate.service.ts(197,20): error TS2304: Cannot find name 'Observable_1'.

@NisStrom
Copy link
Author

Should be fixed now

@ocombe
Copy link
Member

ocombe commented Jan 12, 2016

Almost, you need to change:

public getAll = function (keys : Array<string>, interpolateParams?: Object) {

to

public getAll(keys : Array<string>, interpolateParams?: Object) {

you can run tsc in your repository to see the typescript errors (or npm run prepublish if you don't have the typescript compiler installed globally).

@NisStrom
Copy link
Author

It is OK now, do i need to close the pull request?

@NisStrom NisStrom closed this Jan 12, 2016
@NisStrom NisStrom reopened this Jan 12, 2016
@ocombe
Copy link
Member

ocombe commented Jan 12, 2016

Thanks, the tests work, don't close this I'll check it tonight and merge it then.
You could update the README.md to add the new method, or I can do it if you prefer.

@ocombe ocombe closed this in 79e9476 Jan 12, 2016
@ocombe
Copy link
Member

ocombe commented Jan 12, 2016

Ok I changed this a bit, I didn't want to add a new method, so I added the option of the get method to use a single key or an array of keys.
It's available in v1.3.0

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.

2 participants