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

[zh] Add zh version of homepage #4341

Merged
merged 5 commits into from
May 10, 2024
Merged

Conversation

windsonsea
Copy link
Member

@windsonsea windsonsea commented Apr 23, 2024

Some tips:

  • add /zh to its relevant url path if the Chinese version of the page is available.
  • add anchors to headings in those pages under zh/docs/
  • npx prettier --w is not so perfect to Chinese. It's not correct to add any space between Chinese words. It's recommended to add a space after en words, numbers, and punctuations
  • A localization style guide may be required

Edit (@chalin)

Preview: https://deploy-preview-4341--opentelemetry.netlify.app/zh/

Redirect tests:

@windsonsea windsonsea requested a review from a team as a code owner April 23, 2024 02:19
@svrnm
Copy link
Member

svrnm commented Apr 23, 2024

Thank you @windsonsea! We will take your PR to work towards making the Chinese version available, so we will push commits to your PR, so if you want to apply any additional changes make sure you pull commits if there are any

* `npx prettier --w` is not so perfect to Chinese. It's not correct to add any space between Chinese words. It's recommended to add a space after en words, numbers, and punctuations

This is good to know, thanks. As a starting point we can disable prettier for the zh folder, but I would prefer to have it in place as soon as the translation grows, but we need your help here, can you check if there is a prettier configuration that would help with that? We currently have turned on proseWrap: always, which based on a quick search on https://github.com/prettier/prettier/issues might be part of the issue?

* A localization style guide may be required

Yes! The moment we have the first language landed, we can work on that.

@windsonsea
Copy link
Member Author

Seems this issue is talking about Chinese prettier: prettier/prettier#14936

We need to add some rules:

  • Do not add newline between Chinese words
  • Do not add newline before a Chinese punctuation symbol like ,。!?、 which are two-byte chars different from en symbols , . ! ?

@svrnm
Copy link
Member

svrnm commented Apr 23, 2024

Thanks for taking a look and pointing to the right issue, I'll take a deeper look. Note, that prettier is unfortunately not very configurable, see here, so I am not sure if we can implement that somehow, @chalin probably knows best.

@chalin
Copy link
Contributor

chalin commented Apr 25, 2024

FYI, I'll get working on this as soon as I can.

@chalin
Copy link
Contributor

chalin commented May 7, 2024

@windsonsea - could you please only include the translation of the homepage? We'll get to the other page later, but at the moment, it is just causing more trouble than is worth (because there isn't an index page for that section yet).

@windsonsea
Copy link
Member Author

Hi @chalin , sure, only the _index.md is included now.

@chalin chalin changed the title [zh] Localize _index.md and what-is-opentelemetry.md [zh] Add zh version of homepage May 8, 2024
@chalin chalin added the i18n internationalization label May 8, 2024
@chalin chalin mentioned this pull request May 8, 2024
7 tasks
@chalin
Copy link
Contributor

chalin commented May 9, 2024

@windsonsea - is "OpenTelemetry 项目网站" a good translation of "The OpenTelemetry Project Site", and if not, what would be?

@windsonsea
Copy link
Member Author

@windsonsea - is "OpenTelemetry 项目网站" a good translation of "The OpenTelemetry Project Site", and if not, what would be?

Yes, it's fine.

Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

@windsonsea PTAL at my inline comments

content/zh/_index.md Outdated Show resolved Hide resolved
content/zh/_index.md Outdated Show resolved Hide resolved
@chalin
Copy link
Contributor

chalin commented May 10, 2024

@windsonsea - I'm going to merge the suggested edits now because I want to merge this PR. We can always fix it in a followup PR.
@svrnm et al. - merging this PR now. Note that the zh pages won't show up in production b/c the pages are marked as draft atm.

@chalin chalin merged commit 1f8c73c into open-telemetry:main May 10, 2024
15 checks passed
@chalin
Copy link
Contributor

chalin commented May 10, 2024

In case you missed it in the opening-comment edit I made, you can see a preview of the Chinese homepage:

@windsonsea
Copy link
Member Author

In case you missed it in the opening-comment edit I made, you can see a preview of the Chinese homepage:

Cool! The preview looks good. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n internationalization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants