How to translate a specific HTML code with embedded text

I was working on a batch of HTML files, but somehow there was text embedded in the codes that Trados automatically hides. I tried to add parser rules but it didn't work. I am not familiar with codes, so this is rather difficult for me to understand the rules. Here is the example:

<h3 class="m-h3--wysiwyg">製品仕様</h3>
<ul class="m-list">
<li>RoHS2対応</li>
</ul>
<h3 class="m-h3--wysiwyg">規格表</h3>
<div class="u-right">(単位:mm)</div>
<table class="m-table" summary="DHEMGシリーズ 推奨寸法">
<colgroup>
<col width="14.8%" />
<col width="10.6%" />
<col width="10.6%" />
<col width="10.6%" />
<col width="10.6%" />
<col width="10.6%" />
<col width="10.6%" />
<col width="10.6%" />
<col width="10.6%" />
</colgroup>
<thead>
<tr>
<th rowspan="3" style="text-align: center;">内径</th>
<th colspan="4" style="text-align: center;">推奨寸法</th>
<th colspan="4" style="text-align: center;">寸法</th>
</tr>

...omission...

I was asked to translate the text in the summary line (<table class="m-table" summary="DHEMGシリーズ 推奨寸法">), but I just couldn't make it work. Can someone please give me guidance on this? Thanks in advance.

  • You will have to create the project again, as the file needs to be parsed anew after having changed the corresponding settings.

    Before you start creating your project, go to File -> Setup -> Project templates and chose the one you want to use. If you go for single file translation, chose the default project template and click Edit on the right side.

    Go to File Types, click the "HTML 5" file type there. It should open the settings tree for this file type. Click there on "Parser" and locate the element "Table". Click it and select "Edit" in the bottom.

    You will see this:

    Trados Studio options window showing HTML 5 file type parser settings with 'table' tag selected and attributes 'border' set to false and 'title' set to true.

    At top right you see "Attributes". Click "Add". Enter "Summary", chose it to be translatable and close the window.

    Edit Rule window in Trados Studio with 'Add Attribute' dialog open, ready to enter 'summary' as a translatable attribute for the 'table' tag.

    Close the element by clicking OK and press OK again to end editing of the Project template. Now create your new project with the html file, using the translation memory from the previous project.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:01 AM (GMT 0) on 29 Feb 2024]