Skip to content

Commit

Permalink
MLPAB-1735 - add instructions for configuring weblate cli (#952)
Browse files Browse the repository at this point in the history
* add instructions for configuring weblate
  • Loading branch information
andrewpearce-digital authored Jan 8, 2024
1 parent 9a0289c commit 064cc3b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .weblate
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
; see docs/runbooks/configuring_weblate_access.md
[weblate]
translation = opg-modernising-lpa/opg-modernising-lpa
43 changes: 43 additions & 0 deletions docs/runbooks/configuring_weblate_access.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 064cc3b

Please sign in to comment.