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

docs: ko: complete _toctree.yml #22581

Merged
merged 1 commit into from
Apr 5, 2023

Conversation

wonhyeongseo
Copy link
Contributor

@wonhyeongseo wonhyeongseo commented Apr 5, 2023

What does this PR do?

From our first week in localizing the documentation, we came across issues and git conflicts with _toctree.yml.

This PR updates the _toctree.yml file for translations, making it easier for translators to locate the correct files to translate without worrying about the yaml formatting. Each document title now has (<in translation phrase>) added in front of it and the "local" key has been changed to in_translation.

Translators can now use this scaffold by following these steps:

  1. Edit the local value by copy & pasting directly from the same line number in en/_toctree.yml.
  2. Edit the title value by replacing the (<in translation phrase>) <english title> with the translated title of each document.
  3. That's it!

By using this updated scaffold, translators will be able to easily identify the correct files to translate, minimizing the time spent on formatting and file location issues. We hope that this will streamline the translation process and make it more accessible to our community.

Initial language starters can recreate this scaffold by following these steps:

  1. Copy the _toctree.yml file from the en folder.
  2. Paste it into the corresponding language folder (e.g., ko, fr, de).
  3. Create a temporary in_translation.mdx file in the desired language.
  4. Find & Replace local: .* with local: in_translation.
  5. Find & Replace title: with title: (<in translation phrase>) where the phrase is preferrably in the desired language. For example, in Korean the phrase is "번역중"

By taking the initial time to create this scaffold for your language, you will greatly reduce fellow language speakers' yaml formatting issues in the long run.

Part of #20179

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Team HuggingFace: @sgugger, @ArthurZucker, @eunseojo May you please review this PR?

Team PseudoLab: @0525hhgus, @kihoon71, @sim-so, @gabrielwithappy, @HanNayeoniee, @wonhyeongseo, @jungnerd May you please review this PR?

Co-Authored-By: gabrielwithappy <102908949+gabrielwithappy@users.noreply.github.com>
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 5, 2023

The documentation is not available anymore as the PR was closed or merged.

@wonhyeongseo
Copy link
Contributor Author

wonhyeongseo commented Apr 5, 2023

Here's the preview screenshot:

Yellow highlighted items are complete. Hence, they do not have (번역중) in front of them. I hope this new approach will help my colleagues.

May you please merge this, Mr. @sgugger ? Thank you so much for your support 🙏💕

@gabrielwithappy
Copy link
Contributor

I think this PR is a good idea to avoid wrong depth mistakes or yaml syntax errors

Copy link
Contributor

@gabrielwithappy gabrielwithappy left a comment

Choose a reason for hiding this comment

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

It looks good to me.
I think this PR will help to avoid wrong depth mistakes or yaml syntax errors

gabrielwithappy

This comment was marked as duplicate.

gabrielwithappy

This comment was marked as duplicate.

gabrielwithappy

This comment was marked as duplicate.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@sgugger sgugger merged commit f49b076 into huggingface:main Apr 5, 2023
@wonhyeongseo wonhyeongseo deleted the complete-ko-toctree.yml branch April 5, 2023 13:38
@HanNayeoniee HanNayeoniee mentioned this pull request May 2, 2023
5 tasks
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
Co-authored-by: gabrielwithappy <102908949+gabrielwithappy@users.noreply.github.com>
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.

4 participants