Segmentation problem with variables

This Forum is for general issues about MadCap Lingo

Segmentation problem with variables

Postby jasonsmith on Mon Sep 05, 2011 8:52 am

We are having problems in getting content with variables translated. When a variable is located at the end of a heading in the source file the segment generated by lingo stops just before the variable.

source: <h2>Calculating a <MadCap:variable name="GUI_Terms.Thing" /></h2>

target:<h2><MadCap:segment>Calculating a </MadCap:segment><MadCap:variable name="GUI_Terms.Thing" /></h2>

This means that our translators can't see the variable or move it to accomodate local syntax.

We are using lingo V3, this may have been fixed in the later versions. I see that in V4 this kind of behavior for bold, underlined etc. text was fixed, but was wondering if the same applies to variables.
jasonsmith
Sr. Propeller Head
 
Posts: 205
Joined: Wed Apr 28, 2010 2:51 am

Re: Segmentation problem with variables

Postby WDClark on Fri Feb 10, 2012 1:03 pm

I can confirm that it is NOT fixed in 5.0, and the effect of the segment/variable break is actually even worse.

In our case, we use variables for, among other things, product names. So we might have a sentence that starts with a variable, such as "Product Awesome allows you to do amazing things." In MadCap's XML, this sentence would look like this:
Code: Select all
<p MadCapConditions="Default.IncludeDescription"><MadCap:variable name="MyVariables.ProductName" /> allows you to do amazing things.</p>


A very annoying problem arises when you pass the XML through Lingo, however. After you prepare a translation bundle and segmenting content, the code comes out the other side looking like this:
Code: Select all
<p MadCapConditions="Default.IncludeDescription">
  <MadCap:variable name="MyVariables.ProductName" />
  <MadCap:segment>allows you to do amazing things.</MadCap:segment>
</p>


Send that to the translators and you get back something like this (my Pig Latin is a little rusty):
Code: Select all
<p MadCapConditions="Default.IncludeDescription">
  <MadCap:variable name="MyVariables.ProductName" />
  <MadCap:segment>yallowsay ouyay otay oday mazingays ingsthay.</MadCap:segment>
</p>


The problem with the returned XML, however is that when you export it back to Flare, and build your help project, the line comes out like this (not doing any more Pig Latin; you get the idea from the English):
Product Awesomeallows you to do amazing things.


If the variable is at the end of the sentence, you get this:
The product that allows you to do amazing things isProduct Awesome.


Anybody have any idea how to deal with this?

Nine languages, 240 pages in the help project (glad we didn't translate the WHOLE thing), and it's completely borked. Every time the variable isn't in the middle of a sentence, MadCap drops any and all white space on either side of it.
WDClark
Jr. Propeller Head
 
Posts: 5
Joined: Fri Feb 10, 2012 12:45 pm

Re: Segmentation problem with variables

Postby techwriter31 on Tue Feb 21, 2012 10:44 am

Hmmm...I'd be curious to see if there are any "<![CDATA[ ]]>" tags next to the variable. If there are, you could potentially do a search and replace for the CDATA tags, and replace them with "&160;".
Kellie
techwriter31
Propellus Maximus
 
Posts: 532
Joined: Wed Mar 05, 2008 10:50 am

Re: Segmentation problem with variables

Postby benjimenez on Wed Feb 22, 2012 9:47 am

I've seen this same problem in v5 and found the CDATA tags next to the variables.
benjimenez
Propeller Head
 
Posts: 78
Joined: Mon Aug 30, 2010 4:17 pm

Re: Segmentation problem with variables

Postby jasonsmith on Fri Jun 29, 2012 2:18 am

I have kind of solved this; adding a zero-width space (&#8288;) either before or after the offending variable bumps it into the segment and hopefully doesn't mess up any alignment.

Flare

<xhtml:td xhtml:style="font-size: 9pt;">Page <MadCap:variable xhtml:name="System.PageNumber" /> of <MadCap:variable xhtml:name="System.PageCount" />&#8288;</xhtml:td>

Lingo

<xhtml:td xhtml:style="font-size: 9pt;"><MadCap:segment>Page <MadCap:variable xhtml:name="System.PageNumber" /> of <MadCap:variable xhtml:name="System.PageCount" />⁠</MadCap:segment>
jasonsmith
Sr. Propeller Head
 
Posts: 205
Joined: Wed Apr 28, 2010 2:51 am


Return to MadCap Lingo General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests