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

Substitute en.toml for pedefined english shortcodes for i18n translation #12418

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

seokho-son
Copy link
Member

To fix #12160 (Issue in l10n docs referencing EN layouts outside l10n working directory)

This PR is a complement to the merged PR #12239.

  1. Predefined English words in layouts/shortcodes has been substituted by i18n/en.toml
  2. Modified i18n/ko.toml corresponding to en.toml translation.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 29, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 29, 2019
@seokho-son
Copy link
Member Author

/cc @jimangel @tengqm @chenopis

@seokho-son
Copy link
Member Author

/cc @gochist

i18n/en.toml Outdated
@@ -27,9 +27,30 @@ other = "Yes"
[feedback_no]
other = "No"

[latest_version]
[shortcode_latest_version]
Copy link
Contributor

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>
Copy link
Contributor

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!

Copy link
Member Author

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].

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks.

@tengqm
Copy link
Contributor

tengqm commented Jan 29, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 29, 2019
@gochist
Copy link
Member

gochist commented Jan 29, 2019

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 "

Copy link
Contributor

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 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.
  • 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..

Copy link
Member Author

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 the shortcode_<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 the main 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 :)

Copy link
Contributor

Choose a reason for hiding this comment

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

@seokho-son 👋

[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.

Copy link
Member Author

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,

  1. 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 }}.
  1. Removed shortcode_ prefix as suggested.

Thank you :)

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2019
@netlify
Copy link

netlify bot commented Jan 30, 2019

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 9a4e86d

https://deploy-preview-12418--kubernetes-io-master-staging.netlify.com

@tengqm
Copy link
Contributor

tengqm commented Jan 30, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2019
[shortcode_version_check_mustbeorlater_end]
other = " or later."
[version_check_mustbeorlater]
other = "Your Kubernetes server must be or later than version "

Copy link
Contributor

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/

Copy link
Member Author

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.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2019
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
@seokho-son
Copy link
Member Author

PR was updated to resolve all the comments. @tengqm please take a look again. Thank you.

@seokho-son
Copy link
Member Author

@zacharysarah Could you take a look on this pending PR regarding i18n.

@zacharysarah
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2019
@seokho-son
Copy link
Member Author

seokho-son commented Feb 15, 2019

@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.

@zacharysarah
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 15, 2019
@k8s-ci-robot k8s-ci-robot merged commit bdd953f into kubernetes:master Feb 15, 2019
kwiesmueller pushed a commit to kwiesmueller/website that referenced this pull request Feb 28, 2019
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
krmayankk pushed a commit to krmayankk/kubernetes.github.io that referenced this pull request Mar 11, 2019
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
yagonobre pushed a commit to yagonobre/website that referenced this pull request Mar 14, 2019
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
@jimangel jimangel mentioned this pull request Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue in l10n docs referencing EN layouts outside l10n working directory
6 participants