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

[Translation] add translation for docs/tour #257

Open
leverimmy opened this issue Feb 9, 2025 · 3 comments
Open

[Translation] add translation for docs/tour #257

leverimmy opened this issue Feb 9, 2025 · 3 comments

Comments

@leverimmy
Copy link
Contributor

I am ready to contribute to adding a Chinese Simplified translation for the docs/tour. However, I have a few questions regarding the process:

  1. Synchronization with the English Version:
    Since the English version is the main source, how will updates or changes to the English version be communicated to other translations? Is there a process in place to ensure the translated versions stay in sync with any modifications in the main version?

  2. Quality and Formatting Checks:
    Are there any established guidelines or checks (e.g., formatting rules like spaces or newlines between code snippets) to maintain consistency and quality across translations? If so, where can I find these guidelines?

Thank you for your guidance! I look forward to contributing.

@alixander
Copy link
Contributor

Hey @leverimmy that's awesome, would love to see a Chinese version of the docs.

  1. It seems to me in all translated docs in other projects I've come across, there's some discrepancies. I assume most non-native English users go to their native language docs most of the time, but when running into a bug/issue or seeking the newest features, go to the English docs. All that to say: there's no process. When something gets too out of date and someone wants to update it, that's when it'll be updated.

  2. Yes, we have CI in place here. Running ./ci/make.sh fmt enforces these.

Some prior art for Korean docs: #202

@leverimmy
Copy link
Contributor Author

@alixander Thanks for your prompt reply!

  1. Got it, thank you! I’ll try to translate as much content into Chinese (Simplified) as I can in the near future—hopefully this weekend.

  2. Thanks for the information. However, I noticed something in the file docs/tour/hello-world.md: there’s no blank line between the metadata and the imports, as shown below:

    ---
    pagination_next: tour/shapes
    ---
    import CodeBlock from '@theme/CodeBlock';
    import HelloWorld from '@site/static/d2/hello-world.d2';

    But in the file i18n/ko/docusaurus-plugin-content-docs/current/tour/hello-world.md, there is a blank line:

    ---
    pagination_next: tour/shapes
    ---
    
    import CodeBlock from '@theme/CodeBlock';
    import HelloWorld from '@site/static/d2/hello-world.d2';

    I wonder if this discrepancy is caused by a bug in the CI pipeline.

    Additionally, in Chinese (and Korean, as well as many other languages), it’s common practice to add spaces between Chinese (or Korean) characters and English words. For example, in the file i18n/ko/docusaurus-plugin-content-docs/current/tour/hello-world.md, it would be better to write:

    위 명령문으로 두 셰이프 `x``y``hello world` 라는 라벨과 함께 연결할 수 있습니다.
                             ^ Note the space here

    rather than:

    위 명령문으로 두 셰이프 `x``y``hello world`라는 라벨과 함께 연결할 수 있습니다.

    This kind of spacing improves readability and ensures consistency with linguistic conventions.

By the way, I’ve also reviewed the comments in #202, but I noticed a few mismatches. For instance, in i18n/ko/docusaurus-plugin-content-docs/current/tour/hello-world.md, there’s inline code included directly in the file, whereas in docs/tour/hello-world.md, the code snippet is referenced instead. I hope @Baejw0111 can address this soon.

@leverimmy
Copy link
Contributor Author

Additionally, I attempted to use 'zh-cn' as the key in the configuration file (docusaurus.config.js). However, it seems that the keys in the configuration cannot include hyphens:

i18n: {
  defaultLocale: "en",
  locales: ["en", "ko"],
  localeConfigs: {
    en: {
      label: "English",
    },
    ko: {
      label: "Korean (한국어)",
    },
    zh-cn: { // DEFINITELY WRONG
    
    }
  }
}

Would 'zhcn' be an acceptable alternative? Or do you have any other preferences or suggestions for the key naming?

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

No branches or pull requests

2 participants