-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Substitute en.toml for pedefined english shortcodes for i18n translation #12418
Substitute en.toml for pedefined english shortcodes for i18n translation #12418
Conversation
/cc @gochist |
i18n/en.toml
Outdated
@@ -27,9 +27,30 @@ other = "Yes" | |||
[feedback_no] | |||
other = "No" | |||
|
|||
[latest_version] | |||
[shortcode_latest_version] |
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.
don't see the value of adding 'shortcode_' to the entry
For up-to-date documentation, see the <a href="{{ .Site.Params.currentUrl }}">latest</a> version. | ||
Kubernetes {{ .Param "version" }} | ||
{{ T "deprecation_warning" }} | ||
<a href="{{ .Site.Params.currentUrl }}">{{ T "latest_version" }}</a> |
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.
you changed the name of 'latest_version' in the i18n file!
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.
@tengqm Thank you for the comment. I just noticed the mistake. I restored [latest_version] from [shortcode_latest_version].
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.
Thanks.
/lgtm |
As a Korean speaker, it looks good to me. |
i18n/en.toml
Outdated
|
||
[shortcode_version_check_mustbeorlater_start] | ||
other = "Your Kubernetes server must be version " | ||
|
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.
Hello @seokho-son, a couple of thoughts:
- Are the two keys above assigned to the same string?
- I am not sure about prefixing the keys with
shortcode
ormain
. How do these prefixes help to identify or discriminate the keys? The keys could be differentiated if there is more than one value or variation on a given key. The names of the keys should be short and just indicate the actual text. - I am not a big fan of adding punctuation into the string values, unless the punctuation needs to be translated or if there is more than one version of a key such as
latest version
versuslatest version.
.
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.
@kbhawkey Thank you for your comments !
-
Are the two keys above assigned to the same string?
[replay] Yes. but it is intentional because of translation difficulty. Even though the strings are same, they can be translated differently according to position and structure of sentence.
For instance,
[shortcode_version_check_mustbe] can be translated into "쿠버네티스 서버는 다음 버전이어야 함. 버전" and
[shortcode_version_check_mustbeorlater_start] can be translated into "쿠버네티스 서버는 버전 " -
I am not sure about prefixing the keys with shortcode or main. How do these prefixes help to identify or discriminate the keys? The keys could be differentiated if there is more than one value or variation on a given key. The names of the keys should be short and just indicate the actual text.
[replay] I understand your concerns. I think I used *.toml in unconventional way.
Usually, the prefixed English words in Layout files are not fully structured sentences, and we need to replace a key with whole string as is for a complete translation.
So, I think the key may not be used in other documents except the files in Layout.
The reason I placed theshortcode_<related file name>
prefix is not for discrimination. It is for traceability to help contributors when they want to change any strings in Layout files.
If necessary, I think we can remove the prefix, and add an annotation in *.toml to separate sections for the keys used in shortcodes.
I am not sure about themain
prefix. It is not a part of this PR, but I think it can be removed. -
I am not a big fan of adding punctuation into the string values, unless the punctuation needs to be translated or if there is more than one version of a key such as latest version versus latest version..
[replay] I agree with you. I wish to reduce punctuation. However, for this moment, shortcodes includes several prefixed English words which is hard to be modified by i18n teams, and utilizing *.toml in translating remnant partials in templates and shortcodes was agreed in sig-docs meeting with consideration of management efficiency.
Please let me know if you have any further idea or requests regarding my reply. Thank you :)
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.
[replay] Yes. but it is intentional because of translation difficulty. Even though the strings are same, they can be translated differently according to position and structure of sentence.
Thanks for this clarification. Please add a comment indicating that this string is duplicated specifically for Korean, so that other languages know that they don't need to duplicate it also.
If necessary, I think we can remove the prefix, and add an annotation in *.toml to separate sections for the keys used in shortcodes.
This is my preferred solution. Adding the shortcode_
prefix inconsistently seems to create more confusion than it solves.
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.
@kbhawkey @zacharysarah To resolve your concerns, I updated PR as follows,
- Removed one of the keys which have the same string. Instead, I rephrased the original sentence that causes Korean translation difficulty.
In en.toml
[version_check_mustbe]
other = "Your Kubernetes server must be version "
[version_check_mustbeorlater]
other = "Your Kubernetes server must be or later than version "
In version-check.html
{{ if eq $minVersion (.Page.Param "version") }}
{{ T "version_check_mustbe" }}{{ $minVersion }}.
{{ else if $minVersion}}
{{ T "version_check_mustbeorlater" }}{{ $minVersion }}.
- Removed
shortcode_
prefix as suggested.
Thank you :)
079f9d7
to
4abf4b7
Compare
Deploy preview for kubernetes-io-master-staging ready! Built with commit 9a4e86d https://deploy-preview-12418--kubernetes-io-master-staging.netlify.com |
/lgtm |
[shortcode_version_check_mustbeorlater_end] | ||
other = " or later." | ||
[version_check_mustbeorlater] | ||
other = "Your Kubernetes server must be or later than version " | ||
|
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.
Hello @seokho-son, looks good. One nit:
The value for version_check_mustbeorlater
seems a bit unclear to me. Would this string work:
Your Kubernetes server must be at or later than version
Here is a page where version_check_mustbeorlater
renders in English:
https://deploy-preview-12418--kubernetes-io-master-staging.netlify.com/docs/tasks/run-application/run-stateless-application-deployment/
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.
@kbhawkey Thank you ! It looks good 👍 I updated PR.
4abf4b7
to
b3d8e68
Compare
b3d8e68
to
9a4e86d
Compare
Rev Substitute en.toml for pedefined english shortcodes Remove prefix Substitute en.toml for pedefined english shortcodes Rev minor Substitute en.toml for pedefined english shortcodes
PR was updated to resolve all the comments. @tengqm please take a look again. Thank you. |
@zacharysarah Could you take a look on this pending PR regarding i18n. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zacharysarah 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 |
@zacharysarah Thank you. I hope let you know that it is not mergeable yet since previous lgtm label has been removed because of an update on this PR. |
/lgtm |
Rev Substitute en.toml for pedefined english shortcodes Remove prefix Substitute en.toml for pedefined english shortcodes Rev minor Substitute en.toml for pedefined english shortcodes
Rev Substitute en.toml for pedefined english shortcodes Remove prefix Substitute en.toml for pedefined english shortcodes Rev minor Substitute en.toml for pedefined english shortcodes
Rev Substitute en.toml for pedefined english shortcodes Remove prefix Substitute en.toml for pedefined english shortcodes Rev minor Substitute en.toml for pedefined english shortcodes
To fix #12160 (Issue in l10n docs referencing EN layouts outside l10n working directory)
This PR is a complement to the merged PR #12239.