-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add translation guidelines and issue template #1811
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
f64595f
585dad6
287106c
d999a6f
69eff38
b3035d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: 🌐 Translating a new language? | ||
about: Start a new translation effort in your language | ||
title: '[i18n-<languageCode>] Translating docs to <languageName>' | ||
labels: WIP | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Note: Please search to see if an issue already exists for the language you are trying to translate. | ||
--> | ||
|
||
Hi! | ||
|
||
Let's bring the documentation to all the <languageName>-speaking community 🌐 (currently 0 out of 21 complete) | ||
|
||
Who would want to translate? Please follow the 🤗 [TRANSLATING guide](https://github.com/huggingface/smolagents/blob/main/docs/TRANSLATING.md). Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list. | ||
|
||
Some notes: | ||
|
||
* Please translate using an informal tone (imagine you are talking with a friend about smolagents 🤗). | ||
* Please translate in a gender-neutral way. | ||
* Add your translations to the folder called `<languageCode>` inside the [source folder](https://github.com/huggingface/smolagents/tree/main/docs/source). | ||
* Register your translation in `<languageCode>/_toctree.yml`; please follow the order of the [English version](https://github.com/huggingface/transformers/blob/main/docs/source/en/_toctree.yml). | ||
* Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @albertvillanova for review. | ||
* 🙋 If you'd like others to help you with the translation, you can also post in the 🤗 [forums](https://discuss.huggingface.co/). | ||
|
||
## Get Started section | ||
|
||
- [ ] [index.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/index.md) https://github.com/huggingface/transformers/pull/20180 | ||
- [ ] [quicktour.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/guided_tour.md) (waiting for initial PR to go through) | ||
- [ ] [installation.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/installation.md). | ||
|
||
## Tutorial section | ||
- [ ] [building_good_agents.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/tutorials/building_good_agents.md) | ||
- [ ] [inspect_runs.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/tutorials/inspect_runs.md) | ||
- [ ] [memory.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/tutorials/memory.md) | ||
- [ ] [secure_code_execution.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/tutorials/secure_code_execution.md) | ||
- [ ] [tools.md](https://github.com/huggingface/smolagents/blob/main/docs/source/en/tutorials/tools.md) | ||
|
||
<!-- | ||
Keep on adding more as you go 🔥 | ||
--> |
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||||||||||
# Translating the Smolagents documentation into your language | ||||||||||||
|
||||||||||||
As part of our mission to democratize machine learning, we aim to make the Smolagents library available in many more languages! Follow the steps below to help translate the documentation into your language. | ||||||||||||
|
||||||||||||
## Open an Issue | ||||||||||||
|
||||||||||||
1. Navigate to the Issues page of this repository. | ||||||||||||
2. Check if anyone has already opened an issue for your language. | ||||||||||||
3. If not, create a new issue by selecting the "Translation template" from the "New issue" button. | ||||||||||||
4. Post a comment indicating which chapters you’d like to work on, and we’ll add your name to the list. | ||||||||||||
|
4. Post a comment indicating which chapters you’d like to work on, and we’ll add your name to the list. | |
4. Post a comment indicating which chapters you'd like to work on, and we'll add your name to the list. |
There are other cases in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced all non ASCII apostrophes in TRANSLATING.md
, intro_agents.md
and text_to_sql.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing unrelated section, I would recommend commenting out them: this will prevent Git merge conflicts when adding the translation of other sections in other PRs. Note that many users contributing to docs might not have the technical skills to resolve Git merge conflicts, so better avoiding them.
Maybe something like:
- If the `_toctree.yml` file doesn't exist for your language, create one by copying the English version and removing unrelated sections. | |
- Ensure it is placed in the `docs/source/LANG-ID/` directory. | |
- If the `_toctree.yml` file doesn't exist for your language, create one by copying the English version and commenting out unrelated sections (instead of deleting them) to avoid potential merge conflicts with other PRs. | |
- If the `_toctree.yml` file already exists for your language, open it and uncomment the sections that apply to the chapter you're translating. | |
- Ensure it is placed in the `docs/source/LANG-ID/` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! It will make it easier for documentation contributors
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Once you’ve translated the `_toctree.yml`, move on to translating the associated MD files. | |
2. Once you've set up and translated the `_toctree.yml`, proceed to translate the associated Markdown (`.md`) files. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about personalizing the tag. What about something more general like:
If you'd like assistance with your translation, open an issue and tag `@albertvillanova`. Feel free to share resources or glossaries to ensure consistent terminology. | |
If you'd like assistance with your translation, open an issue and tag the documentation maintainers. Feel free to share resources or glossaries to ensure consistent terminology. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied it from the transformers
repo, I think they have a dedicated documentation maintainer
https://github.com/huggingface/transformers/blob/main/docs/TRANSLATING.md#collaborate-and-share
Changed it to maintainers
in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should locate the
TRANSLATING.md
file at the root of the repo, what do you think?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the file location from the transformers repo (/docs)
One reason for them placing it in the docs folder could be that all documentation and instructions for contributing to the docs are located there. (e.g., /docs/README.md). So it is an intuitive location, but I don't have any strong opinions. I’m fine with moving it to the root of the repository if that’s what you prefer.