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

[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 the repository provides the project configuration and WLC_KEY is injected as a secret:

  • WLC_URL — API URL
  • WLC_KEY — API key

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

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.0.0.tar.gz (95.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.0.0-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wlc-2.0.0.tar.gz
  • Upload date:
  • Size: 95.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wlc-2.0.0.tar.gz
Algorithm Hash digest
SHA256 bd499954d3e27e8bb211d2eb9bb5a91cdd4120ed9d5fb8c273296ff22f97d826
MD5 4719b7dcf6d21e31236b855bf1b91b4c
BLAKE2b-256 1571dc7bf36c5c6470036c4b6001e09936e0b82b273512c83d148f592752ac9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wlc-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wlc-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8acd51cfd5b3e92973dbaf9923f23da148a22008e696b3307c44b0d77cfd337f
MD5 6408e2f2bf89f3887b7fd621eb43fc43
BLAKE2b-256 29956bdffae22117627e9f679bf0a251cab9da9fc4cea575e539158a41b2df92

See more details on using hashes here.

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