openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

fix(i18n): translate contextGathering errorDesc across 8 remaining locales (#1917)

Open evanclan opened this issue 6 months ago • 1 comments

Summary

onboarding.contextGathering.errorDesc in every chunked overflow file (app/src/lib/i18n/chunks/<locale>-4.ts) is still holding the English source string verbatim while every neighbouring onboarding key in the same block is already translated. PR #2042 fixed zh-CN-4.ts; this finishes the sweep across the remaining 8 locales: ar, bn, es, fr, hi, id, pt, ru.

  • 1 key × 8 files, no logic, no new keys.
  • Same scope and risk profile as #2042.
  • Resolves the residual surface area of #1917 outside of zh-CN.

Problem

Before this PR, every non-zh-CN chunk-4 file had this identical drift:

'onboarding.contextGathering.buildingProfile': '<localized>',
'onboarding.contextGathering.continueToChat':  '<localized>',
'onboarding.contextGathering.errorDesc':
  "We couldn't build your full profile right now, but that's okay — you can continue and your profile will build over time.",
'onboarding.contextGathering.title':           '<localized>',

The string renders in the Onboarding Context Gathering failure state (see app/src/pages/onboarding/steps/ContextGatheringStep.tsx, where it's read via t('onboarding.contextGathering.errorDesc') inside the <p> body of the error card). The page goes translated → one English sentence → translated, which (per #1917, reported on zh-CN) reads as a form to fill rather than a dismissable non-blocking error. The same UX bug exists today for every other locale the app ships.

The broader sweeps in #1986 (i18n: full UI coverage across 10 languages) and #1981 swept the primary <locale>.ts maps but didn't touch the chunked overflow files where this key lives, which is how the drift survived. PR #2042 patched zh-CN only.

Solution

Replace the English source in each chunk with a faithful translation that matches the prose register of the surrounding keys and preserves the original structure ("concession — reassurance"). Em-dash is preserved where the script naturally uses one; Spanish uses the colon convention.

File Translation
ar-4.ts لم نتمكّن من بناء ملفك الشخصي بالكامل الآن، لكن لا بأس — يمكنك المتابعة وسيكتمل ملفك تدريجيًا مع مرور الوقت.
bn-4.ts আমরা এই মুহূর্তে আপনার সম্পূর্ণ প্রোফাইল তৈরি করতে পারিনি, কিন্তু সমস্যা নেই — আপনি চালিয়ে যেতে পারেন, আপনার প্রোফাইল সময়ের সাথে তৈরি হতে থাকবে।
es-4.ts No pudimos construir tu perfil completo en este momento, pero no pasa nada: puedes continuar y tu perfil se irá construyendo con el tiempo.
fr-4.ts Nous n'avons pas pu construire ton profil complet pour le moment, mais ce n'est pas grave — tu peux continuer et ton profil se construira au fil du temps.
hi-4.ts हम अभी आपकी पूरी प्रोफ़ाइल नहीं बना सके, लेकिन कोई बात नहीं — आप जारी रख सकते हैं और आपकी प्रोफ़ाइल समय के साथ बनती जाएगी।
id-4.ts Kami belum bisa membangun profil lengkap Anda sekarang, tetapi tidak apa-apa — Anda bisa melanjutkan dan profil Anda akan terbangun seiring waktu.
pt-4.ts Não conseguimos construir seu perfil completo agora, mas tudo bem — você pode continuar e seu perfil será construído com o tempo.
ru-4.ts Сейчас не удалось построить ваш полный профиль, но это нормально — вы можете продолжить, и ваш профиль будет формироваться со временем.

French uses the informal tu form to match neighbouring keys in the same chunk (e.g. 'onboarding.contextGathering.buildingProfile': 'Construction de ton profil…'). The French value switches to double-quoted because it contains apostrophes — same convention prettier picks in the existing file.

Out of scope

  • The wider i18n drift in chunk-4 files (e.g. notifications.center.emptyHint: 'Empty hint' still untranslated in ru-4.ts and hi-4.ts, openhuman.team_list_teams: 'Team list teams' still untranslated in hi-4.ts, etc.) is real but not what this PR is about — kept the surface area to exactly the key #2042 fixed, applied to the locales #2042 didn't touch.

Test plan

  • [x] Visual inspection: each modified line still parses as a valid string literal terminated by , and prettier-style single-quote convention is preserved (with the French line correctly switched to double-quotes because the body contains apostrophes).
  • [x] git diff --stat shows 8 files, +8/-8, no other surface area touched.
  • [x] No keys added or removed → TranslationMap shape unchanged; no risk to resolveEn() fallback path in I18nContext.tsx.
  • [ ] CI: lets the standard pipeline (typecheck + format) confirm.

Related

  • #2042 — zh-CN fix this PR mirrors
  • #1917 — original user-facing report
  • #1986, #1981 — earlier sweeps that left chunk-4 files behind

Made with Cursor

Summary by CodeRabbit

  • Documentation
    • Updated onboarding error message translations across 8 languages (Arabic, Bengali, Spanish, French, Hindi, Indonesian, Portuguese, and Russian) for improved localization and user experience.

Review Change Stack

evanclan avatar May 18 '26 07:05 evanclan

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 45081e36-3f91-4f22-a50d-f5c193a13b84

📥 Commits

Reviewing files that changed from the base of the PR and between 41a9a241e5a147820ebea9505616244d4a601dc3 and 449f448cb6f84b70ed41fbf8a63c455a0358e39c.

📒 Files selected for processing (7)
  • app/src/lib/i18n/chunks/ar-4.ts
  • app/src/lib/i18n/chunks/bn-4.ts
  • app/src/lib/i18n/chunks/es-4.ts
  • app/src/lib/i18n/chunks/fr-4.ts
  • app/src/lib/i18n/chunks/id-4.ts
  • app/src/lib/i18n/chunks/pt-4.ts
  • app/src/lib/i18n/chunks/ru-4.ts
✅ Files skipped from review due to trivial changes (6)
  • app/src/lib/i18n/chunks/ru-4.ts
  • app/src/lib/i18n/chunks/pt-4.ts
  • app/src/lib/i18n/chunks/bn-4.ts
  • app/src/lib/i18n/chunks/ar-4.ts
  • app/src/lib/i18n/chunks/id-4.ts
  • app/src/lib/i18n/chunks/fr-4.ts

📝 Walkthrough

Walkthrough

The onboarding.contextGathering.errorDesc translation string is updated across seven language chunks with revised messaging, maintaining consistency that the profile builds progressively over time while allowing users to continue.

Changes

Localization Update

Layer / File(s) Summary
Error description translations for seven languages
app/src/lib/i18n/chunks/ar-4.ts, app/src/lib/i18n/chunks/bn-4.ts, app/src/lib/i18n/chunks/es-4.ts, app/src/lib/i18n/chunks/fr-4.ts, app/src/lib/i18n/chunks/id-4.ts, app/src/lib/i18n/chunks/pt-4.ts, app/src/lib/i18n/chunks/ru-4.ts
The onboarding.contextGathering.errorDesc key is updated with revised translations in Arabic, Bengali, Spanish, French, Indonesian, Portuguese, and Russian, each reflecting that the full profile cannot be built immediately but will be built over time as the user continues.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • tinyhumansai/openhuman#2042: Updates the same onboarding.contextGathering.errorDesc key in the Chinese Simplified locale file (zh-CN-4.ts).

Suggested labels

working

Poem

🐰 Seven tongues now speak with grace, Of profiles building, time and space, From Arabic whispers to Russian song, The message flows, steady and strong— Patience, dear user, you'll build it right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: translating a specific i18n key across multiple locales in the remaining translation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar May 18 '26 07:05 coderabbitai[bot]