Skip to main content

A command-line utility for Weblate, translation tool with tight version control integration

Project description

Weblate

Weblate is libre software web-based continuous localization system, used by over 2500 libre projects and companies in more than 165 countries.

wlc

wlc is a Weblate command-line client using Weblate's REST API.

Website Translation status CII Best Practices PyPI package Documentation

PIP Installation

Install using pip:

pip3 install wlc

Sources are available at https://github.com/WeblateOrg/wlc.

Usage

Please see Weblate documentation for more complete documentation.

Command-line usage:

wlc list-projects
wlc list-components
wlc list-translations
wlc list-languages
wlc show
wlc ls
wlc commit
wlc push
wlc pull
wlc repo
wlc stats
wlc lock
wlc unlock
wlc lock-status
wlc download
wlc upload

Configuration is loaded from --config when provided. Otherwise wlc reads the user configuration from XDG paths such as ~/.config/weblate and then the nearest project configuration file (.weblate, .weblate.ini, or weblate.ini) from the current directory or its parents. The key/values (retries, timeout, allowed_methods, backoff_factor, status_forcelist) are closely coupled with the urllib3 parameters and allows the user to configure request parameters.

[weblate]
url = https://hosted.weblate.org/api/
retries = 3
allowed_methods = PUT,POST,GET
backoff_factor = 0.2
status_forcelist = 429,500,502,503,504
timeout = 30
allow_insecure_http = false

[keys]
https://hosted.weblate.org/api/ = APIKEY

Environment variables

The API URL and key can also be configured using environment variables. This is especially useful for CI workflows where WLC_KEY is injected as a secret:

  • WLC_URL — API URL
  • WLC_KEY — API key
  • WLC_ALLOW_INSECURE_HTTP — set to 1, true, yes, or on to allow API keys over non-local HTTP URLs

When the API URL comes from automatically discovered project configuration (.weblate, .weblate.ini, or weblate.ini in the current directory or a parent directory), unscoped secrets must pin the destination explicitly: WLC_KEY requires WLC_URL, and --key requires --url. URL-scoped keys in the [keys] section continue to work with project configuration.

The configuration precedence (highest to lowest) is:

  1. Command-line arguments (--url, --key)
  2. Environment variables (WLC_URL, WLC_KEY)
  3. Configuration loaded from --config, or from XDG/user config plus the nearest project config when --config is not used

API keys are rejected over non-local http:// URLs by default. Use HTTPS, a loopback HTTP URL for local development, or explicitly opt in with --allow-insecure-http, WLC_ALLOW_INSECURE_HTTP, or allow_insecure_http. Automatically discovered project configuration cannot enable allow_insecure_http; set it in user configuration or pass an explicit --config file instead.

Docker image

The image is published on Docker Hub.

Building locally:

docker build -t weblate/wlc .

Detailed documentation is available in Weblate documentation.

Docker hub tags

You can use following tags on Docker hub:

Tag name Description Use case
latest wlc stable release, matches latest tagged release Rolling updates in a production environment
edge wlc development Staging environment
version wlc stable release, see weblate/wlc Well defined deploy in a production environment

Every image is tested by our CI before it gets published, so even the bleeding version should be quite safe to use.

Contributing

Contributions are welcome! See documentation for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wlc-2.1.1.tar.gz (101.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wlc-2.1.1-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

Details for the file wlc-2.1.1.tar.gz.

File metadata

  • Download URL: wlc-2.1.1.tar.gz
  • Upload date:
  • Size: 101.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for wlc-2.1.1.tar.gz
Algorithm Hash digest
SHA256 cf4220f92b89e577599036f7239017ce25458cc00c088972daf71046ac7adacc
MD5 50d7c6615e3d3d0126a238c4c73f8b12
BLAKE2b-256 9e1f6cb698ae2323260f3960e79e510b0af54a475ea39fc42e79bc3d8294099d

See more details on using hashes here.

Provenance

The following attestation bundles were made for wlc-2.1.1.tar.gz:

Publisher: setup.yml on WeblateOrg/wlc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wlc-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: wlc-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 40.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for wlc-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1577ae4b76bbf384675e320cbeb25ea018aceb3a7f8e1f3647001f7f7b88c5b9
MD5 d8e6f820cfb3201e3fd4cdc9a68c4153
BLAKE2b-256 22524548f4e5ba0ec1c638231340959f6b54ff008a417b81a5fe3940201316a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for wlc-2.1.1-py3-none-any.whl:

Publisher: setup.yml on WeblateOrg/wlc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page