Skip to main content
Inspiring
November 3, 2023
Answered

XLIFF export clings on to old variable values

  • November 3, 2023
  • 2 replies
  • 240 views

I need to systematically change the value of every variable in default.var with a script.

 

The problem occurs when I attempt an XLIFF export on topics with the changed variables - for some reason, the XLIFF export uses the old variable value instead of the new one. I've tried clearing the cache, restarting the project, restarting the translation project and so on but nada.

 

My question is, where does the XLIFF get the old values and how can I force it to use the new values?

 

Illustration to make my point clear:

1 - I have a topic where two variables, let's call them variable A and B, are used:

2 - the values of variable A and B are changed (externally, with a script). In this example, they are changed to 'PLACEHOLDER'.

3 - when exporting this illustration topic, I notice the XLIFF export fails to use the new PLACEHOLDER value.

 

 

----------------

Q: why does this even matter? The Default.var in the translation project will automatically load the new variable value, regardless of the current variable value.

A: yes, but there's a very annoying bug that occurs when our variables are being exported. The usage of <br> and '>' signs cause a duplication problem in the XLIFF file: muliple <g> tags are created in the XLIFF for one variable. This causes the variable to be duplicated in the translation project. This is a workaround for that bug, and now I'm trying to find a workaround for the bug of this workaround.

    This topic has been closed for replies.
    Correct answer Peter Grainge

    This is the reply that I received.

    ****************************************

    User needs to send default.var for export file after updating variables then the new variable values will be picked up, otherwise topic will refer to old values. In the topic, only the ref of the variable is present, variable value is determined from the default.var file when topic is opened. If topic is translated but default.var is old then topic will display old variable values.

    ****************************************

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    2 replies

    Peter Grainge
    Community Expert
    Peter GraingeCommunity ExpertCorrect answer
    Community Expert
    November 10, 2023

    This is the reply that I received.

    ****************************************

    User needs to send default.var for export file after updating variables then the new variable values will be picked up, otherwise topic will refer to old values. In the topic, only the ref of the variable is present, variable value is determined from the default.var file when topic is opened. If topic is translated but default.var is old then topic will display old variable values.

    ****************************************

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Inspiring
    November 10, 2023

    Hi, thanks for the answer.

    We usually don't export the Default.var as it crashes the translation software, but this method may work if we just use the Default.var for exporting and then throw the var xliff out of the folder (as well as delete the file in the mapper file).

    Thanks!

    Peter Grainge
    Community Expert
    Community Expert
    November 3, 2023

    I think I see the cause of the problem. I created a topic and added a variable. In topic properties the last modified date was say 00.01. I waited a minute and changed the variable value and opened the topic to see the time. It had not changed so as far as the translation process is concerned, it hasn't changed.

     

    Whilst there are various ways and tools of changing that time, you only want that done on topics with the variables. That's not realistic. I think it is a bug but let me reach out to a contact.

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.