kas-catholic / confessit-web

Source code for https://confessit.app
MIT License
18 stars 7 forks source link

Fix Broken link in Translations #40

Closed kas-catholic closed 1 year ago

kas-catholic commented 1 year ago

When we have links inside a Trans component, we refer to the nested elements in the translated string using indexes (like <1>). These indexes got thrown off when we ran prettier and it added {" "} (also a nested component) in some places.

A more robust solution avoids using indexes and instead uses named components. Our version of i18next already supports this: https://react.i18next.com/latest/trans-component#alternative-usage-which-lists-the-components-v11.6.0

netlify[bot] commented 1 year ago

Deploy Preview for confessit-web ready!

Name Link
Latest commit ca03314e2a4efd9c5cb7853ecb32439b905f84db
Latest deploy log https://app.netlify.com/sites/confessit-web/deploys/63fc0e7fa9530600073aacdd
Deploy Preview https://deploy-preview-40--confessit-web.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.