Missing translation strings#1690
Conversation
🦋 Changeset detectedLatest commit: b77f2da The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@thebigrick is attempting to deploy a commit to the BigCommerce Platform Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks @thebigrick! |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
|
I just fixed a typo in the |
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-latest-9eop7vixt-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
chanceaclark
left a comment
There was a problem hiding this comment.
Thanks for updating these! I know you already merged, but left some comments if you want to go back and clean some of them up.
| const t = await getTranslations('NotFound'); | ||
| const ct = await getTranslations('Components.Header.MiniCart'); |
There was a problem hiding this comment.
Would love to know if there are performance implications doing this double await for translations.
Also, I think our pattern for things like this is just throw another translation string in the NotFound namespace instead of creating a new translation getter.
|
|
||
| if (!count) { | ||
| return <ShoppingCart aria-label="cart" />; | ||
| return <ShoppingCart aria-label={t('cart')} />; |
There was a problem hiding this comment.
I know you were just updating the current strings, but going off the rules of aria we should only use aria- roles if it's absolutely necessary. We should be using the <title> element for SVGs instead:
<ShoppingCart>
<title>{t('cart')}</title>
</ShoppingCart>
What/Why?
Some of the
aria-labelattributes and a few strings were hardcoded.I added new entries to the
en.jsonfile and applied the translations in the TSX files.Testing
Strings should yet be there. And should be translatable.