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
[i18n] ng insert-i18n
(reverse ng extract-i18n
)
#55073
Comments
Is the below what you are looking for? https://github.com/daniel-sc/ng-extract-i18n-merge I agree that it should be included in the core i18n library, because i fail to see how the i18n can be useful for real projects without such a tool |
No, from my understanding this does not include my requested feature. It's about updating the source language file from the source code but still only one way. If you want this functionality it's a separate feature request. |
I was just trying to help, not trying to hijack your thread. All right, at least it helped clarified what you are after as other people are likely to misinterpret your request like as i did. For this is quite an unusual request, you may want to clarify your use case and give examples of other tools achieving what you are after to increase your chances of getting an answer from someone who can help. I've written a couple of localization tools but can't remember coming across such a feature, nor feeling that I needed it I am not saying this to dismiss your use case, just to highlight that it may feel weird to other people that you'd need something like that, that's why I assumed that you were approaching your problem from the wrong angle and actually needed the extract-merge library. |
I also ended up writing my own script, because extract only creates new translation files but cannot update existing. So once run 1. time, it's game over basically. |
This is not what he is requesting apparently,for this use case you can use the library i posted above. |
@nkosi23 you're right, it's not the precise same use case. I did try out that library but it didn't really work as I had hoped, so had to make my own. |
I guess what I'm requesting is the reverse operation of how I'm not sure if this feature request should include expanding the functionality of the original cli command, too. |
Which @angular/* package(s) are relevant/related to the feature request?
localize
Description
There is a barrier for using Angular's i18n solution because eventually the source code and source language file will differ and to keep them in sync the source code needs to be manually updated which means a developer has to spend time on an automatable task.
If the process was two-way, the i18n package would be way more useful; and not only for its core intent but also for simply maintaining the text content of an app.
Proposed solution
Ideally the cli supports a command to write the strings from the extracted source language file back into the source code.
Alternatives considered
Right now the differences between language file and source code need to be cleaned up manually or by writing a custom automation script. Both alternatives are imho dealbreakers and made me implement a custom way to deal with i18n every single time.
The text was updated successfully, but these errors were encountered: