weblate
当我使用 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\\":\\"^^[^^.]+$\\",' +
'\\"copy_addons\\":true,' +
'\\"remove\\":false,' +
'\\"confirm\\":true,' +
'\\"preview\\":true},' +
'\\"url\\":\\"\\"' +
'}" http://127.0.0.1/api/components/repositoryname/__template__fr/addons/'**
weblate
不会自动获取我推git
送到存储库中的文件。
为了使它工作,我首先需要手动
- 转到网络浏览器中的发现插件网页,
- 将插件保存在网络浏览器中
- 接受与 Web 浏览器中的模板匹配的文件列表。
一旦完成了一次,我推git
送到存储库中的所有文件都会被weblate
.
但是,我们希望使用 REST 自动执行 1)、2) 和 3) 步骤API
。
我尝试将我们CURL
请求的确认和预览字段设置为 false,但它不起作用。
有没有办法配置CURL
请求,以便weblate
在没有任何手动步骤的情况下发现文件?
温暖的问候。