Commit 94a400d
Fix Spanish content leaking onto English chapters/directory pages (#573)
* Fix Spanish content leaking onto English chapters/directory pages
The missing_translations.R script was generating _index.en.md from the
alphabetically-first _index.es.md source, then Hugo preferred that
explicit-lang file over _index.md and rendered the Spanish title and body
at /chapters/ and /directory/. Detect file languages by .LANG.md suffix
(treating unsuffixed files as defaultContentLanguage), pick the
default-lang file as the source, and exit early when only one language
is configured.
Production has only English enabled, so drop the R/renv setup and the
translation step from build-production, check-build, and lighthouse
workflows entirely. Update the i18n-check PR comment to no longer
reference the now-removed build-time script.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Conditionally run translation step based on active language count
Restore the R/renv setup and translation step in production build
workflows, but gate them on a yq-based check that compares
disableLanguages against the total number of languages defined in
_default/languages.yaml. When fewer than two languages are active for
the target environment, the R steps are skipped.
The translation script also accepts an env argument (e.g. "production")
and filters site_lang against that environment's disableLanguages, so it
self-skips when invoked in a single-language environment.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Rename default _index.md files to _index.en.md
Make every section's default content language explicit by suffixing all
section index files with .en. This eliminates the ambiguity that let
the buggy translation script (when it generated _index.en.md from
Spanish source) silently take precedence over an unsuffixed _index.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 76e143d commit 94a400d
14 files changed
Lines changed: 123 additions & 50 deletions
File tree
- .github/workflows
- content
- about-us/press
- blog
- chapters
- directory
- events
- form
- news
- programs
- mentoring
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
| 47 | + | |
34 | 48 | | |
35 | 49 | | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
| 53 | + | |
39 | 54 | | |
40 | 55 | | |
41 | 56 | | |
42 | 57 | | |
43 | 58 | | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
47 | | - | |
48 | | - | |
| 63 | + | |
| 64 | + | |
49 | 65 | | |
50 | 66 | | |
51 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
30 | 43 | | |
| 44 | + | |
31 | 45 | | |
32 | 46 | | |
33 | 47 | | |
34 | 48 | | |
35 | 49 | | |
| 50 | + | |
36 | 51 | | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
| 56 | + | |
41 | 57 | | |
42 | 58 | | |
43 | 59 | | |
44 | | - | |
45 | | - | |
| 60 | + | |
| 61 | + | |
46 | 62 | | |
47 | 63 | | |
48 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
| 178 | + | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
30 | 43 | | |
| 44 | + | |
31 | 45 | | |
32 | 46 | | |
33 | 47 | | |
34 | 48 | | |
35 | 49 | | |
| 50 | + | |
36 | 51 | | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
| 56 | + | |
41 | 57 | | |
42 | 58 | | |
43 | 59 | | |
44 | | - | |
| 60 | + | |
| 61 | + | |
45 | 62 | | |
46 | 63 | | |
47 | 64 | | |
| |||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments