How to recognize and delete a pot file

Asked by Pietro Battiston

I have a pair of pot files-related questions. A project of mine (https://launchpad.net/gueic) has a quite difficult story about translation, because in the beginning it wasn't absolutely clear to me that it is better to upload po/pot files in a tar WITHOUT any directory hierarchy.

So I now have 3 templates (see https://translations.launchpad.net/gueic) I don't know how to handle. The third, "guiec-alarm" (https://translations.launchpad.net/gueic/trunk/+pots/guiec-alarm) is just a typo and obviously has to be deleted (but looking into another question I deduced an admin is needed... quite strange!). The first, "gueic" and the second, "gueic-alarm", would be OK, but I need only one!

I would say that "gueic-alarm" (both for the longer name and because it has less strings translated) is the one to delete, BUT the most important thing (since, in case, I still can reupload already translated .po files) is to delete the ones that has a "non-trivial" directories hierarchy*... and unfortunately I have no idea of how to detect which one it is.

* because I don't want to bother no more waiting for pot files to be reviewed, and somebody told me directories can mess up automatic approval.

Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Jeroen T. Vermeulen
Solved:
Last query:
Last reply:
Revision history for this message
Jeroen T. Vermeulen (jtv) said :
#1

To "delete" (or actually, deactivate and hide from view) a template, go to its overview page, e.g. https://translations.launchpad.net/gueic/trunk/+pots/guiec-alarm

There, select Administer from the actions menu. That will take you to a page where you can edit the options for that template. If you uncheck the "Accept translations" box and submit (using the "Change" button at the bottom), the template will be effectively removed.

I wouldn't worry too much about directories. A directory structure can mess up automatic approval, but only if you structure it in a strange way. Directory hierarchies that confuse auto-approval will probably also confuse gettext.

Some examples of _good_ directory structures:

po/messages.pot
po/ar.po
po/de.po
po/fr.po

translations/gueic.pot
translations/ar.po
translations/de.po
translations/fr.po

For projects with multiple templates:

translations/main/main.pot
translations/main/ar.po
translations/main/de.po
translations/main/fr.po
translations/help/help.pot
translations/help/ar.po
translations/help/de.po
translations/help/fr.po

And so on. You can see that these are clear and easy to manage. If you start moving translations into different directories than their templates, or put the language code in a directory name instead of in the translation file name, things may get confused. Even then, the auto-approver does recognize some other structures. You can also edit a template's path on its Administer page, or just upload a new version with the same filename but placed in a different directory. (That may require manual approval for the first upload, but I can't say for sure off the top of my head).

Revision history for this message
Jeroen T. Vermeulen (jtv) said :
#2

Oops, it seems that the Administer page is accessible to administrators only. What changes would you still like made, given the rest of what I wrote?

Revision history for this message
Pietro Battiston (toobaz) said :
#3

1) please remove https://translations.launchpad.net/gueic/trunk/+pots/guiec-alarm
2) if the directory structure of https://translations.launchpad.net/gueic/trunk/+pots/gueic (which probably is just: "messages.pot", "po/it.po") allows automatic updates, please remove https://translations.launchpad.net/gueic/trunk/+pots/gueic-alarm. If it doesn't and the second does, please remove the first.

Thank you very much for your help.

Speaking of: I think that, a part from uploading translation files the first time, every other permission should be given to a project admin on HIS project files. In other words, may I suggest that "administer page is accessible to administrators only" is a bug?

Revision history for this message
Best Jeroen T. Vermeulen (jtv) said :
#4

Okay, I've disabled guiec-alarm. Both had similar directory structures, actually, and both were suitable for auto-approval.

You can see this for yourself by exporting the full translations for the template (or even the entire release series) and browsing the directory structure of the tarball you receive.

Revision history for this message
Pietro Battiston (toobaz) said :
#5

Thank you very much. Auto-approval didn't happen probably because I didn't use the same directory structure when reuploading, but since now I know how to check actual structure, I shouldn't have no more problems.

Revision history for this message
Pietro Battiston (toobaz) said :
#6

Thanks Jeroen T. Vermeulen, that solved my question.