"Unformatted" snippets

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
Yvonne Gasser
Posts: 15
Joined: Wed Aug 07, 2013 7:50 am

"Unformatted" snippets

Unread post by Yvonne Gasser »

I'd find it very useful if I could define that the snippet text is not per se formatted but adopts the format of the surrounding text. Example: I'd like to use the definition of a certain term once in a table and once in a normal text. Normal text and table text are formatted differently. I'd thus like to write the definition in an unformatted way and link it once in the table, once in the normal text - and I'd like H&M to let me choose whether I want the linked snippet to adopt the formatting of the surrounding text or to assign the formatting I like.
With the current H&M snippet concept, this is not possible because I have to format the snippet text. Or is there a way and I just don't see it?

Yvonne
User avatar
Tim Green
Site Admin
Posts: 23186
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: "Unformatted" snippets

Unread post by Tim Green »

Hi Yvonne,

The easiest way to do this would be to define the text you want to use like that as a text variable instead of a snippet. Text variables are always plain text and they can be as long as you like, but they can't contain carriage returns. So as long as the text is supposed to be a single paragraph a variable will work well for this.

Define the variable in Configuration > Common Properties > Text Variables, then insert it with the Variable tool in Write > Insert Object. 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.
Yvonne Gasser
Posts: 15
Joined: Wed Aug 07, 2013 7:50 am

Re: "Unformatted" snippets

Unread post by Yvonne Gasser »

Hi Tim,
hmmm, I don't think this will work for me. I'm not sure I can avoid carriage returns – and how would this workaround work for translations? I'd have to export the text variables, delete all the variables which the translators are not allowed to touch and have the rest translated, then add the previously deleted variables again and import the text variables – sounds quite error-prone to me.
No way I can place this as a feature request?
User avatar
Alexander Halser
EC-Software Support
Posts: 4105
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: "Unformatted" snippets

Unread post by Alexander Halser »

Hi Yvonne,

Snippets always have a dedicated format, whether they are inline or on a separate line. It is not possible to make them format-less.

I recommend variables as well. The variables are part of the project configuration and that can/must be translated as well. To protect variables which the translator is not allowed to modify, set the "Protected" option of these variables to true.
Alexander Halser
Senior Software Architect, EC Software GmbH
Yvonne Gasser
Posts: 15
Joined: Wed Aug 07, 2013 7:50 am

Re: "Unformatted" snippets

Unread post by Yvonne Gasser »

Hi Alexander,
I'm thus forced not to use carriage returns for my text modules – OK as a workaround (but I'd still prefer the other way).
How do I export the project configuration so that it can get translated properly? On the "text variables" page, I can see the "Export" option, but this will only create a text file and even if I protect certain variables, they are still included in this text file. :?:
User avatar
Tim Green
Site Admin
Posts: 23186
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: "Unformatted" snippets

Unread post by Tim Green »

Hi Yvonne,

You don't need to "export" anything for translation. The main .hmxp project file is a plain text XML file and it contains all the variables as XML nodes. If your translator is using a professional translation memory tool like SDL Trados they can edit the uncompressed Help & Manual project with it directly (you can find configuration files for Trados in the /Templates/Translation folder in the Help & Manual program directory).

