Skip to content

Commit

Permalink
Setup for Italian translation and add quicktour.mdx translation (hugg…
Browse files Browse the repository at this point in the history
…ingface#17472)

* Setup for Italian translation and add first document

- Add 'it' folder for files translated into Italian
- Add _config.py and _toctree.yml files
- Add translation of quicktour.mdx

* Fix style issue of italian documentation files

* Add 'it' to the languages section in the .github/workflows

* Remove - installation from _toctree for Italian

* Translation for index file

- Add index to _toctree.yml
- Add translation of index.mdx

* Fix typo in docs/source/it/index.mdx

* Translate code comments in docs/source/it/_config.py

Co-authored-by: Martina Fumanelli <martinafumanelli@Martinas-MBP.homenet.telecomitalia.it>
  • Loading branch information
2 people authored and amyeroberts committed Jun 16, 2022
1 parent 3123ba8 commit 466dfe5
Show file tree
Hide file tree
Showing 6 changed files with 707 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
commit_sha: ${{ github.sha }}
package: transformers
notebook_folder: transformers_doc
languages: en es pt
languages: en es it pt
secrets:
token: ${{ secrets.HUGGINGFACE_PUSH }}
2 changes: 1 addition & 1 deletion .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
commit_sha: ${{ github.event.pull_request.head.sha }}
pr_number: ${{ github.event.number }}
package: transformers
languages: en es pt
languages: en es it pt
15 changes: 15 additions & 0 deletions docs/source/it/_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# docstyle-ignore
INSTALL_CONTENT = """
# Installazione di Transformers
! pip install transformers datasets
# Per installare dalla fonte invece dell'ultima versione rilasciata, commenta il comando sopra e
# rimuovi la modalità commento al comando seguente.
# ! pip install git+https://github.com/huggingface/transformers.git
"""

notebook_first_cells = [{"type": "code", "content": INSTALL_CONTENT}]
black_avoid_patterns = {
"{processor_class}": "FakeProcessorClass",
"{model_class}": "FakeModelClass",
"{object_class}": "FakeObjectClass",
}
6 changes: 6 additions & 0 deletions docs/source/it/_toctree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- sections:
- local: index
title: 🤗 Transformers
- local: quicktour
title: Tour rapido
title: Iniziare

0 comments on commit 466dfe5

Please sign in to comment.