Repository navigation
fix(coach): the consent screen and the intake questions in the app's language - #415
Open
kurktchiev wants to merge 4 commits into
Open
kurktchiev wants to merge 4 commits into
kurktchiev wants to merge 4 commits into
Conversation
This was referenced Oct 6, 2026
The consent screen lists five data categories from CATEGORY_TEXT in lib/coach.js. CoachIntake.jsx and CoachSetup.jsx passed them to t() as variables, which check-source-strings.mjs cannot see, and eight of the ten lines had no translation in any pack. Each entry is now a function of literal t() calls, and the eight lines are translated in all 16 packs, with pt-BR overrides. uk.js: the two sign-in-hold lines said ви; they say ти now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CoachIntake.jsx rendered the goal and experience choices from GOALS and
EXPERIENCE through t(label) and t(sub). check-source-strings.mjs cannot
see variables, and the eight lines under the choices ('Heavier lifts,
lower reps.' and the rest) had no translation in any pack. Each choice's
text is now a function of literal t() calls, as CATEGORY_TEXT is after
the previous commit, and the eight lines are translated in all 16 packs,
with pt-BR overrides.
CoachSetup.jsx's three progress lines were a list passed to t(s). They
are literal calls now; every pack already had them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
'e.g. “swap the squats for split squats, and Mondays are short”' is translated in every pack, and nothing in src/ asks for it: git grep finds the key in the locale packs only. The line is removed from every pack. pt-BR overrode it, so its inheritance fingerprint does not move. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The first two commits wrote the French consent rows in vous, to match «Votre plan» above them, and the intake lines without a pronoun, because fr.js mixed tu and vous on both screens. The French pack is moving to tu throughout in a separate PR, which makes the first row «Ton plan». The lines say tu now: «ton planning hebdomadaire et tes réglages de progression», «Ton entraînement enregistré», «Les séries que tu as enregistrées…», «Ce que tu dis au Coach». 'You know the movements; the numbers need rebuilding.' is «Tu connais les mouvements ; les charges sont à remonter.», and 'Keep strength while leaning out.' is «Garder ta force en t’affinant.» Only the register changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
kurktchiev
force-pushed
the
gh/consent-strings-i18n
branch
from
October 7, 2026 17:25
9c22c76 to
8671d8e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The consent screen lists five data categories, a title and a line under each, from
CATEGORY_TEXTin frontend/src/lib/coach.js. CoachIntake.jsx and CoachSetup.jsx ("What leaves this phone") rendered them witht(title)andt(sub). check-source-strings.mjs collects only literalt('…')calls, so it never saw these ten strings, and eight of them are in no locale pack. "Your plan" and "Body weight" were translated only because other screens use them. In German the list read "Dein Plan", "Körpergewicht" and eight lines of English.Each
CATEGORY_TEXTentry is now a function that returns literalt()calls. The checker sees all ten keys, and the text follows a language picked after coach.js loaded. Both screens call the function and render what it returns. A category the app has no text for still shows its key; it no longer goes throught(), which only mattered if a pack had that exact word.The eight strings are translated in all 16 packs, right after the consent paragraph ("It designs your plan…"). Each pack's register and terms come from its own consent screen and intake questions. Three choices a native speaker may want to check:
ko, zh and th say "progression settings" with each pack's own word for Progression (점진적 증가 설정, 进阶设置, การตั้งค่าการเพิ่มระดับ).
uk.js: the two sign-in-hold strings ('Waiting for your answer about this device’s workouts' and 'Nothing syncs until you say whether this device’s workouts go into your profile. Tap to answer.') said "ви" and "торкніться". They say "ти" now, and «Натисни, щоб відповісти.», like the "Not synced yet" banner that shows in the same place.
The second commit fixes the same bug on the intake questions. CoachIntake.jsx renders the goal and experience choices from
GOALSandEXPERIENCEwitht(label)andt(sub), and the eight lines under the choices ('Heavier lifts, lower reps.', 'You know the movements; the numbers need rebuilding.' and the rest) are in no pack. In German the goal screen offered "Stärker werden" over "Heavier lifts, lower reps." Each choice's text is now a function of literalt()calls, likeCATEGORY_TEXT, and the eight lines are translated in all 16 packs, right after 'Training regularly'. The lines were translated by Claude and no native speaker has checked them. Choices a native speaker may want to check:I wrote the 16 zh-TW lines during the rebase. @nauish, since you added the pack in #368, could you check them?
CoachSetup.jsx's three progress lines ('Loading the exercise catalogue…', 'Checking the endpoint…', 'Ready') also went through
t(s)over a list. Every pack has them, so the screen does not change; they are literal calls now, so the checker notices if one goes missing.Two variable calls stay on the intake: the weekday buttons (
t(DAYN[d])) and the equipment chips (t(e)). Both lists come from shared modules (lib/format.js and the exercise library) that other screens translate the same way, and every pack has all their entries.The third commit removes 'e.g. “swap the squats for split squats, and Mondays are short”' from every pack. git grep finds the key only in the locale packs, so no screen shows it. pt-BR overrode it, so the inheritance fingerprint does not move. The fourth moves the new French lines to tu, as described above.
Tests:
CATEGORY_TEXTis translated once when the module loads. The second renders the goal and experience screens in German and expects each title and line to be de.js's. It fails when a line is missing from de.js.check-source-strings.mjs --strict: 1581 strings, all in the packs. It counts 1555 on main: the first commit adds the eight consent lines, the second the eight intake lines, the eight choice titles and two of the progress lines, none of which it could see before.check-locales.mjs: 17 locales, 1994 keys each.Overlap: #352 changed the training line in the same
CATEGORY_TEXTand landed in v1.3.10. This PR uses #352's wording ("…and your session notes") and translates it in every pack. The third commit conflicts in one place in fr.js with #413, which changes the three lines above the example line this PR deletes. The resolution keeps that PR's three lines and drops the example line. Every other open PR that touches these files merges with this one as cleanly as it merges with main (checked withgit merge-tree). This branch merges cleanly with #414.🤖 Generated with Claude Code