Skip to content

Commit efc5701

Browse files
authored
Merge branch 'main' into ci/autoupdate-translation-stats
2 parents 15fb9bc + a749788 commit efc5701

File tree

5 files changed

+33
-1
lines changed

5 files changed

+33
-1
lines changed

TRANSLATING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ This guide will help you get started contributing to the translation of the Pyth
88

99
The process of contributing to the translation of the guide is similar to the process of contributing to the guide itself, except that instead of working on the guide source files directly, you will be working on the translation files.
1010

11+
# Translation Status
12+
13+
```{translation-graph}
14+
```
15+
1116
## Overview of the Translation Process
1217

1318
The process of adapting software to different languages is called internationalization, or i18n for short. Internationalization makes sure that translation can happen without having to modify the source code, or in our case, the original English source files of the guide.

_ext/translation_graph.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ def run(self):
127127
)
128128
return [nodes.raw("", div, format="html")]
129129

130-
131130
def calculate_translation_percentage(po_path : Path, locale : str) -> ModuleStats:
132131
"""
133132
Calculate the translation percentage for a given .po file.

_static/pyos.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,31 @@ th {
419419
padding: 8px; /* Add some padding for better readability */
420420
}
421421

422+
/* -------------- */
423+
/* Plotly Heatmap */
424+
/* -------------- */
425+
426+
.plotly svg {
427+
g:not(.heatmap-label) > text {
428+
fill: var(--pst-color-text-base) !important;
429+
}
430+
431+
@media (max-width: 540px) {
432+
g.heatmap-label > text {
433+
display: none;
434+
}
435+
}
436+
}
437+
422438
/* ----------------- */
423439
/* Language Selector */
424440
/* ----------------- */
441+
442+
/* Hide the left-side column for pages marked as orphan */
443+
.orphan .bd-sidebar {
444+
display: none !important;
445+
}
446+
447+
.orphan .bd-main {
448+
margin-left: 0 !important;
449+
}

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"sphinxext.opengraph",
8484
"sphinx_favicon",
8585
"sphinxcontrib.bibtex",
86+
"_ext.translation_graph",
8687
]
8788

8889
# colon fence for card support in md

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ dependencies = [
2222
"sphinx-inline-tabs",
2323
# for project cards
2424
"matplotlib",
25+
# for translation graphs
26+
"plotly",
2527
# for license page bibliography
2628
"sphinxcontrib-bibtex",
2729
]

0 commit comments

Comments
 (0)