Hi,

I'm trying to make a script to automatically update all languages from a
new template in pootle. I have something working now, but I'm not sure
it is the right way to do it, so I wanted to ask here.

I'm using Pootle==2.5.1.1 with mysql and the project I'm interested in
now is on git. The PODIRECTORY is <something>/translations/ and the
VCS_DIRECTORY is <something>/repos-po/.

The thing is, when I update the template on the git repo and do a "git
pull" in "repos-po/<project>", the repo is updated just fine. But when I
run, either from the web interface or command line, the "update from
templates" thing, nothing happens. No string is added (and, of course,
there are new strings to translate).

Also, as this is the VCS dir (but keep in mind that only the template
has been updated) I tried to update from VCS. But this seems to read the
language from the PO files for that lang and, thus, doesn't help in my case.

The only way I found to make the update_from_templates() work is
updating the template in the PODIRECTORY. Just doing a cp of the new
*.pot files to the PODIRECTORY in the templates dir. But I'm not sure if
this is the way it is supposed to work or if I'm missing something (I
read the management commands doc, but I can totally be missing something
:-D).

How should I update the templates from a script ? If I should update the
template in the PODIRECTORY, should I run something like: "sync_stores;
cp <new pot> <project templates in PODIRECTORY>; update_stores;
update_against_templates; refresh_stats" ? Or how, exactly ?

In my testing I tried just doing: "cp <new pot> <project templates>;
update_against_templates; refresh_stats" and it worked fine. But not
sure if the sync_stores before copying the new pot files is needed.

Also, update_from_templates() seems to try to push sometimes to origin.
Do you know under which circumstances it does it ?




Thanks a lot,
Rodrigo

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to