This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/website/developer-docs/translation.md
sdimovv d0fe88063e
website/dev-docs: Updated translation website URL (#3948)
Signed-off-by: sdimovv <36302090+sdimovv@users.noreply.github.com>

Signed-off-by: sdimovv <36302090+sdimovv@users.noreply.github.com>
2022-11-06 17:36:02 +01:00

1.2 KiB

title
Translations

Translation in authentik is done in two places. Most of the text is defined in the frontend in web/, and a subset of messages is defined in the backend.

The frontend uses lingui, and the backend uses the built-in django translation tools.

:::info Please review the Writing documentation guidelines as they apply to documentation too. :::

Online translation

To simplify translation you can use https://www.transifex.com/authentik/authentik, which has no local requirements.

Local translation

Prerequisites

  • Node (any recent version should work, we use 16.x to build)
  • Make (again, any recent version should work)
  • Docker

Run npm i in the /web folder to install all dependencies.

Ensure the language code is in the package.json file in web/:

    // [...]
    "lingui": {
        // [...]
        "locales": [
            "en",
            "pseudo-LOCALE",
            "a-new-locale"
        ],
    // [...]

Afterwards, run npx lingui extract to generate a base .po file.

The .po files can be edited by any text editor, or using a tool such as POEdit.

To see the change, run npm run watch in the web/ directory.