Line 60: | Line 60: | ||
* Go to the Zanata, log in, and open your project/branch/language page. Select your language and download the po files using the '''Downlad All (zip)''' link shown in the following picture: | * Go to the Zanata, log in, and open your project/branch/language page. Select your language and download the po files using the '''Downlad All (zip)''' link shown in the following picture: | ||
[[image:zanata-download-po.png| | [[image:zanata-download-po.png|thumb]] |
Revision as of 09:24, 8 April 2016
Getting the Original Folders and Files
Normally, you can create a book with publican using the publican create
command.
This command creates a directory structure which is described in the publican manual. Here is this structure:
- publican.cfg
- en-US (directory)
- Test_Book.xml
- Test_Book.ent
- Revision_History.xml
- Preface.xml
- Chapter.xml
- Book_Info.xml
- Author_Group.xml
- images (directory)
- icon.sv
The Chapter.xml file is a template for creating chapter files. Chapter files contain the content that make up a book.
In our situation, we do not need to create the book as it has already been created by the author. In fact, we can get the above directory structure, including the chapters that have been added by the author from the [git.fedorahosted.org] site.
Once in this site, find your guide and click its name on the left side the screen. Then in the guide's page, choose the branch (generally the newer one) that you have translated. In the branch's page, click on the line corresponding to the last commit. The new displayed page should look like the following:
In the download section, click on one of the downloadable archives to download it.
Extract the content in any folder you want.
Preparing the translation files
- Open a terminal and change to the root directory of the guide. The one that contains the directory structure presented above.
- As a standard user, use the following command:
$ publican trans_drop
With this command, Publican creates a new subdirectory, named trans_drop/. The trans_drop/ subdirectory contains a snapshot of the source files of the document. When the trans_drop/ directory is present in a documentation project, Publican uses its content as the basis for the commands documented later in this procedure.
- Generate portable object template (POT) files from the XML files, using the following command:
$ publican update_pot
If this is the first time that POT files have been created for this document, Publican creates a new subdirectory, named pot. The pot subdirectory holds a POT file for each XML file in the document. If Publican has created POT files for this document previously, Publican updates the existing POT files to reflect any changes in the XML since the POT files were last updated.
- Generate portable object (PO) files from the POT files to begin translation into a particular language:
$ publican update_po --langs=language_code
If this is the first time that PO files have been created for a particular language, Publican creates a new subdirectory, named with the language code that you specified with the --langs= option. This subdirectory holds a PO file for each POT file in pot subdirectory, plus a Revision_History.xml file that tracks the history of this particular translation.
Replace the .po files in the <language-code> directory with the translated ones =
- Go to the Zanata, log in, and open your project/branch/language page. Select your language and download the po files using the Downlad All (zip) link shown in the following picture: