-
Notifications
You must be signed in to change notification settings - Fork 615
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
Adding login template strings for translation #8587
Adding login template strings for translation #8587
Conversation
"LoginTitle": "Login", | ||
"WelcomeTo": "Welcome to {{platformTitle}}", | ||
"LogInWith": "Log in with {{providerName}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rebeccaalpert I included {{platformTitle}}
and {{providerName}}
to give the translators context. Is this acceptable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me! Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better if the phrase is the key on the left. The translators only receive the key value and they're not going to be able to translate LoginTitle, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the keys
"Log in to your account": "Log in to your account",
"Log in": "Log in",
"Login": "Login",
"Welcome to {{platformTitle}}": "Welcome to {{platformTitle}}",
"Log in with {{providerName}}": "Log in with {{providerName}}",
"Error": "Error"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
8632a7f
to
2c33549
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. It just looks like you need to run yarn i18n
. I think the script allows for manual entries. If that turns out to be incorrect and these are overwritten, you may need to add some parser comments somewhere instead like // t('public~Log in')
.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rebeccaalpert, sg00dwin The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
"Log in with {{providerName}}": "Log in with {{providerName}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't necessarily work for the OAuth server login page. See openshift/oauth-server#71 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sg00dwin Don't manually add these messages to the public.json file. IIRC
yarn i18n
will remove them when run. We need to add i18next-parser comments to one our of source files like
Added these parser comments to pod.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sg00dwin Don't manually add these messages to the public.json file. IIRC yarn i18n
will remove them when run. We need to add i18next-parser comments to one our of source files like
// t('Log in')
// ...etc...
Then yarn i18n
will automatically add them to public.json.
2c33549
to
c8860f6
Compare
/retest |
c8860f6
to
200021c
Compare
200021c
to
72b2137
Compare
/retest |
1a9cb63
to
6d4149a
Compare
6d4149a
to
cb3ebde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rebeccaalpert, sg00dwin, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Related to: openshift/oauth-server#71