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

setTranslation w/ merge flag is misleading. It does an extend rather than a proper merge. #328

Open
camriera opened this issue Nov 18, 2016 · 4 comments

Comments

@camriera
Copy link

I'm submitting a ... (check one with "x")

[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[X] feature request

Current behavior
setTranslation with merge set, really does and extend (Object.assign) under the covers. A True merge would be more useful for those building applications where we need to override translations values from a base translation file.

Expected/desired behavior
setTranslation with merge set should perform a proper merge (like lodash merge)

Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:btpW3l0jr5beJVjohy1Q).

What is the expected behavior?

What is the motivation / use case for changing the behavior?
Ability to override nested translations

Please tell us about your environment:

  • ng2-translate version: x.x.x

  • Angular version: 2.0.0-rc.X

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

@ocombe
Copy link
Member

ocombe commented Nov 18, 2016

Sounds like a legit request, adding it to the to do list :-)

@camriera
Copy link
Author

+1

@Iverson
Copy link

Iverson commented Apr 25, 2017

+1, any updates?

@llamontagne
Copy link

+1

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

No branches or pull requests

4 participants