Re: [translate-pootle] transfer .po files

2011-12-15 Thread Mason Leung
We use git for code, the instruction on
http://translate.sourceforge.net/wiki/pootle/version_control uses svn, and
we don't have that install.  Is there a way to pull this using git?

On Wed, Dec 14, 2011 at 9:47 PM, Chris Leonard cjlhomeaddr...@gmail.comwrote:

 See

 http://translate.sourceforge.net/wiki/pootle/version_control

 On Wed, Dec 14, 2011 at 5:18 PM, Mason Leung rhymeje...@gmail.com wrote:
  Hi,
 
  I have some questions on pootle.  Is there a way to automatically upload
  .po files for translation?  The only way I know for uploading a file is
 
  1) login as admin
  2) pick a project from the home page
  3) pick a locale
  4) upload a .po in the overview tab
 
  For getting the translated .po file, I would go to the 'review' tab,
  download them and put it back onto the server
 
  It would be nice if there is a way to automate this upload and download.
 Is
  this possible?
 
  Thanks,
  Mason
 
 --
  Cloud Computing - Latest Buzzword or a Glimpse of the Future?
  This paper surveys cloud computing today: What are the benefits?
  Why are businesses embracing it? What are its payoffs and pitfalls?
  http://www.accelacomm.com/jaw/sdnl/114/51425149/
  ___
  Translate-pootle mailing list
  Translate-pootle@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/translate-pootle

--
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] transfer .po files

2011-12-15 Thread Mason Leung
Installed svn and checkout the .po files, added a new project in
/pootle/po/my project name.  I use pybabel to extract and init the .po
files and those don't have translation.  I can't really tie the 2 together
conceptually.

1) say I have new translation in the .po files, how do I merge it into
pootle?  The only way I see it is, there is a translate tab to upload
file and probably merge the file and turn conflicts into suggestions.  Is
that the way to do it?  It looks really manual.

2) the parts that talks about version control, does that mean there is a
git repository that I can put the .po file?

Thanks
Mason

On Thu, Dec 15, 2011 at 11:26 AM, Mason Leung rhymeje...@gmail.com wrote:

 We use git for code, the instruction on
 http://translate.sourceforge.net/wiki/pootle/version_control uses svn,
 and we don't have that install.  Is there a way to pull this using git?


 On Wed, Dec 14, 2011 at 9:47 PM, Chris Leonard 
 cjlhomeaddr...@gmail.comwrote:

 See

 http://translate.sourceforge.net/wiki/pootle/version_control

 On Wed, Dec 14, 2011 at 5:18 PM, Mason Leung rhymeje...@gmail.com
 wrote:
  Hi,
 
  I have some questions on pootle.  Is there a way to automatically upload
  .po files for translation?  The only way I know for uploading a file is
 
  1) login as admin
  2) pick a project from the home page
  3) pick a locale
  4) upload a .po in the overview tab
 
  For getting the translated .po file, I would go to the 'review' tab,
  download them and put it back onto the server
 
  It would be nice if there is a way to automate this upload and
 download. Is
  this possible?
 
  Thanks,
  Mason
 
 --
  Cloud Computing - Latest Buzzword or a Glimpse of the Future?
  This paper surveys cloud computing today: What are the benefits?
  Why are businesses embracing it? What are its payoffs and pitfalls?
  http://www.accelacomm.com/jaw/sdnl/114/51425149/
  ___
  Translate-pootle mailing list
  Translate-pootle@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/translate-pootle



--
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] transfer .po files

2011-12-15 Thread Chris Leonard
On Thu, Dec 15, 2011 at 2:26 PM, Mason Leung rhymeje...@gmail.com wrote:
 We use git for code, the instruction on
 http://translate.sourceforge.net/wiki/pootle/version_control uses svn, and
 we don't have that install.  Is there a way to pull this using git?

Absolutely, Sugar Labs (and at least a few other Pootle users) employ
a git as backend.  Our is technically Gitorious, I think, but it is
close enough.

We employ some fairly simple scripts run as cron jobs that do things
like check the git repo for updated strings and pulls new string that
have been entered, we have another one that generate language packs
nightly for testing, etc. etc.

Maybe looking at those will give you a few ideas.

