Difference between revisions of "Pootle as a PO file repository"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(Pootle link)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
As you know Pootle can be used as a online translation tool. But it also supports basic download and upload operations even using Zip archives. I want to describe how to use Pootle as a PO file repository for offline translation. To ease change tracking in local files we will use Git.
+
<div style="background: yellow;font-weight: bold; text-align:center;">
 +
<br>The Pootle server at https://translate.apache.org is the standard process for translating OpenOffice.<br>
 +
Find more (but OUTDATED AS OF 2013) information at: http://wiki.services.openoffice.org/wiki/Pootle_User_Guide<br><br>
 +
</div>
  
To download the entire UI or HC2 translation you need to have "archive" privileges. After logging in and switching to editor mode you can see "Download Zip of folder" in the root folder of UI or HC2. Follow the link and get the file to your computer. In my case I downloaded the file into /home/rail/work/ooo/QA/3.0 folder.
+
Pootle can be used as a online translation tool. But it also supports basic download and upload operations even using Zip archives. I want to describe how to use Pootle as a PO file repository for offline translation. We'll use Git to ease change tracking in local files.
 +
 
 +
To download the entire UI or HC2 translation you'll need to have "archive" privileges. After logging in and switching to editor mode you can see "Download Zip of folder" in the root folder of UI or HC2. Follow the link and get the file to your computer. In my case I've downloaded the file into /home/rail/work/ooo/QA/3.0 folder.
  
 
Unzip the file into po folder:
 
Unzip the file into po folder:
Line 12: Line 17:
 
     git commit -m "Initial import"
 
     git commit -m "Initial import"
  
To ease our work we create a tag for initial import:
+
Let's also create a tag "initial" to ease our future work:
 
     git tag initial
 
     git tag initial
  
Now we are ready to start the translation process using our favorite PO editor (Kbabel or Emacs with po-mode :) ). Time by time commit your work into local repository.
+
Now we are ready to start the translation process using our favorite PO editor ([http://translate.sourceforge.net/wiki/virtaal/index Virtaal] or Emacs with po-mode :) ). Don't forget to commit your work into local repository, in regular intervals.
  
 
When you feel that you are ready to upload your changes to Pootle (online PO repository ;) ) you need to prepare Zip file with changed files. First of all, commit your latest changes into your Git repository:
 
When you feel that you are ready to upload your changes to Pootle (online PO repository ;) ) you need to prepare Zip file with changed files. First of all, commit your latest changes into your Git repository:
     git commit -m "ready to go"
+
     git commit -a -m "ready to go"
  
I use the following one liner to create needed zip file with changed files:
+
I use the following command to create needed zip file with changed files:
 
     zip -r ../openoffice_org-tr-changed.zip `git diff initial HEAD |grep '^--- a' |sed 's/^--- a\///'`
 
     zip -r ../openoffice_org-tr-changed.zip `git diff initial HEAD |grep '^--- a' |sed 's/^--- a\///'`
  
Upload the Zip file via Pootle interface (upload privileges needed). Don't forget to choose merge or replace method. Merge method will try to merge untranslated messages, but changed messages will be added as suggestions. So you need to walk through them after. Choose replace if you are sure that there was no changes in Pootle since initial download.
+
Upload the Zip file via Pootle interface (requires upload privilege). Select either merge or replace method.. Merge method will try to merge untranslated messages, but changed messages will be added as suggestions. So you need to walk through them after. Replace is dangerous one, choose it only if you're sure that weren't any changes in Pootle since initial download.
 +
 
 +
Note: Note: upload process can take some time, maybe even a lot. Seems like Pootle tries to re-index the files on the fly (FIXME). If you have some problems with uploading you can send an email to tools@l10n.openoffice.org.
  
Note: upload process can take some time, sometimes a lot. Seems like Pootle tries to re-index the files on the fly (FIXME). If you have some problems with uploading you can send the changed files to Pootle admin (Aijin) and kindly ask her to upload your files via file system. :)
+
[[Category:Localization]]

Latest revision as of 20:58, 19 June 2013


The Pootle server at https://translate.apache.org is the standard process for translating OpenOffice.
Find more (but OUTDATED AS OF 2013) information at: http://wiki.services.openoffice.org/wiki/Pootle_User_Guide

Pootle can be used as a online translation tool. But it also supports basic download and upload operations even using Zip archives. I want to describe how to use Pootle as a PO file repository for offline translation. We'll use Git to ease change tracking in local files.

To download the entire UI or HC2 translation you'll need to have "archive" privileges. After logging in and switching to editor mode you can see "Download Zip of folder" in the root folder of UI or HC2. Follow the link and get the file to your computer. In my case I've downloaded the file into /home/rail/work/ooo/QA/3.0 folder.

Unzip the file into po folder:

   unzip openoffice_org-tr.zip -d po

Now we should create local Git repository and import initial files:

   cd po
   git init-db
   git add .
   git commit -m "Initial import"

Let's also create a tag "initial" to ease our future work:

   git tag initial

Now we are ready to start the translation process using our favorite PO editor (Virtaal or Emacs with po-mode :) ). Don't forget to commit your work into local repository, in regular intervals.

When you feel that you are ready to upload your changes to Pootle (online PO repository ;) ) you need to prepare Zip file with changed files. First of all, commit your latest changes into your Git repository:

   git commit -a -m "ready to go"

I use the following command to create needed zip file with changed files:

   zip -r ../openoffice_org-tr-changed.zip `git diff initial HEAD |grep '^--- a' |sed 's/^--- a\///'`

Upload the Zip file via Pootle interface (requires upload privilege). Select either merge or replace method.. Merge method will try to merge untranslated messages, but changed messages will be added as suggestions. So you need to walk through them after. Replace is dangerous one, choose it only if you're sure that weren't any changes in Pootle since initial download.

Note: Note: upload process can take some time, maybe even a lot. Seems like Pootle tries to re-index the files on the fly (FIXME). If you have some problems with uploading you can send an email to tools@l10n.openoffice.org.

Personal tools