Weblate component Discovery API not Works

When I create a weblate addon (component discovery) with the REST api,

**'curl -X POST -H “Content-Type: application/json” ’ +
‘-H "Authorization: Token **********" ’ +
‘-k -d "{’ +
‘"name":"weblate.discovery.discovery",’ +
‘"configuration":{’ +
'"match":"locales/(?P^<language^>[^^/]
)/(?P^<component^>(?!TEMPLATE) ([^^/])
)\.json",’ +
‘"file_format":"i18next",’ +
‘"name_template":"{{ component }}_fr",’ +
‘"base_file_template":"locales/fr/{{component}}.json",’ +
‘"new_base_template":"locales/fr/{{component}}.json",’ +
‘"language_regex":"^[1]+$",’ +
‘"copy_addons":true,’ +
‘"remove":false,’ +
‘"confirm":true,’ +
‘"preview":true},’ +
‘"url":""’ +
‘}" http://127.0.0.1/api/components/repositoryname/__template__fr/addons/

, weblate does not automatically get the files that I push in the git repository.

To make it work, I first need to manually -1) go to the discovery addon webpage in the web browser, -2) save the addon in the web browser -3) accept the list of files that match the template in the web browser. Once this has been done one time, all the files that I push in the git repository are correctly discovered by weblate. However we would like to do the 1), 2) & 3) steps automaticaly with the REST API. I tried to set the confirm and preview fields of our CURL request to false but it does not work. Is there a way to configure the CURL request so that weblate discover the files without any manual steps?


  1. ^^. ↩︎

Not sure how this is related to XWiki.