Re: [translate-pootle] Delete PO files across all languaes

2012-06-24 Thread Chris Leonard
On Sun, Jun 24, 2012 at 1:59 AM, Jason Pickering
jason.p.picker...@gmail.com wrote:
 Seems like this would be something much better handled through the
 database itself perhaps? I am not sure if I understand exactly if you
 need to delete the files, or to delete the translations in the
 database or both?

Very possibly, by my SQL skills are a little atrophied :-(

In my case (I'm not sure about Borislav's) I am moving a group of PO
files from one project to another.  I do not actually need to
physically move the files on the Pootle server, re-establishing a new
git connection in the new project takes care of picking up the
existing translations that have been committed to the repo.

What is important to me (in this case) is making the PO files go
away from the old project, so that they only appear in the new
project (after an Update from Templates.

cjl

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Delete PO files across all languaes

2012-06-24 Thread Jason Pickering
Hi Chris,

I have a bit of a similar problem, but am using Java property files.
Certain files in our project end in .properties but are not actually
language property files. I need to get rid of them, and have used the
following procedure.

Start with

django-admin.py dbshell --settings=pootle.settings

to drop into the database shell. The following is MySQL syntax, which
may differ from your database.

DELETE FROM pootle_store_unit where store_id IN ( SELECT id FROM
pootle_store_store where file LIKE %hibernate%);

followed by

DELETE  FROM pootle_store_store where file LIKE %hibernate%;

In this case, the files are called hibernate.properties and match
the pattern  %hibernate% and should never be translated. I guess if
your files follow a certain pattern, you could use this approach.

Seems to work for me, but I would be interested to hear from someone
that actually understands the pootle database a bit better than me, if
this would actually work as intended.

Obviously, make a backup of your database before attempting such hacks. :)

Regards,
Jason


On Sun, Jun 24, 2012 at 8:35 AM, Chris Leonard cjlhomeaddr...@gmail.com wrote:
 On Sun, Jun 24, 2012 at 1:59 AM, Jason Pickering
 jason.p.picker...@gmail.com wrote:
 Seems like this would be something much better handled through the
 database itself perhaps? I am not sure if I understand exactly if you
 need to delete the files, or to delete the translations in the
 database or both?

 Very possibly, by my SQL skills are a little atrophied :-(

 In my case (I'm not sure about Borislav's) I am moving a group of PO
 files from one project to another.  I do not actually need to
 physically move the files on the Pootle server, re-establishing a new
 git connection in the new project takes care of picking up the
 existing translations that have been committed to the repo.

 What is important to me (in this case) is making the PO files go
 away from the old project, so that they only appear in the new
 project (after an Update from Templates.

 cjl

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle