OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] "translated" indexes


We have an Ant target that packages up the source files for localization.  A number of scripts are run in the process, but the process of adding sortas attributes is this: 

  1) The first step is handled in Ant and is to replace all the ampersands in the files with a token value using replaceregexp (we use "-real.ampersand-").  

  2) Then we run a simple XSLT that is almost an identity transform (that is, it copies all elements and attributes, with preserve-space set on the transform) except for matches for indexterm and its children.  Each of them is copied, along with all of the attributes, and an empty sortas attribute is added to the appropriate elements.

  3) Finally, we use replaceregexp again to replace the token value with an ampersand character.

Steps 1 and 3 are to preserve entities in the files.

It is important that the localizers memory translation tool be set to allow them to modify the sortas attribute (by default, most of them seem to lock the localizers out of modifying attributes, but it is a setting the localizers seem to understand).

If none of this makes sense, send me an email and I would be happy to provide more detail, but I am hesitant to make DocBook Apps a class in XSLT and Ant.  ;-)

Regards,
Larry

-----Original Message-----
From: Jean-Christophe Helary [mailto:jean.christophe.helary@gmail.com] 
Sent: Monday, September 27, 2010 8:32 AM
To: DocBook Apps
Subject: Re: [docbook-apps] "translated" indexes


On 27 sept. 10, at 23:21, Rowland, Larry wrote:

> We use an XSLT script to add the sortas attribute to the documents before we turn it over to the Japanese localizers, since some of the translation memory tools they use do not allow them to modify the structure of the document (and the attributes attached to an element is considered part of the structure by the tools).

Thank you Rowland,

Indeed the document I am talking about is going to be handled in a translation memory tool (OmegaT) so the translators will not have access to the underlying code and we don't want them to have access since most of them are translators and not XML specialists.

Would you minds giving me an idea of how your XSLT works so that I can see how that could apply to us ? I am going to be in charge of the l10n for that document (which is in fact the OmegaT user manual that we just converted from HTML to Docbook) and I am not yet used to that whole new environment.

Jean-Christophe Helary

> 
> Regards,
> Larry
> 
> -----Original Message-----
> From: Cramer, David W (David) [mailto:dcramer@motive.com] 
> Sent: Saturday, September 25, 2010 9:48 AM
> To: Jean-Christophe Helary; DocBook Apps
> Subject: RE: [docbook-apps] "translated" indexes
> 
> Correct. When the translators translate your document, instruct them to add sortas attributes with the term transliterated in hiragana/katakana. This applies to your glossentrys as well. 
> 
> David
> 
> -----Original Message-----
> From: Jean-Christophe Helary [mailto:jean.christophe.helary@gmail.com] 
> Sent: Saturday, September 25, 2010 10:02 AM
> To: DocBook Apps
> Subject: Re: [docbook-apps] "translated" indexes
> 
> 
> On 25 sept. 10, at 12:49, Cramer, David W (David) wrote:
> 
>> Typically you just translate the indexterms in place in the document and let the xslts generate a new index. For Japanese, you add sortas attributes to your primary, secondary, and tertiary elements with the term transliterated into a phonetic script (katakana or hiragana). 
> 
> Ok, so you need to add that code to the Japanese DocBook file, right ?

Jean-Christophe Helary
----------------------------------------
fun: http://mac4translators.blogspot.com
work: http://www.doublet.jp (ja/en > fr)
tweets: http://twitter.com/brandelune


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]