From 064cc3b8d29a24191023f6b2f98fdf21880e5bc9 Mon Sep 17 00:00:00 2001 From: Andrew Pearce Date: Mon, 8 Jan 2024 13:25:04 +0000 Subject: [PATCH] MLPAB-1735 - add instructions for configuring weblate cli (#952) * add instructions for configuring weblate --- .weblate | 3 ++ docs/runbooks/configuring_weblate_access.md | 43 +++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .weblate create mode 100644 docs/runbooks/configuring_weblate_access.md diff --git a/.weblate b/.weblate new file mode 100644 index 0000000000..a75208396a --- /dev/null +++ b/.weblate @@ -0,0 +1,3 @@ +; see docs/runbooks/configuring_weblate_access.md +[weblate] +translation = opg-modernising-lpa/opg-modernising-lpa diff --git a/docs/runbooks/configuring_weblate_access.md b/docs/runbooks/configuring_weblate_access.md new file mode 100644 index 0000000000..a4d67b5545 --- /dev/null +++ b/docs/runbooks/configuring_weblate_access.md @@ -0,0 +1,43 @@ +# Configuring weblate access to manage translations and merge conflicts + +These are instructions for configuring weblate access + +## Prerequisites + +install the weblate cli + +```sh +pip install wlc +``` + +there are instructions also for using the docker image here: `https://docs.weblate.org/en/weblate-5.2.1/wlc.html#docker-usage` + +## Configuring weblate access + +Put the following in your `~/.config/weblate` file: + +```ini +[weblate] +url = https://moj.weblate.cloud/api/ + +[keys] +https://moj.weblate.cloud/api/ = APIKEY +``` + +Your api key can be found in the weblate account page under `https://moj.weblate.cloud/accounts/profile/#api` + +## Managing translations + +The repository has a `.weblate` file which contains the configuration for our translations. + +That means from the repository root you can run weblate cli commands like: + +```sh +wlc ls +``` + +or + +```sh +wlc lock +```