If they are not using an XML-aware translation tool it is better to use Help & Manual itself as the translation editor. The inexpensive Basic version is fine for that; it can edit projects created with the Professional version without restriction (it just can't create or export some Pro features, but the translator does not need to do that). Normal XML editors are not recommended because they are designed for XML programmers, not for people editing text, and the risk that a translator will damage the XML code is much too high. Similarly, you should not try to export to formats like RTF or HTML, translate that and then re-import. That would strip out all the project information and would create a huge (i.e. really huge) amount of unnecessary work later on.
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.
Yvonne Gasser
Posts: 15
Joined: Wed Aug 07, 2013 7:50 am

Re: "Unformatted" snippets

Unread post by Yvonne Gasser »

Hi Tim,
yeah, sorry, I'm still used to the terminology of former H&M versions where you had to export the content for translation. I know how to handle translation management with the XML files, but my problem is that I'll have to get the content of a variable translated and I don't know how to do this. I am currently using variables for product names and for numbering figures and tables, i.e. for content which must not be translated. And it works fine because I can define an sdlfiletype (a definition file for translators working with SDL Trados Studio) which treats variables as locked text.

Now the problem is: if I have to use variables for my use case described in my first post, I'll have to find a way to translate the CONTENT of SOME variables (but not of all) – the only way (so far) I saw was the way of exporting the text variables to a TXT file, but that's really not fit for what I want to do. And it certainly doesn't allow for sensible change management. That's why I asked how to get the content of those variables translated. Or, actually: That's why I originally asked for unformatted snippets.
User avatar
Tim Green
Site Admin
Posts: 23186
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: "Unformatted" snippets

Unread post by Tim Green »

Hi Yvonne,

The variables are stored directly in the main .hmxp project file, and if your translators are using XML-based tools they will be displayed in the editor directly as editable nodes when they load the .hmxp as an XML file. They also have automatic protection: If you define the variable as protected it will have the translate attribute set to off, so the translator will see it as an untranslatable node.
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.
Yvonne Gasser
Posts: 15
Joined: Wed Aug 07, 2013 7:50 am

Re: "Unformatted" snippets

Unread post by Yvonne Gasser »

Hi Tim,
I tried to do this, but it doesn't work. Do you have an sdlfiletype for Studio 2011?
User avatar
Tim Green
Site Admin
Posts: 23186
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: "Unformatted" snippets

Unread post by Tim Green »

Hi Yvonne,

Help & Manual currently only has config files for SDL Trados and Ahead Across. What exactly doesn't work? The HMXP file is a normal XML file and the variable definitions are simple XML tags that look like this:

Code: Select all

   <variables>
      <variable id="APP" type="text" translate="true">Help & Manual</variable>
      <variable id="AUTHOR" type="text" translate="true">Tim Green</variable>
    </variables>
One thing that might be tripping your XML editor up is that there is no translate attribute when the variable is "protected". If it is translatable it has translate="true", but if it isn't there is just no translate attribute at all.
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.
Yvonne Gasser
Posts: 15
Joined: Wed Aug 07, 2013 7:50 am

Re: "Unformatted" snippets

Unread post by Yvonne Gasser »

I created a project with SDL Trados Studio 2011 and added the HMXP file. With other files (such as the XML files in the Topics folder), Studio only needs the filetype definition and correctly interprets the tags and properties. But with the HMXP file, this doesn't work; if I add the filetype definition (SDL Trados 2009 HelpAndManual.sdlfiletype) which is provided with the H&M installation, Studio does not recognise the HMXP file as a file which can be translated. The HMXP file is treated as reference only and cannot be opened for translation.
Yvonne Gasser
Posts: 15
Joined: Wed Aug 07, 2013 7:50 am

Re: "Unformatted" snippets

Unread post by Yvonne Gasser »

Well... I'll try again:
I've got a HMXP file. Within this file I've got several user-defined variables.
I've got an "SDL Trados 2009 HelpAndManual.sdlfiletype".
I've got SDL Trados Studio 2011.
Now, I'll import the SDLFILETYPE in Trados Studio; then I add the HMXP and have Studio create a translatable version. This only works when I change the SDLFILETYPE file delivered with HuM, but still: the texts that are to be translated are not really the ones I need. Studio offers me to translate the text <%TITLE%> which I definitely do not want to be translated. On the other hand, it doesn't offer the user-defined content of variables to be translated. And that's what I would need to be able to get my actual requirement fulfilled the way your suggesting.

To sum it all up: It is not possible to fulfil my wish for unformatted snippets and the suggested workaround does not really work. Is there any chance to get my wish on a wish list?
User avatar
Hendrik
Posts: 53
Joined: Wed Aug 21, 2002 2:55 pm
Location: Belgium
Contact:

Re: "Unformatted" snippets

Unread post by Hendrik »

Yvonne Gasser wrote:Is there any chance to get my wish on a wish list?
Go ahead! :D
http://helpman.it-authoring.com/viewforum.php?f=6
User avatar
Tim Green
Site Admin
Posts: 23186
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: "Unformatted" snippets

Unread post by Tim Green »

Hi Yvonne,

The variable definitions in the .hmxp file should definitely be available to Trados for translation, along with all the other translatable items stored there. We're going to do some thorough investigation of this and I'll let you know when our developers have some results. :)
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.
Post Reply