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

feat: i18n with angular localize #1787

Closed
wants to merge 9 commits into from

Conversation

klopfdreh
Copy link
Contributor

@klopfdreh klopfdreh commented Dec 7, 2021

This PR provides a complete i18n integration for spring-cloud-dataflow-ui. (at least I hope I caught every translation required occurrence 😁 )

I also provide a complete translation into german language with this PR.

Screenshot:
Bildschirmfoto 2021-12-07 um 12 02 00

Some important commands:

ng extract-i18n --format=xlf2 - extract all translations into a messages.xlf which should be renamed into messages.en.xlf and moved into src/locale/. All other language files should be compared against this one.
ng serve --open -c=de - runs the ui with a given configuration in this case de (German)

I also adjusted some of the script commands.

This PR addresses: #701

@klopfdreh
Copy link
Contributor Author

If the PR #1786 is merged first this one would require an update of localize to "13.0.1"

@ilayaperumalg
Copy link
Contributor

@klopfdreh Thank you for the contribution!

@klopfdreh
Copy link
Contributor Author

I adjusted the command to extract i18n a bit:
npm run i18n:extract - to extract the translations and place them directly into src/locale/messages.en.xlf

@klopfdreh
Copy link
Contributor Author

Force-Push on my Repository? 😨 Anyway feel free I didn't restrict it. 😄

@oodamien
Copy link
Member

Hi @klopfdreh,
Sorry for that, we are working on the PR:

  • Update Angular
  • Dynamic language switch

@klopfdreh
Copy link
Contributor Author

Great to see! 😃 - if I can help further more just ping me!

@@ -9,10 +9,15 @@
"projectType": "application",
"prefix": "app",
"i18n": {
"sourceLocale": "en-US",
"sourceLocale": {
"code": "en",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice to see that you can apply "en" for source locale - I just tried that, but without a JSON object and it failed. Good to see that it works, now. 👍

@klopfdreh klopfdreh mentioned this pull request Jan 4, 2022
@oodamien
Copy link
Member

oodamien commented Jan 4, 2022

Close in favor of #1794 (easier maintenance, dynamic translation)

@oodamien oodamien closed this Jan 4, 2022
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.

4 participants