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.0.tar.gz (101.0 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.0-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wlc-2.1.0.tar.gz
Algorithm Hash digest
SHA256 6a58c22ad56b5721c2cfa8dde97b416e18b5c66db4ee5736e4353ed5ba89628b
MD5 a4c3073a42c32274840f439622ce97a3
BLAKE2b-256 63eaf0f8fd8702f5101938beba694dd99f043fb8c8ea8a7e8f78bf89cfa6d114

See more details on using hashes here.

Provenance

The following attestation bundles were made for wlc-2.1.0.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.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for wlc-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0f9d94e74d5211857413ed4ab2b0a32547ed03816733716070fab591e75ceba
MD5 107f93fc8f133af34ed6187e6fd36a97
BLAKE2b-256 652a8ce2505fa119740fa971421cf1137fd9be8c01255b955b0bbaac4ee8d7d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for wlc-2.1.0-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