Skip to content

Commit cfac0fd

Browse files
committed
build: clone the localizethedocs locales
1 parent 5a5027a commit cfac0fd

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

.readthedocs.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
# Required
66
version: 2
77

8+
# Set the OS, Python version and other tools you might need
9+
build:
10+
os: ubuntu-24.04
11+
tools:
12+
python: "3.12"
13+
jobs:
14+
post_checkout:
15+
- |
16+
PO_LOCALES=docs/locales
17+
PO_REPOURL=https://github.com/localizethedocs/highlightjs-docs-l10n.git
18+
case "$READTHEDOCS_VERSION" in
19+
latest) PO_BRANCH="po/latest";;
20+
stable) PO_BRANCH="po/stable";;
21+
esac
22+
git clone --branch=$PO_BRANCH $PO_REPOURL $PO_LOCALES
23+
824
# Build documentation in the docs/ directory with Sphinx
925
sphinx:
1026
configuration: docs/conf.py
@@ -15,6 +31,5 @@ sphinx:
1531

1632
# Optionally set the version of Python and requirements required to build your docs
1733
python:
18-
version: 3.7
1934
install:
2035
- requirements: docs/requirements.txt

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@
9191
# A list of ignored prefixes for module index sorting.
9292
#modindex_common_prefix = []
9393

94+
# -- Options for Internationalization ------------------------------------------
95+
96+
gettext_compact = False
97+
gettext_additional_targets = ['index','literal-block','raw']
9498

9599
# -- Options for HTML output ---------------------------------------------------
96100

docs/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
myst-parser == 0.15.0
2-
sphinx-rtd-theme == 0.5.2
1+
sphinx == 9.1.0
2+
myst-parser == 5.1.0
3+
sphinx-rtd-theme == 3.1.0

0 commit comments

Comments
 (0)