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

Facilitate other contributors to add translation content in other national languages to the project #155

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Alan3344
Copy link

@Alan3344 Alan3344 commented Sep 13, 2023

New and changed instructions:

I noticed that some strings are hard-coded in the code, which makes it inconvenient for multi-language translation.

  1. Add automatic translation file structure generation script
  2. Modify the fixed string structure of src/pages to Translate
  3. Modify the fixed string structure of src/components/signup-form to Translate
  4. Add Chinese README.zh-CN.md
  5. Modify the code in the document to include function highlighting values
  6. Temporarily delete my own local preprocessing script (in order to merge the main branch)

Currently, all Chinese translations have been completed.
To prepare for the submission of subsequent translation content, I checked the project code and tried to keep the author's original code content as unchanged as possible, minimizing differences caused by code formatting, so there would be no conflicts.

参考地址 docusaurus.io

  1. #migration-strategies
  2. #docusaurus-write-translations-sitedir
  3. #translate-your-react-code

Problems encountered during:

  1. prettier format
  2. The image reference of the relative path is hard-coded and cannot be displayed during debugging. - For example the /gallery page (In addition, there are some translatable text strings in the middle. You may need to do some work to extract them.)
  3. The .md file containing export was changed to .mdx due to the preitter plug-in formatting problem, was not compiled, and the translation content was not displayed correctly (as shown in the picture) (currently only in my translation file )

Hope more contributors will join in

  • Add fields to be translated in src/pages/index.js:
    image

  • Effect: (including most spaces)
    image

image

  • Home page
    image

  • .mdx files are not translated, only this one
    image

1. Add automatic translation file structure generation
2. Modify the fixed string structure of src/pages to Translate
3. Modify the fixed string structure of src/components/signup-form to Translate
4. Add Chinese README.zh-CN.md
5. Modify the code in the document to include function highlighting values
6. Temporarily delete my own local preprocessing script (in order to merge the main branch)
@FeodorFitsner
Copy link
Contributor

Thanks for kicking it off!

Are you going to add the settings for publishing Chinese version of website, like here?

@Alan3344
Copy link
Author

Alan3344 commented Sep 14, 2023

Thanks for kicking it off!

Are you going to add the settings for publishing Chinese version of website, like here?

Well, if the website is internationalized into multiple languages, like docusaurus.io zh-CN, this should be a trend to facilitate users to switch.
Since this article uses the docusaurus.io framework, I went to learn it this document

This is my first time using this Python UI framework. I like it very much and recommend it to others to test use, so I'm willing to take the time to make this translation.
And agree that the original author can set the translation website entrance arbitrarily.

@FeodorFitsner
Copy link
Contributor

Are you still working on this PR?

@Alan3344
Copy link
Author

Are you still working on this PR?

Yes, I've been quite busy at work recently.
I saw you didn't reply before

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

Successfully merging this pull request may close these issues.

2 participants