Difference between revisions of "Localyzer Resource File Comments"

From Lingoport Wiki
Jump to: navigation, search
(Localyzer Retranslation Tag)
(Localyzer Comments Overview)
 
(13 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
= Localyzer Comments Overview =
 
= Localyzer Comments Overview =
 
Localyzer uses a set of comments, either in the repository files for retranslation requests, or to resource files when sending them for translation. The three types of comments are:
 
Localyzer uses a set of comments, either in the repository files for retranslation requests, or to resource files when sending them for translation. The three types of comments are:
* A Localyzer '''Project tag''' at the top of the file
+
* A Localyzer '''LRM tag''' at the top of the file
 
* A Localyzer '''Context tag''' above a key value pair
 
* A Localyzer '''Context tag''' above a key value pair
 
* A Localyzer '''Retranslation tag''' above a key value pair
 
* A Localyzer '''Retranslation tag''' above a key value pair
   
= Localyzer Project Tag =
+
= Localyzer LRM Tag =
A project tag is created as a comment and added when sending a file for translation. It indicates if the file is a full file or a delta, the Localyzer project, the target locale, and the kit number. This tag must not be modified when returning the translated file. The translation validation process uses the tag for some of its internal checks.
+
An LRM tag is created as a comment and added when sending a file for translation. It indicates if the file is a full file or a delta, the Localyzer project, the target locale, and the kit number. This LRM tag must not be modified when returning the translated file. The translation validation process uses the LRM tag for some of its internal checks.
   
Example of the project tag, here in a <code>.json</code> file:
+
Example of the LRM tag, here in a <code>.json</code> file:
 
"_LRM_PKTAG636": "RawClipped_5_97 - CHANGES-ONLY"
 
"_LRM_PKTAG636": "RawClipped_5_97 - CHANGES-ONLY"
   
Line 20: Line 20:
 
When Localyzer is configured to work with InContext Translation, the system creates a tag as a comment above each resource key/value pair when sending the file to translation. The tag includes a URL pointing to a context held by the Lingoport Context server. In the TMS or CAT tool, that may appear as a note to the translator, allowing them to see the context for the text to be translated.
 
When Localyzer is configured to work with InContext Translation, the system creates a tag as a comment above each resource key/value pair when sending the file to translation. The tag includes a URL pointing to a context held by the Lingoport Context server. In the TMS or CAT tool, that may appear as a note to the translator, allowing them to see the context for the text to be translated.
   
Example of a Context tag, here for a <code>.resx</code> file:
+
Example of a Context tag, here for a <code>.xml</code> file:
 
<pre>
 
<pre>
<!--LRM_INCONTEXT https://fs-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41-->
+
<!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41-->
 
<data name="DELIVERED" xml:space="preserve"><value>Delivered</value></data>
 
<data name="DELIVERED" xml:space="preserve"><value>Delivered</value></data>
 
</pre>
 
</pre>
Line 45: Line 45:
   
 
== .json file example ==
 
== .json file example ==
  +
<pre>
  +
{
  +
"_LRM_PKTAG636": "RawClipped_5_97 - CHANGES-ONLY",
  +
"_LRM_INCONTEXT778": " https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41",
  +
"delivered": "Delivered",
  +
"_LRM_INCONTEXT555": " https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3125_45",
  +
"Sphyrna": "Sphyrna corvette",
  +
"_LRM_RESEND998": " LQA-||joe.reviewer@trials.com||Note a Romantic Date||Jour",
  +
"_LRM_INCONTEXT12": " https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45",
  +
"date": "Date"
  +
  +
}
  +
</pre>
   
 
== .properties file example ==
 
== .properties file example ==
  +
<pre>
  +
#RawClipped_5_97 - CHANGES-ONLY
  +
#LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41
  +
rebels.delivered=Delivered
  +
#LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3126_45
  +
rebels.sphyrna=Sphyrna Corvette
  +
#LRM_RESEND LQA-||joe.reviewer@lingoport.com||This is not a romantic date||Jour
  +
#LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45
  +
rebels.date=Date
  +
</pre>
   
== .resx file example ==
+
== .xml file example ==
  +
<pre>
  +
<?xml version="1.0" encoding="UTF-8"?>
  +
<!--RawClipped_5_97 - CHANGES-ONLY-->
  +
<!-- Multi-line
  +
comment above the root
  +
end multi-line -->
  +
<!-- Single line comment -->
  +
<root>
  +
<!--SOURCE_FILE C:/Users/jnedell/Desktop/SmokeTestSource/VBDotNet/strings/CarOption.cls-->
  +
<!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41-->
  +
<data name="DELIVERED" xml:space="preserve"><value>Delivered</value></data>
  +
<!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3126_45-->
  +
<data name="SPHYRNA" xml:space="preserve"><value>Sphyrna Corvette</value></data>
  +
<!--LRM_RESEND LQA-||joe.reviewer@lingoport.com||This is not a romantic date||Jour-->
  +
<!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45-->
  +
<data name="DATE" xml:space="preserve"><value>Date</value></data>
  +
</root>
  +
</pre>
   
 
== .strings file example ==
 
== .strings file example ==
  +
<pre>
  +
/*RawClipped_5_97 - CHANGES-ONLY*/
  +
/* Class = "IBUILabel"; text = "Delivered"; ObjectID = "DTz-P6-Y3D"; */
  +
/*LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41*/
  +
"DTz-P6-Y3D.text" = "Delivered";
  +
/* Class = "IBUITextField"; placeholder = "Sphyrna Corvette"; ObjectID = "FiC-Ph-wbo"; */
  +
/*LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3126_45*/
  +
"FiC-Ph-wbo.placeholder" = "Sphyrna Corvette";
  +
/* Class = "IBUILabel"; text = "Date"; ObjectID = "tDx-oc-GBE"; */
  +
/*LRM_RESEND LQA-||joe.reviewer@lingoport.com||This is not a romantic date||Jour*/
  +
/*LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45*/
  +
"tDx-oc-GBE.text" = "Date";
  +
</pre>

Latest revision as of 15:19, 29 August 2022

Localyzer Comments Overview

Localyzer uses a set of comments, either in the repository files for retranslation requests, or to resource files when sending them for translation. The three types of comments are:

  • A Localyzer LRM tag at the top of the file
  • A Localyzer Context tag above a key value pair
  • A Localyzer Retranslation tag above a key value pair

Localyzer LRM Tag

An LRM tag is created as a comment and added when sending a file for translation. It indicates if the file is a full file or a delta, the Localyzer project, the target locale, and the kit number. This LRM tag must not be modified when returning the translated file. The translation validation process uses the LRM tag for some of its internal checks.

Example of the LRM tag, here in a .json file:

   "_LRM_PKTAG636": "RawClipped_5_97 - CHANGES-ONLY"
  • _LRM_PKTAG636: Indicates an Localyzer tag.
  • RawClipped: The name of the Localyzer project.
  • 5: the kit version, here the 5th time files for the RawClipped project are sent to translation
  • 97: the internal language identifier, here Japanese/Japan

Localyzer Context Tag

When Localyzer is configured to work with InContext Translation, the system creates a tag as a comment above each resource key/value pair when sending the file to translation. The tag includes a URL pointing to a context held by the Lingoport Context server. In the TMS or CAT tool, that may appear as a note to the translator, allowing them to see the context for the text to be translated.

Example of a Context tag, here for a .xml file:

    <!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41-->
    <data name="DELIVERED" xml:space="preserve"><value>Delivered</value></data>
  • LRM_INCONTEXT: Indicates the context URL for the key / value pair below, here the text to be translated is 'Delivered'

Localyzer Retranslation Tag

When Localyzer processes LocalyzerQA post-edit requests, it adds a comment in the repository to the translated file just above the key/value pair which requires re-translation. When sending the source file to translation, the translated file comment is then added to the source file only for that locale. In the TMS or the CAT, that comment may appear to the translator as a suggestion to retranslate the text. The translated file can also be edited by hand to add that re-translation tag.

Example of a retranslation tag, here for a .properties file:

   #LRM_RESEND LQA-||joe.reviewer@lingoport.com||This is not a romantic date||RDV
   rebels.date=Date
  • LRM_RESEND : the directive to the translator/TMS/CAT tool to indicate the retranslation request
  • joe.reviewer@lingoport.com: the email of the person requesting the retranslation, in case more communication is necessary
  • This is not a romantic date: optionally, an explanation of why the original translation was imprecise or wrong
  • RDV: the suggested retranslation by the reviewer.

Example of files with the tags

.json file example

{
  "_LRM_PKTAG636": "RawClipped_5_97 - CHANGES-ONLY",
  "_LRM_INCONTEXT778": " https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41",
  "delivered": "Delivered",
  "_LRM_INCONTEXT555": " https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3125_45",
  "Sphyrna": "Sphyrna corvette",
  "_LRM_RESEND998": " LQA-||joe.reviewer@trials.com||Note a Romantic Date||Jour",
  "_LRM_INCONTEXT12": " https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45",
  "date": "Date"

}

.properties file example

#RawClipped_5_97 - CHANGES-ONLY
#LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41
rebels.delivered=Delivered
#LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3126_45
rebels.sphyrna=Sphyrna Corvette
#LRM_RESEND LQA-||joe.reviewer@lingoport.com||This is not a romantic date||Jour
#LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45
rebels.date=Date

.xml file example

<?xml version="1.0" encoding="UTF-8"?>
<!--RawClipped_5_97 - CHANGES-ONLY-->
<!-- Multi-line
comment above the root
end multi-line -->
<!-- Single line comment -->
<root>
    <!--SOURCE_FILE C:/Users/jnedell/Desktop/SmokeTestSource/VBDotNet/strings/CarOption.cls-->
<!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41-->
    <data name="DELIVERED" xml:space="preserve"><value>Delivered</value></data>
<!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3126_45-->
    <data name="SPHYRNA" xml:space="preserve"><value>Sphyrna Corvette</value></data>
<!--LRM_RESEND LQA-||joe.reviewer@lingoport.com||This is not a romantic date||Jour-->
<!--LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45-->
    <data name="DATE" xml:space="preserve"><value>Date</value></data>
</root>

.strings file example

/*RawClipped_5_97 - CHANGES-ONLY*/
/* Class = "IBUILabel"; text = "Delivered"; ObjectID = "DTz-P6-Y3D"; */
/*LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3015_41*/
"DTz-P6-Y3D.text" = "Delivered";
/* Class = "IBUITextField"; placeholder = "Sphyrna Corvette"; ObjectID = "FiC-Ph-wbo"; */
/*LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3126_45*/
"FiC-Ph-wbo.placeholder" = "Sphyrna Corvette";
/* Class = "IBUILabel"; text = "Date"; ObjectID = "tDx-oc-GBE"; */
/*LRM_RESEND LQA-||joe.reviewer@lingoport.com||This is not a romantic date||Jour*/
/*LRM_INCONTEXT https://ts-incontext.lingoport.io/incontext-server/lookup?token=4h23984Rh5JLWhn79tS12UJauH71XV7J9R&key=3200_45*/
"tDx-oc-GBE.text" = "Date";