Translation vs Variable Protection

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

Moderators: Alexander Halser, Tim Green

Post Reply
Jim Heuberger
Posts: 7
Joined: Fri Jun 24, 2016 10:42 pm

Translation vs Variable Protection

Unread post by Jim Heuberger »

I need to protect several variables from translation. Reading the documentation, it seems like variable protection and translation protection are different - it this true?

I did try 'finding' <%myVariable%> and started trying to click the padlock button to protect them, but sometimes the variable doesn't appear 'hatched' and/or the padlock icon isn't selected when I go back and select and instance of <%myVariable%>:

The first instance of <%myVariable%> will hatch, have a selected padlock icon when selected and save properly. The second instance of <%myVariable%> will never hatch, but will show a locked padlock icon when I select it. Unfortuantely, the changes won't save for this second instance - whenever I reopen the file, the second instance of <%myVariable%> isn't hatched (never does) and shows an unlocked padlock when selected.

I must be doing something wrong...
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Translation vs Variable Protection

Unread post by Tim Green »

Hi Jim,

Variable protection makes it more difficult for users to accidentally change their values in the Text Variables configuration section (you have to unprotect them first) and also removes the translate="true" attribute from the variable definition in the main project file. This gives the translator the message that it should not be translated there -- i.e. in the variable definition in the .hmxp project file (there is no translate="false" attribute, it is either true or not present).

Variable protection doesn't apply the protected text attribute to the variable in the topic editor, however. This isn't necessary, as variables are something that should never be translated anyway -- i.e. their names should not be changed no matter what language the project has. You can apply the protected text attribute to them if you wish, but for that you need to select the entire variable first, just as for any other text. This really isn't necessary, however, since variables are not something that should ever be touched in translations anyway.
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