Translate5 internal used HTML Tags
The following Document describes how translate5 uses some defined HTML Tags internally to markup additional meta information to textual parts of a segment.
Terminology
Terminology is marked up by a ordinary HTML <div> Tag. The markup contains a defined set of attributes. The whole phrase which holds terminology is encapsulated by the tag.
|
Terminology is rendered with different colors, depending on the type and "found in target" state. If hovered with the mouse the explanation of the term is shown. |
Tag
One <div> Tag pair surround the text with terminology. The surrounded text is highlighted optically.
Attributes
All Attributes are mandatory, even if they are empty.
Attribute |
Type |
Description |
class |
String |
Contains the following structure: term TERMTYPE TRANSFOUND
|
data-tbxid |
String |
ID of the term in the tbx-file |
title |
String |
The textual description/explanation of the term. Can be empty if no description is given. |
|
|
|
Examples
… text … <div class="term supersededTerm" id="f_term_de-19" title="Bezeichnet einen Prozess oder Modul des Apache, welches genutzt wird, bevor der Prozess sich verzweigt. Englischer Begriff, sollte im Deutschen nicht verwendet werden.">Prefork</div> … text …
…<div class="term preferredTerm" data-tbxid="term_03_1_de_1_00005-4" title="">eine</div> …
… <div class="term admittedTerm" data-tbxid ="term_04_1_de_1_00007-5" title="">keiner</div> …
… <div class="term admittedTerm" data-tbxid ="term_04_1_de_1_00007-6" title="">eines</div> …
… <div class="term preferredTerm" data-tbxid ="term_03_1_de_1_00005-7" title="">Sein</div> …
… <div class="term preferredTerm transFound" data-tbxid="term_11_1_en_1_00019-8" title="Apache is the standard webserver and is released as open source under the Apache license.">Apache</div> …
… <div class="term supersededTerm" data-tbxid="f_term_de-19" title="Bezeichnet einen Prozess oder Modul des Apache, welches genutzt wird, bevor der Prozess sich verzweigt. Englischer Begriff, sollte im Deutschen nicht verwendet werden.">Prefork</div> …
MQM Tags
MQM Tags are marking the textual quality of the desired parts of a segment. Therefore <img> tags are used. Opening and closing tags are mapped semantically by the class and data-seq attribute and optically by the displayed image content. A correct order is ensured by the frontend, the correction of the tag nesting is planned but currently not implemented.
|
MQM Tags are visualized as an opening and closing tag pair, showing directly the MQM issue type number. When hovering with the mouse the MQM issue type name (Internationalization) and the Severity are shown. The optional comment is missing in the screenshot, but would be rendered below of the severity. |
Tag
One single <img> Tag before and one after the marked up text.
Attributes
All Attributes are mandatory, even if they are empty.
Attribute |
Type |
Description |
class |
String |
Contains the following structure: SEVERITY qmflag ownttip TYPE qmflag-N
|
data-seq |
Integer |
The data-seq is the unique ID of the created MQM Issue. An open / close <img> tag pair has therefore the same data-seq value. The data-seq is only an integer after saving the segment to the DB. If the Frontend sends a new taig pair, data-seq contains a string which the backend replaces then with ID after saving. |
data-comment |
string |
A free text provided by the user on MQM Tag creation. Can be empty. |
Examples
<img class="critical qmflag ownttip open qmflag-1" data-seq="123" data-comment="" src="/modules/editor/images/imageTags/qmsubsegment-1-left.png" />contains <img class="critical qmflag ownttip close qmflag-1" data-seq="123" data-comment="" src="/modules/editor/images/imageTags/qmsubsegment-1-right.png" />
Content Tags
Content Tags are marking special content which should not be edited by the user, but can be moved in the segment or removed from it. Contend Tags are represented by a whole structure of HTML Tags, as described below. In general Content Tags are either an opening and a closing tag pair or a standalone single tag. The HTML structure of the all three content tag types are the same, only the attribute values are differing.
|
<1> and </1> are a tag pair in short tag mode shown only with numbers. The users gets the tag content by hovering over the tag. |
|
The same segment in full tag mode. |
Tag Structure
<div>
<span>SHORT_CONTENT</span>
<span>LONG_CONTENT</span>
</div>
This whole HTML structure represents one content tag.
LONG_CONTENT is the HTML encoded original content of the imported Content Tag.
SHORT_CONTENT is a HTML encoded numeric value representing the original Content Tag. The User sees the original Content by hovering the Tag with the mouse, or by enabling the long tag view.
<div> Attributes
Attribute |
Type |
Description |
class |
String |
Contains the following structure: TYPE DATA
|
SHORT_CONTENT <span> Attributes
Attribute |
Type |
Description |
class |
String |
Contains the following fix value: "short" |
title |
String |
Contains the HTML encoded LONG_CONTENT value |
LONG_CONTENT <span> Attributes
Attribute |
Type |
Description |
class |
String |
Contains the following fix value: "full" |
id |
String |
The id has the following structure: |
Examples
Real life example:
|
|
Longtag Content visible |
Shorttag Content visible |
For information on why, read the related FAQ entry on using <div class="open 672069643d2231333822"><span title="<a href="faq.installation.php#faq.installation.apache2" class="link">" class="short"><1></span><span id="138-47-ef80dd2d212c55012ce5f6111425d319" class="full"><a href="faq.installation.php#faq.installation.apache2" class="link"></span></div>Apache2 with a threaded MPM <div class="close 2f67"><span title="</a>" class="short"></1></span><span id="138-52-cfb0b5f8ccae71824d6eaeed9d5efb2c" class="full"></a></span></div>
Formatted Examples:
For information on why, read the related FAQ entry on using
<div class="open 672069643d2231333822">
<span title="<a href="faq.installation.php#faq.installation.apache2" class="link">" class="short"><1></span>
<span id="138-47-ef80dd2d212c55012ce5f6111425d319" class="full"><a href="faq.installation.php#faq.installation.apache2" class="link"></span>
</div>
Apache2 with a threaded MPM
<div class="close 2f67">
<span title="</a>" class="short"></1></span>
<span id="138-52-cfb0b5f8ccae71824d6eaeed9d5efb2c" class="full"></a></span>
</div>
Examples of Single Tags:
<div class="single 73706163652074733d2263326130222f">
<span class="short" title="<space/>"><1/></span>
<span id="space-65-b31345d64a8594d0e7b79852d022c7f2" class="full"><space/></span>
</div>
<div class="single 782069643d2231343722202f">
<span class="short" title="»"><2/></span>
<span id="147-71-d0fbfc097c4fdbc0bc02e10243bd60fe" class="full">»</span>
</div>