Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/i8n.md
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 🔥
-->
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ Adding a new tutorial or section is done in two steps:

Make sure to put your new file under the proper section. If you have a doubt, feel free to ask in a Github Issue or PR.

### Translating

When translating, refer to the guide at [./TRANSLATING.md](https://github.com/huggingface/smolagents/blob/main/docs/TRANSLATING.md).
Copy link
Member

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?

Copy link
Contributor Author

@suryabdev suryabdev Oct 16, 2025

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.


### Writing source documentation

Values that should be put in `code` should either be surrounded by backticks: \`like so\`. Note that argument names
Expand Down
70 changes: 70 additions & 0 deletions docs/TRANSLATING.md
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.
Copy link
Member

Choose a reason for hiding this comment

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

For consistency with the rest of the docs, I would recommend to use the ASCII character for the apostrophe through all the docs:

Suggested change
4. Post a comment indicating which chapters youd like to work on, and well 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.

Copy link
Contributor Author

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


## 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 removing unrelated sections.
- Ensure it is placed in the `docs/source/LANG-ID/` directory.
Copy link
Member

@albertvillanova albertvillanova Oct 16, 2025

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:

Suggested change
- 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.

Copy link
Contributor Author

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

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 translated the `_toctree.yml`, move on to translating the associated MD files.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
2. Once youve 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.

## Collaborate and share
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.
Copy link
Member

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:

Suggested change
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.

Copy link
Contributor Author

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