8000 Add es translations and docs instructions to dashboard by scottcarol · Pull Request #4866 · linkerd/linkerd2 · GitHub
[go: up one dir, main page]

Skip to content

Add es translations and docs instructions to dashboard - #4866

Merged
cpretzer merged 3 commits into
mainfrom
cscott/add-translations
Aug 14, 2020
Merged

cpretzer merged 3 commits into
mainfrom
cscott/add-translations

Conversation

@scottcarol
Copy link
Copy Markdown
Contributor

This PR adds keys and es translations for most string literals on the Linkerd
dashboard using js-lingui. Most translations are from @cynthia-sg's earlier
work. Thank you @cynthia-sg!

Nothing should change for en language dashboard users. To test in es, see
viewing instructions in #4803.

Keys are generally named for their UI element tableTitle..., button...,
menuItem... if present.

This approach has the result of reducing the total number of strings in the
dashboard code because many are repeated from page to page.

NOTE There are a small amount of dynamic text values that are NOT included
in this PR, including strings formed with friendlyTitle() in Utils.js, and
some strings in ServiceMesh.

Since those will require some refactoring instead of simply replacing the string
with <Trans>, I left them out of this PR, and will split this out into a
separate PR.

Signed-off-by: Carol Scott carol@buoyant.io

@scottcarol
scottcarol requested a review from alpeb August 12, 2020 17:17
@scottcarol
scottcarol requested a review from a team as a code owner August 12, 2020 17:17
@alpeb alpeb left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @scottcarol , for now I've reviewed the language file, and then I'll give a check to the translated dashboard and let you know how it goes.

Comment thread web/app/js/locales/es/messages.json Outdated
@@ -1,5 +1,103 @@
{
"404Msg": "Página no encontrada.",
"Add {0} to the k8s.yml file<0/><1/>Then run {inject} to add it to the service mesh": "Agregue {0} a la k8s.yml file<0/><1/>Luego ejecuta {inject} para inyectarla en la malla de servicios",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agrega {0} al archivo k8s.yml<0/><1/>Luego ejecuta {inject} para inyectarlo en la malla de servicios

Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
Comment thread web/app/js/locales/es/messages.json Resolved
@scottcarol
Copy link
Copy Markdown
Contributor Author

Thanks so much @alpeb, I've pushed changes with your edits.

@alpeb
alpeb commented Aug 13, 2020
Copy link
Copy Markdown
Member

Thanks @scottcarol , I've spotted this (Edges table title showing [Object object]) on some of the deployment views, that I couldn't reproduce in the edge:
image

@scottcarol
Copy link
Copy Markdown
Contributor Author

Thanks for the 👀 @alpeb, I didn't remember that the Edges table has two possible titles. Should be fixed now

@alpeb alpeb left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🆒 this looks good to me 👍
Looking forward for the followup PR with the remaining translation spots 😉
Some integration test failed because of flakiness, so I retriggered it and it should be fine.

@scottcarol
scottcarol requested 8000 a review from cpretzer August 14, 2020 16:58
@cpretzer cpretzer left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@scottcarol this is a good foundation to getting the dashboard translated to multiple languages.

I couldn't reproduce the [object] issue in the edges display, so it looks like that is fixed.

I think it would be helpful to have a reference file that provides the strings that should be translated from. I see that the en/messages.json file could serve that purpose, so let's see how that goes for now.

Thanks for this! 🚢

@cpretzer
cpretzer merged commit 0ffc44a into main Aug 14, 2020
@cpretzer
cpretzer deleted the cscott/add-translations branch August 14, 2020 17:50
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.

3 participants

0