http://git.sugarlabs.org/pootle-helpers

I'm nott really a git guru, but one of my colleqageus wrote up this
documetnation on how we maintain the interactions between our Pootle
instance and our git repo.  Agian, maybe it will give you some ideas.

If you still have questions after reading that stuff, I may or may not
be able to answer them myself, but perhaps someone else on this list
can, or I can try to pass it along to my git guru, who is a busy guy
and currently bouncing around Peru from village to village as part of
an effort we are collaborating on.

I hope this is helpful, I am sure you can get where you want with a
git back-end.

cjl
Sugar Labs Translation Team Coordinator
http://translate.sugarlabs.org/

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] transfer .po files

2011-12-15 Thread Chris Leonard
Sorry, meant to include this wiki page, which might give you some
ideas of how we do things (no guarantee it is best practices, but
it works for us.

http://wiki.sugarlabs.org/go/Service/translate

cjl

On Thu, Dec 15, 2011 at 7:12 PM, Chris Leonard cjlhomeaddr...@gmail.com wrote:
 On Thu, Dec 15, 2011 at 2:26 PM, Mason Leung rhymeje...@gmail.com wrote:
 We use git for code, the instruction on
 http://translate.sourceforge.net/wiki/pootle/version_control uses svn, and
 we don't have that install.  Is there a way to pull this using git?

 Absolutely, Sugar Labs (and at least a few other Pootle users) employ
 a git as backend.  Our is technically Gitorious, I think, but it is
 close enough.

 We employ some fairly simple scripts run as cron jobs that do things
 like check the git repo for updated strings and pulls new string that
 have been entered, we have another one that generate language packs
 nightly for testing, etc. etc.

 Maybe looking at those will give you a few ideas.

 http://git.sugarlabs.org/pootle-helpers

 I'm nott really a git guru, but one of my colleqageus wrote up this
 documetnation on how we maintain the interactions between our Pootle
 instance and our git repo.  Agian, maybe it will give you some ideas.

 If you still have questions after reading that stuff, I may or may not
 be able to answer them myself, but perhaps someone else on this list
 can, or I can try to pass it along to my git guru, who is a busy guy
 and currently bouncing around Peru from village to village as part of
 an effort we are collaborating on.

 I hope this is helpful, I am sure you can get where you want with a
 git back-end.

 cjl
 Sugar Labs Translation Team Coordinator
 http://translate.sugarlabs.org/

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] transfer .po files

2011-12-15 Thread Mason Leung
Hi Chris,

Thank you very much for the info.  I read through the sugarlabs pages and
want to see if this setup makes sense

1) there is a git repo that store all the translated .po files
2) pootle holds it owns set of .po files locally
3) translators update the .po files, a cron can merge those files back into
git
4) a cron do pull from git and generated the .mo files for pages to use
5) a cron extracts and create new .po files from pages and does a merge
with the existing .po files on pootle
Repeat step 3 to 5 nightly.

I got these steps based on reading the helper files, does it look similar
to what you guys do in sugarlabs?

Thanks,
Mason


On Thu, Dec 15, 2011 at 4:14 PM, Chris Leonard cjlhomeaddr...@gmail.comwrote:

 Sorry, meant to include this wiki page, which might give you some
 ideas of how we do things (no guarantee it is best practices, but
 it works for us.

 http://wiki.sugarlabs.org/go/Service/translate

 cjl

 On Thu, Dec 15, 2011 at 7:12 PM, Chris Leonard cjlhomeaddr...@gmail.com
 wrote:
  On Thu, Dec 15, 2011 at 2:26 PM, Mason Leung rhymeje...@gmail.com
 wrote:
  We use git for code, the instruction on
  http://translate.sourceforge.net/wiki/pootle/version_control uses svn,
 and
  we don't have that install.  Is there a way to pull this using git?
 
  Absolutely, Sugar Labs (and at least a few other Pootle users) employ
  a git as backend.  Our is technically Gitorious, I think, but it is
  close enough.
 
  We employ some fairly simple scripts run as cron jobs that do things
  like check the git repo for updated strings and pulls new string that
  have been entered, we have another one that generate language packs
  nightly for testing, etc. etc.
 
  Maybe looking at those will give you a few ideas.
 
  http://git.sugarlabs.org/pootle-helpers
 
  I'm nott really a git guru, but one of my colleqageus wrote up this
  documetnation on how we maintain the interactions between our Pootle
  instance and our git repo.  Agian, maybe it will give you some ideas.
 
  If you still have questions after reading that stuff, I may or may not
  be able to answer them myself, but perhaps someone else on this list
  can, or I can try to pass it along to my git guru, who is a busy guy
  and currently bouncing around Peru from village to village as part of
  an effort we are collaborating on.
 
  I hope this is helpful, I am sure you can get where you want with a
  git back-end.
 
  cjl
  Sugar Labs Translation Team Coordinator
  http://translate.sugarlabs.org/

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] transfer .po files

