Skip to content

Back-port the 77 Spanish-only exercise descriptions to every other locale - #324

Merged
nank1ro merged 1 commit into
mainfrom
feat/backport-es-only-descriptions
Sep 17, 2026
Merged

nank1ro merged 1 commit into
mainfrom
feat/backport-es-only-descriptions

Conversation

@nank1ro

@nank1ro nank1ro commented Sep 17, 2026

Copy link
Copy Markdown
Owner

PR #167 (Chore/translate to es) did more than translate: it invented 77 # --description-- sections for exercises whose English originals have none. They exist in es and in no other locale — so eleven locales have been missing theory that Spanish learners have had for months. 34 were already live; the other 43 surfaced when #322 stopped truncating _theory.md.

The gap is visible in curriculum.json. trainUntil counts the exercises in an argument that have a description (json_creator.dart:134), and it reads 41 for es/python/conditionalStatements against 6 for every other locale.

argument exercises described before described now
python/conditionalStatements 43 6 (es: 41) 41
c/conditionalStatements 42 6 (es: 25) 25
javascript/conditionalStatements 45 8 (es: 24) 24
javascript/comparisonLogicalOperators 23 9 (es: 15) 15
swift/enumerations 9 4 (es: 5) 5

What was done

The Spanish text was used as the source of intent, not as a string to translate. Each description was written against the exercise it belongs to, then translated outward into the ten remaining locales. es keeps its own wording.

Every technical claim was checked. Two things that came out of that:

  • Python does not require parentheses around an if condition. These exercises happen to write if (True):, and a first draft turned that into "the parenthesized condition" — the same false claim that already shipped once in Spanish and had to be corrected in Stop truncating theory pages at the first exercise without a description #322. Entries 18, 35 and 41 now say the parentheses are optional grouping.
  • es/swift/enumerations/5.md was a byte-identical duplicate of es/swift/enumerations/4.md, so that CaseIterable paragraph printed twice in a row on the Spanish theory page. It now carries the forEach material that exercise 5 actually teaches. This is the only es file touched.

Descriptions are concatenated into _theory.md, where no exercise is present to refer to, so none of them restate the task ("fill in the blanks", "this time…"). Where an exercise is a pure repetition drill, the description states something true instead — the six comparisonLogicalOperators re-drills now cover == vs === coercion, lexicographic string comparison, and NaN comparing false against everything.

Diff shape

  • 848 exercise files — 847 insert-only, plus the one es replacement (−10).
  • 56 _theory.md files, +3709 / −10 — mirrors the exercise delta exactly.
  • curriculum.json, +55/−55 — 11 locales × 5 arguments, each trainUntil moving to the value es already had. es itself is unchanged.

Checks

  • All 12 locales now report identical trainUntil/totalExercises for the five arguments: (41,43) (25,42) (24,45) (15,23) (5,9).
  • Cross-locale check over all 847 files: exactly one --description-- each, same fence count as English, fenced code byte-identical to English. One intended exception — the prose comment // runs when condition is true in c/conditionalStatements/7.md is translated per locale, matching how sibling descriptions already handle comments.
  • validator: +275436: All tests passed!

Noticed, not fixed here

pt/javascript/conditionalStatements and pt/python/conditionalStatements store their older descriptions without diacritics ("A tomada de decisao e necessaria"), unlike the rest of pt. The new text is properly accented; the pre-existing paragraphs on those two theory pages are not.

@nank1ro
nank1ro merged commit 0dde1f5 into main Sep 17, 2026
4 checks passed
@nank1ro
nank1ro deleted the feat/backport-es-only-descriptions branch September 17, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant