Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 14 additions & 2 deletions docs/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ extra:
link: /pt/
lang: pt
- name: 中文(简体)
link: /zh-cn/
link: /zh_CN/
lang: zh-Hant
- name: 中文(繁體)
link: /zh-tw/
link: /zh_TW/
lang: zh-TW
social:
- icon: fontawesome/brands/github
Expand Down Expand Up @@ -146,3 +146,15 @@ plugins:
literate-nav:
nav_file: SUMMARY.md
macros: {}
redirects:
redirect_maps:
# Old
"en/latest/tutorial/tutorial-1.md": "tutorial/tutorial-1.md"
"en/latest.md": "index.md"
"de/latest.md": "https://tutorial.beeware.org/de"
"es/latest.md": "https://tutorial.beeware.org/es"
"fr/latest.md": "https://tutorial.beeware.org/fr"
"it/latest.md": "https://tutorial.beeware.org/it"
"pt/latest.md": "https://tutorial.beeware.org/pt"
"zh-cn/latest.md": "https://tutorial.beeware.org/zh_CN"
"zh-tw/latest.md": "https://tutorial.beeware.org/zh_TW"
2 changes: 1 addition & 1 deletion docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Welcome to BeeWare! In this tutorial, we're going to build a graphical user inte

/// admonition | Translations are available

If you're not comfortable with English, translations of this tutorial are available in [Deutsch](https://tutorial.beeware.org/de), [Español](https://tutorial.beeware.org/es), [Français](https://tutorial.beeware.org/fr), [Italiano](https://tutorial.beeware.org/it), [Português](https://tutorial.beeware.org/pt), [中文(简体)](https://tutorial.beeware.org/zh-cn), and [中文(繁體)](https://tutorial.beeware.org/zh-tw).
If you're not comfortable with English, translations of this tutorial are available in [Deutsch](https://tutorial.beeware.org/de), [Español](https://tutorial.beeware.org/es), [Français](https://tutorial.beeware.org/fr), [Italiano](https://tutorial.beeware.org/it), [Português](https://tutorial.beeware.org/pt), [中文(简体)](https://tutorial.beeware.org/zh_CN), and [中文(繁體)](https://tutorial.beeware.org/zh_TW).

///

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ pre-commit = [
"pre-commit == 4.5.1",
]

redirects = [
"mkdocs-redirects == 1.2.2",
]

tox-uv = [
"tox-uv == 1.29.0",
]
Expand All @@ -24,6 +28,8 @@ translate = [

docs = [
"beeware-docs-tools @ git+https://github.com/beeware/beeware-docs-tools",
# "beeware-docs-tools @ file://../beeware-docs-tools",
{include-group = "redirects"},
]

[tool.rumdl]
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ envlist = docs-lint,docs-all
[docs]
docs_dir = {tox_root}{/}docs{/}en

[testenv:docs{,-lint,-translate,-all,-live,-en,-de,-es,-fr,-it,-pt,-zh-cn,-zh-tw}]
[testenv:docs{,-translate,-lint,-en,-de,-es,-fr,-it,-pt,-zh_CN,-zh_TW,-all,-serve,-live}]
# Docs are always built on Python 3.13. See also the RTD config.
base_python = py313
skip_install = true
passenv =
DEEPL_API_KEY
dependency_groups = docs
commands:
!lint-!all-!translate-!live-!en-!de-!es-!fr-!it-!pt-!zh-cn-!zh-tw : build_md_translations {posargs} en
!translate-!lint-!en-!de-!es-!fr-!it-!pt-!zh_CN-!zh_TW-!all-!live : build_md_translations {posargs} en
translate : build_pot_translations
translate : build_po_translations de es fr it pt zh_CN zh_TW
translate : update_machine_translations --soft-fail de es fr it pt zh_CN zh_TW
Expand All @@ -24,8 +24,8 @@ commands:
fr : build_md_translations {posargs} fr
it : build_md_translations {posargs} it
pt : build_md_translations {posargs} pt
zh-cn : build_md_translations {posargs} zh_CN
zh-tw : build_md_translations {posargs} zh_TW
zh_CN : build_md_translations {posargs} zh_CN
zh_TW : build_md_translations {posargs} zh_TW
all : build_md_translations {posargs} en de es fr it pt zh_CN zh_TW
serve : python -m http.server -d _build/html 8041
live : live_serve_en {posargs} --port=8041