Skip to content

docs: ko: complete _toctree.yml#22581

Merged
sgugger merged 1 commit into
huggingface:mainfrom
wonhyeongseo:complete-ko-toctree.yml
Apr 5, 2023
Merged

docs: ko: complete _toctree.yml#22581
sgugger merged 1 commit into
huggingface:mainfrom
wonhyeongseo:complete-ko-toctree.yml

Conversation

@wonhyeongseo

@wonhyeongseo wonhyeongseo commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

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 <[email protected]>
@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Apr 5, 2023

Copy link
Copy Markdown

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

@wonhyeongseo

wonhyeongseo commented Apr 5, 2023

Copy link
Copy Markdown
Contributor Author

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

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

@gabrielwithappy gabrielwithappy left a comment

Copy link
Copy Markdown
Contributor

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.

@sgugger sgugger left a comment

Copy link
Copy Markdown
Collaborator

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