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 WLC_KEY is injected as a secret:

  • WLC_URL — API URL
  • WLC_KEY — API key

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

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.1.tar.gz (97.2 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.1-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wlc-2.0.1.tar.gz
Algorithm Hash digest
SHA256 da0e930dc5f90172e358a4a52064ede89d5146e66fc660145fd9522820306276
MD5 9b878638e0bb1e903152dc535180263f
BLAKE2b-256 1d3cd187ba8fd78e5aa7bd1b301ab955c5c80cefe6f66f898db7e7ec72efa6a4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: wlc-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 38.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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18c0f70f32e7ffa6075fad7437cc2a8724dc808f8614c57781774888c88eb6f5
MD5 c53b4e06030dc325fdb2fb4ed36314ce
BLAKE2b-256 db4d214741145f39560dfcfd6bd9778b5413ca1bf4e60c06e654b16ce83885b9

See more details on using hashes here.

Provenance

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