Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

Latest commit

History

History
34 lines (25 loc) 路 832 Bytes

translations.md

File metadata and controls

34 lines (25 loc) 路 832 Bytes

Translations 馃嚚馃嚘

Translations are managed by jsLingui. At the time of writing, we are using the latest released Lingui version so the documentation provided by lingui is the best source for further information.

import { Trans } from '@lingui/react'

const SomeComponent = () => {
    return <Trans>Your text</Trans>
}

To update the locale files use:

  • yarn extract (creates new messages.json files)
  • make changes to locale/fr/messages.json
"Your text": {
    "translation": "Votre texte",
    "origin": [
      [
        "src/components/SomeComponent.js",
        22
      ]
    ]
  },
  • yarn compile

Note: CircleCI runs yarn compile --strict on all open pull requests, which will fail the build if any translations are missing