You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{useIntl}from'react-intl';constuseTranslation=(id: string,values?: Record<string,string|number>): string=>{const{ formatMessage }=useIntl();returnformatMessage({ id },values);};exportdefaultuseTranslation;
Cypress Version
13.6.0
Node version
v18.18.0
Operating System
Windows 11
Debug Logs
Use Cypress will show the below error, but the regular browser will show the translation normally.
Error: [@formatjs/intl Error MISSING_TRANSLATION] Missing message: "label_more_videos"for locale "en", using id as fallback.
at new MissingTranslationError (error.js:76:1)
at formatMessage (message.js:65:1)
at formatMessage (provider.js:46:18)
at useTranslation (useTranslation.ts:9:10)
at VideoCarousel (VideoCarousel.tsx:45:24)
at renderWithHooks (react-dom.development.js:16305:1)
at updateFunctionComponent (react-dom.development.js:19588:1)
at updateSimpleMemoComponent (react-dom.development.js:19425:1)
at beginWork (react-dom.development.js:21678:1)
at beginWork$1 (react-dom.development.js:27426:1)
Other
No response
The text was updated successfully, but these errors were encountered:
Current behavior
The code uses the react-intl package for text translation, but it displays the label name instead of the defined translation string.
Desired behavior
Test code to reproduce
video_text.tsx
useTranslation.ts
Cypress Version
13.6.0
Node version
v18.18.0
Operating System
Windows 11
Debug Logs
Other
No response
The text was updated successfully, but these errors were encountered: