Difference between revisions of "Zip Files For Prep and Import"

From Lingoport Wiki
Jump to: navigation, search
(One Zip File per Locale and per Prep Kit Number)
(One Zip File for all Locales, per Prep Kit Number)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
= Types of zip files =
 
Localyzer sends files to and from translation via zip files. For some L10n Vendors, such as '''FTP''' and '''local''', the zip files are used directly by translation. For other vendors, such as '''Lingotek''' and '''Worldserver''', Localyzer will use the zip files to upload files into the L10n Vendors system.
 
Localyzer sends files to and from translation via zip files. For some L10n Vendors, such as '''FTP''' and '''local''', the zip files are used directly by translation. For other vendors, such as '''Lingotek''' and '''Worldserver''', Localyzer will use the zip files to upload files into the L10n Vendors system.
 
There are 2 types of prep kit zip files; one zip file per locale and one zip file for all locales. By default, when a Localyzer project is prepped, there will be one zip file per locale. Regardless of the prep kit zip file content, the import kit is expected to have one zip file per locale.
 
There are 2 types of prep kit zip files; one zip file per locale and one zip file for all locales. By default, when a Localyzer project is prepped, there will be one zip file per locale. Regardless of the prep kit zip file content, the import kit is expected to have one zip file per locale.
   
= One Zip File per Locale and per Prep Kit Number =
+
== One Zip File per Locale and per Prep Kit Number ==
 
The zip files sent back and forth have the following characteristics:
 
The zip files sent back and forth have the following characteristics:
   
Line 13: Line 14:
 
* The '''translated files''' will be named the same as the original files (so they could be _en.properties even if the content is for French)
 
* The '''translated files''' will be named the same as the original files (so they could be _en.properties even if the content is for French)
   
== Example of the Zip File Structure, One Zip per Locale ==
+
=== Example of the Zip File Structure, One Zip per Locale ===
 
The structure of the zip file for target locale ''de'' is as follows:
 
The structure of the zip file for target locale ''de'' is as follows:
 
<pre>
 
<pre>
 
Acme.frontend.1.de.zip
 
Acme.frontend.1.de.zip
 
| -- Acme.frontend.1.de
 
| -- Acme.frontend.1.de
| -- resources.properties
+
| -- resources_en.properties
 
| -- messages.resx
 
| -- messages.resx
 
| -- errors.json
 
| -- errors.json
Line 30: Line 31:
 
* The files in one prep kit must all be returned in the translated zip file with a complete translation. If prep kit #1 had three files, the same three files must be returned in, say, German with every key/value pair returned.
 
* The files in one prep kit must all be returned in the translated zip file with a complete translation. If prep kit #1 had three files, the same three files must be returned in, say, German with every key/value pair returned.
   
= One Zip File for all Locales, per Prep Kit Number =
+
== One Zip File for all Locales, per Prep Kit Number ==
By default, when a Localyzer project is prepped, there will be one zip file per locale. If there is a need to send files for '''all''' the locales in 1 zip file, then the <code>prep.kit.locales.in.one.project</code> flag needs to be changed in configuration file '''<code>config_lrm_info.properties</code>''' which resides in the '''<code>/var/lib/jenkins/Lingoport_Data/L10nStreamlining/<group-name>/config</code>''' folder. The L10n Vendors supporting one prep kit for all locales are '''FTP''', '''Local''' and '''Lingotek'''.
+
By default, when a Localyzer project is prepped, there will be one TMS project (or one zip file) per locale. If there is a need to send files for '''all''' the locales in one TMS project (or one zip file), then the
  +
* <code>prep.kit.locales.in.one.project</code> flag
  +
needs to be changed in configuration file
  +
* '''<code>config_lrm_info.properties</code>'''
  +
which resides in the '''<code>/var/lib/jenkins/Lingoport_Data/L10nStreamlining/<group-name>/config</code>''' folder.
  +
  +
The L10n Vendors supporting one prep kit for all locales are '''FTP''', '''Local''', '''XTM''', and '''Lingotek'''.
   
 
Once set, '''if''' all the files to be translated are the same (same deltas or same full-files), '''then''' the files sent back and forth will have the following characteristics:
 
Once set, '''if''' all the files to be translated are the same (same deltas or same full-files), '''then''' the files sent back and forth will have the following characteristics:
   
* The data files to be translated are sent in one '''zip file''' for all locales.
+
* The data files to be translated are sent in one '''project / zip file''' for all locales.
* The '''zip file''' is named according to this convention: '''<code><group-name>.<project-name>.<kit-version>.zip</code>'''. For example, a zip file could be named '''<code>Queens.Champions.1.zip</code>''': The group-name is Queens, the project-name is Champions, and the kit version is 1.
+
* The '''project/zip file''' is named according to this convention: '''<code><group-name>.<project-name>.<kit-version>.zip</code>'''. For example, a zip file could be named '''<code>Queens.Champions.1.zip</code>''': The group-name is Queens, the project-name is Champions, and the kit version is 1.
 
* The zip file consists of '''one top level directory''', <code><group-name>.<project-name>.<kit-version></code>, with all the files to be translated under it.
 
* The zip file consists of '''one top level directory''', <code><group-name>.<project-name>.<kit-version></code>, with all the files to be translated under it.
 
* The zip file contains two files indicating the source locale and the target locales
 
* The zip file contains two files indicating the source locale and the target locales
Line 44: Line 51:
 
* The '''translated files''' will be named the same as the original files (so they could be _en.properties even if the content is for French)
 
* The '''translated files''' will be named the same as the original files (so they could be _en.properties even if the content is for French)
 
* The '''translated files''' will be returned in one zip file per locale, in the form: '''<code><group-name>.<project-name>.<kit-version><locale>.zip</code>'''. For example, a translation for French may be named: '''<code>Queens.Champions.1.fr.zip</code>'''.
 
* The '''translated files''' will be returned in one zip file per locale, in the form: '''<code><group-name>.<project-name>.<kit-version><locale>.zip</code>'''. For example, a translation for French may be named: '''<code>Queens.Champions.1.fr.zip</code>'''.
  +
  +
=== Example of the Zip File Structure, One Zip for all Locales ===
  +
The structure of the zip file, sent to translation, for prep kit 1, for all locales, is as follows:
  +
<pre>
  +
Acme.frontend.1.zip
  +
| -- Acme.frontend.sourceLocale.txt
  +
| -- Acme.frontend.targetLocales.txt
  +
| -- Acme.frontend.1
  +
| -- resources_en.properties
  +
| -- messages.resx
  +
| -- errors.json
  +
</pre>
  +
  +
The text file that contains the target locales (i.e. Acme.fronend.targetLocales.txt), will have each Localyzer locale on a separate line as follows:
  +
<pre>
  +
fr_FR
  +
es
  +
de_DE
  +
</pre>
  +
  +
  +
  +
The structure of each individual file returned back is slightly different (note the locale, fr for French here):
  +
<pre>
  +
Acme.frontend.1.fr.zip
  +
| -- Acme.frontend.1.fr
  +
| -- resources_en.properties
  +
| -- messages.resx
  +
| -- errors.json
  +
</pre>

Latest revision as of 15:08, 27 May 2022

Types of zip files

Localyzer sends files to and from translation via zip files. For some L10n Vendors, such as FTP and local, the zip files are used directly by translation. For other vendors, such as Lingotek and Worldserver, Localyzer will use the zip files to upload files into the L10n Vendors system. There are 2 types of prep kit zip files; one zip file per locale and one zip file for all locales. By default, when a Localyzer project is prepped, there will be one zip file per locale. Regardless of the prep kit zip file content, the import kit is expected to have one zip file per locale.

One Zip File per Locale and per Prep Kit Number

The zip files sent back and forth have the following characteristics:

  • The data files to be translated or returned from translation are sent in a zip file.
  • The zip file is named according to this convention: <group-name>.<project-name>.<kit-version>.<locale>.zip. For example, a zip file could be named Queens.Champions.1.fr_fr.zip: The group-name is Queens, the project-name is Champions, the kit version is 1, and the target locale is fr_FR or fr-fr (the locale separator is always an underscore in the zip file name).
  • The zip file consists of one top level directory, <group-name>.<project-name>.<kit-version>.<locale>, with all the files to be translated under it.
  • There is one zip file per target locale. You may target 10 locales for translation for project "Champions" under group "Queens". You then would have 10 zip files to send to translation.
  • A zip file may contain more than one file and more than one file type.
  • Each file to be translated has a comment at the top of the file which needs to be kept when returning the file from translation vendor.
  • The translated files will be named the same as the original files (so they could be _en.properties even if the content is for French)

Example of the Zip File Structure, One Zip per Locale

The structure of the zip file for target locale de is as follows:

Acme.frontend.1.de.zip
| -- Acme.frontend.1.de
     | -- resources_en.properties
     | -- messages.resx
     | -- errors.json

This is the structure of the zip file sent for translation. In addition, this is the structure of the file received from translation.

Notes:

  • The names of the files are the base resource file names
  • The names of the files (resources.properties) must be the same exact name when the translation is returned as it was in the zip file sent for translation.
  • The files in one prep kit must all be returned in the translated zip file with a complete translation. If prep kit #1 had three files, the same three files must be returned in, say, German with every key/value pair returned.

One Zip File for all Locales, per Prep Kit Number

By default, when a Localyzer project is prepped, there will be one TMS project (or one zip file) per locale. If there is a need to send files for all the locales in one TMS project (or one zip file), then the

  • prep.kit.locales.in.one.project flag

needs to be changed in configuration file

  • config_lrm_info.properties

which resides in the /var/lib/jenkins/Lingoport_Data/L10nStreamlining/<group-name>/config folder.

The L10n Vendors supporting one prep kit for all locales are FTP, Local, XTM, and Lingotek.

Once set, if all the files to be translated are the same (same deltas or same full-files), then the files sent back and forth will have the following characteristics:

  • The data files to be translated are sent in one project / zip file for all locales.
  • The project/zip file is named according to this convention: <group-name>.<project-name>.<kit-version>.zip. For example, a zip file could be named Queens.Champions.1.zip: The group-name is Queens, the project-name is Champions, and the kit version is 1.
  • The zip file consists of one top level directory, <group-name>.<project-name>.<kit-version>, with all the files to be translated under it.
  • The zip file contains two files indicating the source locale and the target locales
  • There is one zip file for all target locales. You may target 10 locales for translation for project "Champions" under group "Queens". You then would have 1 zip files to send over, again, if all the files are the same.
  • A zip file may contain more than one file and more than one file type.
  • Each file to be translated has a comment at the top of the file which needs to be kept when returning the file from translation vendor.
  • The translated files will be named the same as the original files (so they could be _en.properties even if the content is for French)
  • The translated files will be returned in one zip file per locale, in the form: <group-name>.<project-name>.<kit-version><locale>.zip. For example, a translation for French may be named: Queens.Champions.1.fr.zip.

Example of the Zip File Structure, One Zip for all Locales

The structure of the zip file, sent to translation, for prep kit 1, for all locales, is as follows:

Acme.frontend.1.zip
| -- Acme.frontend.sourceLocale.txt
| -- Acme.frontend.targetLocales.txt
| -- Acme.frontend.1
     | -- resources_en.properties
     | -- messages.resx
     | -- errors.json

The text file that contains the target locales (i.e. Acme.fronend.targetLocales.txt), will have each Localyzer locale on a separate line as follows:

fr_FR
es
de_DE


The structure of each individual file returned back is slightly different (note the locale, fr for French here):

Acme.frontend.1.fr.zip
| -- Acme.frontend.1.fr
     | -- resources_en.properties
     | -- messages.resx
     | -- errors.json