-
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
Open
suryabdev
wants to merge
6
commits into
huggingface:main
Choose a base branch
from
suryabdev:fix-1810
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+135
−16
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f64595f
Add translation guidelines and issue template
suryabdev 585dad6
Merge branch 'main' into fix-1810
suryabdev 287106c
Change ’ to ASCII apostrophe '
suryabdev d999a6f
Change _toctree.yml copy instructions
suryabdev 69eff38
Change wording and remove Albert's name. Replace with maintainers
suryabdev b3035d8
Merge branch 'main' into fix-1810
suryabdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 the maintainers 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 🔥 | ||
--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# 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. | ||
|
||
## Fork the Repository | ||
|
||
1. First, fork the Smolagents repo by clicking the Fork button in the top-right corner. | ||
2. Clone your fork to your local machine for editing with the following command: | ||
|
||
```bash | ||
git clone https://github.com/YOUR-USERNAME/smolagents.git | ||
``` | ||
|
||
Replace `YOUR-USERNAME` with your GitHub username. | ||
|
||
## Copy-paste the English version with a new language code | ||
|
||
The documentation files are organized in the following directory: | ||
|
||
- **docs/source**: This contains all documentation materials organized by language. | ||
|
||
To copy the English version to your new language directory: | ||
|
||
1. Navigate to your fork of the repository: | ||
|
||
```bash | ||
cd ~/path/to/smolagents/docs | ||
``` | ||
|
||
Replace `~/path/to` with your actual path. | ||
|
||
2. Run the following command: | ||
|
||
```bash | ||
cp -r source/en source/LANG-ID | ||
``` | ||
|
||
Replace `LANG-ID` with the appropriate ISO 639-1 or ISO 639-2 language code (see [this table](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for reference). | ||
|
||
## Start translating | ||
|
||
Begin translating the text! | ||
|
||
1. Start with the `_toctree.yml` file that corresponds to your documentation chapter. This file is essential for rendering the table of contents on the website. | ||
|
||
- 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. | ||
|
||
Here's an example structure for the `_toctree.yml` file: | ||
|
||
```yaml | ||
- sections: | ||
- local: guided_tour # Keep this name for your .md file | ||
title: Guided tour # Translate this | ||
... | ||
title: Tutorials # Translate this | ||
``` | ||
|
||
2. Once you've set up and translated the `_toctree.yml`, proceed to translate the associated Markdown (`.md`) files. | ||
|
||
## Collaborate and share | ||
|
||
If you'd like assistance with your translation, open an issue and tag the maintainers. Feel free to share resources or glossaries to ensure consistent terminology. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.