-
Notifications
You must be signed in to change notification settings - Fork 1
CORE-1455: Missing translation for "Content Warning" #2638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds missing translations for "Content Warning" text across English, Spanish, and Polish locales. The changes implement internationalization support by introducing a new translation key i18n:content-warning:heading:aria-label and updating the LoginGate and ContentWarning components to use translated text instead of hardcoded English strings.
- Added translation key
i18n:content-warning:heading:aria-labelto all three language files (en, es, pl) - Updated
createIntlfunction to support optional message overrides for testing purposes - Modified
LoginGateandContentWarningcomponents to use the internationalization API - Updated corresponding test files to accommodate the internationalization changes
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/app/messages/en/messages.json |
Added English translation "Content Warning" for the new translation key |
src/app/messages/es/messages.json |
Added Spanish translation "Advertencia de contenido" for the new translation key |
src/app/messages/pl/messages.json |
Added Polish translation "Ostrzeżenie o treści" for the new translation key |
src/app/messages/createIntl.ts |
Enhanced to accept optional newMessages parameter for test message overrides |
src/app/content/components/LoginGate.tsx |
Replaced hardcoded "Content Warning" string with internationalized version using useIntl |
src/app/content/components/ContentWarning.tsx |
Replaced hardcoded "Content warning" string with internationalized version using useIntl |
src/app/content/components/LoginGate.spec.tsx |
Updated test to mock useIntl and added IntlProvider setup |
src/app/content/components/ContentWarning.spec.tsx |
Updated tests to mock useIntl and added IntlProvider setup |
src/app/content/highlights/components/Highlights.spec.tsx |
Updated tests to use new newMessages parameter of createIntl function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "i18n:toolbar:textresizer:button:increase:aria-label": "Zwiększ rozmiar tekstu", | ||
| "i18n:toolbar:textresizer:popup:heading": "Rozmiar tekstu" | ||
| "i18n:toolbar:textresizer:popup:heading": "Rozmiar tekstu", | ||
| "i18n:content-warning:heading:aria-label": "Ostrzeżenie o treści" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This translation should probably be confirmed by our contact at Katalyst
CORE-1455