From Fedora Project Wiki

Updated for

This page has been updated for Fedora 23.

Context

While reviewing translation on Zanata, the reviewer may find some repetitive faults the translator has made. This kind of situation may result from various reason such as:

  • Lack of attention by the translator to some aspects that are not always very visible while editing (e.g. double spaces)
  • Ignorance by the translator of some grammar or punctuation rule that leads to repetition of the error (e.g. in French double punctuation – :,;,!,? – should be preceded by a fine non breakable space contrarily to the English language)
  • Pure translation error for a repetitive word
  • Any other unknown rule

In such a situation, Zanata's search and replace functionality is not of great help. To be able to search and replace repetitive faults, the reviewer has to pull the translated files from Zanata, use some OS tools to do so and, eventually, push back the modified files to Zanata.

The present page explains the different stages to accomplish this efficiently.

{{admon/note| This page assumes the reviewer is using Fedora as OS – see the "Updated for" section above.

Setting up the Pull an Push Tool

Installing the Zanata Command Line Client

The necessary command line tool to pull and push from Zanata is the Zanata command line client (CLI) available in the zanata-client package. Please install it with:

su -c 'dnf -y install zanata-client' 

Configuring the Zanata Client

User Configuration

To allow the user to be authenticated by the Zanata server, the zanata-cli presents the user's credentials it finds in the ~/.config/zanata.ini file to the server. Thus, the first thing to do is to create this ~/.config/zanata.ini file and add the user's credential in it. Fortunately, the Zanata server provides a very convenient way of doing so.

To create you configuration file:

  1. Use your favorite text editor to create the ~/.config/zanata.ini file.
  2. Login into the Zanata server and navigate to the user's Settings page – click on the user's avatar in the top-right corner and, in the drop down menu that opens, chose Settings.
  3. Click the <> Client link.
  4. Ensure an API key is displayed. If not, click on the Generate API Key button to create one.
  5. Copy the content of the Configuration[zanata.ini] text-box.
  6. Past the copied lines into the ~/.ini/zanata.ini file and save it.

Project Version Configuration