toc and translation

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

toc and translation

Unread post by Wolfgang Baer »

Hi,
I am a new user here in the forum but an old user of H&M.
Recently I also got Trados Freelance and am familiarizing with the procedures to translate with a TMS.

Because of this I now have specific question regarding the H&M toc.xml.
Its tag:
<caption translate="true">some text here</caption>
is set to "needs translation".

But at the same time in the topic.xml itself the tag
<title translate="true">some text here</title>
is also set to "needs translation".

I now noticed that if I change the title in the H&M editor and save the project,
then the toc includes the new altered title text automatically in its caption tag.

Wouldn't that mean that if somebody translates the title in the topic
and I later on load those topics and save the project, that the toc
will automatically get the translation? So the question mainly is
shouldn't I better set the caption tag in the toc to "don't translate"?

Thanks for help in advance.
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: toc and translation

Unread post by Tim Green »

Hi Wolfgang,
I now noticed that if I change the title in the H&M editor and save the project,
then the toc includes the new altered title text automatically in its caption tag.
How did you manage that? Editing the <title> tag text in either the Topic Options or the XML tab doesn't change the TOC caption. The only automatic change is the other way round: If the TOC caption and the topic header text are identical, the topic header text will be updated automatically if you edit the TOC caption. However, if you edit the TOC header that won't change the TOC caption. After that the texts are no longer identical, and editing the TOC caption will no longer automatically change the topic header. If you edit them both so that they are identical, then changing the TOC caption will once again automatically update the header (the check is performed every time you edit).

However, all of this only applies within Help & Manual itself. When working on the XML source with Trados or any other tool, you obviously won't get any automatic updating between different locations at all. This makes it essential for all the components to have their translate flags set to true. :)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Re: toc and translation and a new question

Unread post by Wolfgang Baer »

Thanks for chiming in Tim.

You are right. I was sure that altering the title tag in the topic updated the caption tag in the toc. But no, is does not (my fault). I got now how it works and that toc and topic need to be translated each on their own.

May I ask a new question?
Having a look into hmxp files I also find tags with translation = true.
E.g.
<config-group name="project">
<config-value name="title" translate="true"><%PRODUCTNAME%></config-value>

But as PRODUCTNAME is a variable should it not be excluded from translation?
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: toc and translation

Unread post by Tim Green »

Hi Wolfgang,
Wolfgang Baer wrote:But as PRODUCTNAME is a variable should it not be excluded from translation?
It depends on how you look at it. In the broadest terms it is translatable, because it is user-definable, and anything that can be edited in Help & Manual can also be translated. However, it would be a good idea to tell your translators to not touch variables, because obviously if you "translate" them in their definitions this would break them in the topics unless every use of the variable was also "translated".

I'm going to discuss this with our developers. It would really make sense to change this to translate="false" to prevent accidental damage to the variable definitions by over-eager translators... Also, it's not even possible to change the names of variables in Help & Manual itself, for the same reason... 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: toc and translation

Unread post by Alexander Halser »

Hi Wolfgang,

Set the "Protected" value of this variable to "Yes". That changes the translate attribute to false.
Alexander Halser
Senior Software Architect, EC Software GmbH
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Re: toc and translation

Unread post by Wolfgang Baer »

Hi Alexander,
maybe I am doing it wrongly but:

I have defined a var called PRODUCT in the text variables of H&M.
This var is now used in a topic.
If I set the var to "Protected No" in the variable editor,
I get this in the topic xml:

Code: Select all

<para styleclass="Normal"><text styleclass="Normal" translate="true">.. my text... </text><var styleclass="Normal"><%PRODUCT%></var> ... more text here plus <all the close tags>.
If I set the var to "Protected Yes" and save the project again I get this in the topic xml

Code: Select all

<para styleclass="Normal"><text styleclass="Normal" translate="true"> .. my text.. </text><var styleclass="Normal"><%PRODUCT%></var> more text etc. ...
It seems to me, protected = true or false is ignored regarding the translation flag.
Do I need to delete the var out of the topic and insert it again after changing the protection toggle maybe?

EDIT:
It is not a real issue because I start to understand how the sdlfilesettings in Trados work. Seems so that I can exclude the vars from translation that way. I am just asking because I am trying to understand how all this works behind the scenes.
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: toc and translation

Unread post by Tim Green »

Hi Wolfgang,

The protected flag for the variable only protects the variable definition, not the variable in the body text. Theoretically you could select the variable in the body text and apply the protected attribute to it with the Protect tool in Write > Font (padlock icon). However, a technical translator who doesn't understand that they shouldn't translate a variable inserted in body text might not be the right person for the job... 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Re: toc and translation

Unread post by Wolfgang Baer »

:wink:
Unfortunately there seem to be a few "not right persons" working for translation service providers. That's why we put the time into setting up a system that's as fool proof as possible :D
Anyway, as said, I can lock the var tag in the Trados filetype, so no issue here.
Post Reply