🌐 Filled empty context descriptions and added CI guard#27176
🌐 Filled empty context descriptions and added CI guard#27176
Conversation
Empty context descriptions provide no value to translators. This adds descriptions for all 40 keys that were missing them and adds a CI guard in generate-context.js to prevent new empty descriptions from being merged.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughA translation context generation script now detects keys with empty descriptions and, when running in CI (process.env.CI), emits an error listing the empty keys and exits with code 1; this check runs after the "context.json out of date" check and before writing 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
SonarQube S4624 flags nested template literals as hard to read.
|



Summary
context.jsonthat previously had empty stringsgenerate-context.jsthat rejects empty descriptions, preventing new untranslatable keys from being mergedCI guard
When
CI=true,generate-context.jsnow checks for empty descriptions after validating thatcontext.jsonis up to date. If any keys have empty descriptions, the script lists them and exits with a non-zero status. This runs as part ofyarn translatewhich is already called duringyarn testin the i18n package.Test plan
yarn workspace @tryghost/i18n testpassescontext.json, then runCI=true node generate-context.jsfromghost/i18n/— should fail with a list of the empty key(s)