wlc - Weblate Client Documentation
Contents
Copyright
2012 - 2016, Michal Čihař 2024 , Sérgio de Almeida Cipriano Júnior
2.8 Jul 11, 2016 WLC(1)
Description
Weblate Client is Python library and command line utility to manage Weblate remotely using api. The
command line utility can be invoked as wlc and is build on wlc.
Globaloptions
The program accepts following global options, which must be entered before subcommand.
--format{csv,json,text,html}
Specify output format.
--urlURL
Specify API URL. Overrides value from configuration file, see Files. The URL should end with
/api/, for example https://hosted.weblate.org/api/.
--keyKEY
Specify API user key to use. Overrides value from configuration file, see Files. You can figure
out your key in your profile in Weblate.
--configPATH
Override path to configuration file, see Files.
--config-sectionSECTION
Override section to use in configuration file, see Files.
Subcommands
Currently following subcommands are available:
version
Prints current version.
list-languages
List used languages in Weblate.
list-projects
List projects in Weblate.
list-components
List components in Weblate.
list-translations
List translations in Weblate.
show Shows Weblate object (translation, component or project).
ls Lists Weblate object (translation, component or project).
commit Commits changes in Weblate object (translation, component or project).
pull Pulls remote repository changes into Weblate object (translation, component or project).
push Pusches changes in Weblate object into remote repository (translation, component or project).
repo Displays repository status for given Weblate object (translation, component or project).
statistics
Displays detailed statistics for given Weblate object (translation or component).
lock-status
New in version 0.5: Supported since wlc 0.5.
Displays lock status.
lock New in version 0.5: Supported since wlc 0.5.
Locks component from translating in Weblate.
unlock New in version 0.5: Supported since wlc 0.5.
Unlocks component from translating in Weblate.
Examples
Print current program version:
$ wlc version
version: 0.1
Listallprojects:$wlclist-projectsname:Helloslug:hellosource_language:enurl:http://example.com/api/projects/hello/web:http://weblate.org/web_url:http://example.com/projects/hello/
You can also let wlc know current project and it will then operate on it:
$ cat .weblate
[weblate]
url = https://hosted.weblate.org/api/
translation = weblate/master
$ wlc show
branch: master
file_format: po
filemask: weblate/locale/*/LC_MESSAGES/django.po
git_export: git://git.weblate.org/weblate.git
license: GPL-3.0+
license_url: https://spdx.org/licenses/GPL-3.0+
name: master
new_base: weblate/locale/django.pot
project: weblate
repo: git://github.com/nijel/weblate.git
slug: master
template:
url: https://hosted.weblate.org/api/components/weblate/master/
vcs: git
web_url: https://hosted.weblate.org/projects/weblate/master/
Withsuchsetupitiseasytocommitpendingchangesincurrentproject:$wlccommitFiles
.weblate
Per project configuration file
~/.config/weblate
User configuration file
/etc/xdg/weblate
Global configuration file
The program follows XDG specification, so you can adjust placement of config files by environment
variables XDG_CONFIG_HOME or XDG_CONFIG_DIRS.
Following settings can be configured in the [weblate] section (you can customize this by
--config-section):
key API KEY to access Weblate.
url API server URL, defaults to http://127.0.0.1:8000/api/.
translation
Path of default translation, component or project.
The configuration file is INI file, for example:
[weblate]
url = https://hosted.weblate.org/api/
key = APIKEY
translation = weblate/master
AdditionallyAPIkeyscanbestoredinthe[keys]section:[keys]https://hosted.weblate.org/api/=APIKEYThisallowsyoutostorekeysinyourpersonalsettings,whilehaving.weblateconfigurationintheVCSrepositorysothatwlcknowstowhichserveritshouldtalk.Name
wlc - Weblate Client Documentation
New in version 2.7: The wlc utility is fully supported since Weblate 2.7. If you are using older version
some incompatibilities with API might occur.
Synopsis
wlc [parameter] <command> [options]
Commandsactuallyindicatewhichoperationshouldbeperformed.