title: Weblate component Discovery API not Works
body: <p>When I create a <code>weblate</code> addon (component discovery) with the REST <code>API</code>,</p>
  <pre><code>**'curl -X POST -H &quot;Content-Type: application/json&quot; ' +
  '-H &quot;Authorization: Token **************&quot; ' +
  '-k -d &quot;{' +
  '\\&quot;name\\&quot;:\\&quot;weblate.discovery.discovery\\&quot;,' +
  '\\&quot;configuration\\&quot;:{' +
  '\\&quot;match\\&quot;:\\&quot;locales/(?P^&lt;language^&gt;[^^/]*)/(?P^&lt;component^&gt;(?!__TEMPLATE__) ([^^/])*)\\\\.json\\&quot;,' +
  '\\&quot;file_format\\&quot;:\\&quot;i18next\\&quot;,' +
  '\\&quot;name_template\\&quot;:\\&quot;{{ component }}_fr\\&quot;,' +
  '\\&quot;base_file_template\\&quot;:\\&quot;locales/fr/{{component}}.json\\&quot;,' +
  '\\&quot;new_base_template\\&quot;:\\&quot;locales/fr/{{component}}.json\\&quot;,' +
  '\\&quot;language_regex\\&quot;:\\&quot;^^[^^.]+$\\&quot;,' +
  '\\&quot;copy_addons\\&quot;:true,' +
  '\\&quot;remove\\&quot;:false,' +
  '\\&quot;confirm\\&quot;:true,' +
  '\\&quot;preview\\&quot;:true},' +
  '\\&quot;url\\&quot;:\\&quot;\\&quot;' +
  '}&quot; http://127.0.0.1/api/components/repositoryname/__template__fr/addons/'**
  </code></pre>
  <p><code>weblate</code> does not automatically get the files that I push in the <code>git</code> repository.</p>
  <p>To make it work, I first need to manually</p>
  <ol>
  <li>go to the discovery addon webpage in the web browser,</li>
  <li>save the addon in the web browser</li>
  <li>accept the list of files that match the template in the web browser.</li>
  </ol>
  <p>Once this has been done one time, all the files that I push in the <code>git</code> repository are correctly discovered by <code>weblate</code>.</p>
  <p>However we would like to do the 1), 2) &amp; 3) steps automatically with the REST <code>API</code>.</p>
  <p>I tried to set the confirm and preview fields of our <code>CURL</code> request to false but it does not work.</p>
  <p>Is there a way to configure the <code>CURL</code> request so that <code>weblate</code> discover the files without any manual steps?</p>
  <p>Warm regards.</p>