Why are my translation imports taking so long to be approved?
- Keywords:
- import approve
The import approval is done by an auto-approval script that tries to match the uploaded files to the right template and (in the case of po files) language. If it can do so, your uploads are approved rather quickly. Otherwise they have to be approved manually by the admins.
If you are uploading a single pot file to a specific template or a single po file to a specific template and language, you are giving all the information at upload time and the auto-approval can approve it straight away. If you are uploading a tarball to the product series or a template, the script has to be able to deduct this information from the file names and paths. It gets more complicated if there is more than one template in a product series to choose from. So the naming of the files in the tarball is crucial.
The script does not split file names but it looks at their path. A po file is matched with a pot file that is in the same subdirectory. The path name is stored with the template, so subsequent uploads have this information and can match their path to that of the template in the database. The po files themselves should just be named according to the language code (e.g. de.po, es.po). So a good directory structure in the tarball is this:
templname/
templname/de.po
templname/es.po
If you have another template, make another directory for this template:
othertempl/
othertempl/de.po
othertempl/es.po
Upload a tarball of this structure on your first translation upload and only the templates need to be manually approved by an admin, the po files will go in automatically. Subsequent uploads of the same structure (with or without the template) will always be approved automatically and rather quickly.
If you have already uploaded without using this structure, you need to update the path for the pot file that is stored with the template in Launchpad. You do this by uploading a tarball that contains the pot file (and possible po files) in the correct directory, as described above, directly to the template. After that, you can just put all files into one tarball (structure as above) and upload that directly to the series.