2011-12-15 Thread Chris Leonard
On Thu, Dec 15, 2011 at 8:30 PM, Mason Leung rhymeje...@gmail.com wrote:
 Hi Chris,

 Thank you very much for the info.  I read through the sugarlabs pages and
 want to see if this setup makes sense

 1) there is a git repo that store all the translated .po files
 2) pootle holds it owns set of .po files locally
 3) translators update the .po files, a cron can merge those files back into
 git
 4) a cron do pull from git and generated the .mo files for pages to use
 5) a cron extracts and create new .po files from pages and does a merge with
 the existing .po files on pootle
 Repeat step 3 to 5 nightly.

 I got these steps based on reading the helper files, does it look similar to
 what you guys do in sugarlabs?

 Thanks,
 Mason


I think our workflow is more like this.

1) An activity devloper (Sugar labs term for owner a git project)
creatred a new project in git.  Here is an example:
http://git.sugarlabs.org/abacus

They are requested to follow Gnu formatting for git structure,
meaning the PO directory (/po) can always be found in the same place.
at the top-level of the projectrepo.

http://git.sugarlabs.org/abacus/mainline/trees/master

2)  The activity developer does two things.  They generate the POT
file and place it in the /po directory and they grant commit access to
a special suer called pootle.

http://git.sugarlabs.org/abacus/mainline/trees/master/po

3) After creating the POT file and placing it in the /po directory, we
ask the developer not to mess with the .po directory to avoid loss of
synchronization.

From this point on, Pooltl essentially controls the /po directory
without any intervention from the developer.

Steps 1-3 are developer actions

4) The POT file is added to the 'Templates language project.
http://wiki.sugarlabs.org/go/Service/translate#Adding_activities

5) The language admins (or the Poolte admin) can do an 'Update from
Templates via the Poolte UI, which causes the new POT from Templates
to be created as a PO file in a given language project.

Any subsequent  Update from Templates is a merge operation on the PO
file, the existing translations are merged into the new template
derived from the POT in the Templates language.

6) The localizers do their translations, the lang admin reviews and
then commits the translated PO file using Commit to VCS link on
the Translate Tab in Poolte.

7) The special gituser: poolte is essentially a proxy who's commit
priv is borrowed by language admins (granted commit priv in Poolte
Admin UI).

See for example the git commit logs here:
http://git.sugarlabs.org/abacus

Where the Polish language administrator Jakub committed the lang-pl
PO file for abacus by selecting the Commit to VCS option, which
appears for him in Pootle  because he has been granted commit to VCS
priv (for lang-l) as a lang-admin for lang-pl.

We do not automate this commit to git because we believe it should be
an affirmative action by a human reviewer, not a machine's call.

During the period of time before the commit action by the lang-admin,
the translations in the PO exist in Pootle, but not git.  (Your point
#2)

Points 4-7 are actions taken by Pootle admin (or lang admin)

8) We do however automate the process of updating the POT files in the
templates language (the potgenerator script) This means that when the
developer adds a new string, it is added to the POT in the Templates
language by the script,  ultimately propagated to the individual
languages by Update from templates actions.

9)  For localization testing purposes, we take the PO files (the ones
commited to git, I think, not the ones in Pootle) and we generate the
.mo files as a part of  self-installing scripts we call language
packs.

Steps 8 and 9 are performed by the scripts.

10) Under normal circumstances (a developer's build or release
generation), the .mo files are generated from the git-committed PO
files in the git project's /po directory.

Does that make sense?

cjl

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle