jDiction Forum

English => General Questions => Topic started by: jstead on March 13, 2014, 06:11:07 am

Title: Xliff Exports for Trados
Post by: jstead on March 13, 2014, 06:11:07 am
Hi there,

We are in the process of localising our website in a few languages through our internal translation team that use Trados to manage their translation projects. We have managed to import the XLIFF export into Trados without difficulties, however, the CDATA is breaking out content per sections of the website as opposed to sentences, which is the usual way for translation tools. This also means that the HTML tags and code are considered as translatable content and therefore not protected during translation.

We are wondering if there would be a way to modify the way the CDATA is working, i.e. instead of enclosing a whole section, it could enclose only text in between html tags.

This is an example of how it is looking now:
<source><![CDATA[<p>Joomla! is all about allowing you to create a site that matches your vision. The possibilities are limitless; this sample site will just get you started.</p>
<p>There are a few things you should know to get you started.</p>]]></source>

This is the way we would like to see it (if possible):
<source><p><![CDATA[Joomla! is all about allowing you to create a site that matches your vision. The possibilities are limitless; this sample site will just get you started. ]]></p>
<p>><![CDATA[There are a few things you should know to get you started. ]]></p></source>

Would functionality like this be possible through modifications, or is there a lot more in it?

Kind Regards,
Jason
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on March 13, 2014, 11:58:51 am
I think thats not the way to go, IIRC <![CDATA is only valid once per entry and as the first characters.

But IIRC XLIFF has another way to support such things, the exporter could define segments that should not be translated.

On the other hand, this should be done by the translate program, it should understand html and rtf if not I'm not sure if I can help you very quickly cause by the lack of time.
Title: Re: Xliff Exports for Trados
Post by: jstead on March 19, 2014, 12:01:41 am
Thanks Harald for the quick feedback, we did a few test with the translation tool and found we are able to break the content where we needed too. Yet to import the translations back in, but looks to be working great.
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on March 19, 2014, 08:56:42 am
please provide feedback how it is working with xliff because I have very little experience with this technology.
Title: Re: Xliff Exports for Trados
Post by: jstead on March 31, 2014, 12:21:31 am
Hi Harald, I sent you an email with results from some Xliff testing we did, but just realised it wasn't a PM. Did you receive this, or should I resend it through the PM channel?
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on April 01, 2014, 02:42:30 pm
Yes I got your mail but didn't have the time to answer, but you didn't describe a real problem or?
The only thing I see is that the target-tag is not created by your software and so jdiction has nothing to import... is this common by such software?
Title: Re: Xliff Exports for Trados
Post by: jstead on April 02, 2014, 02:03:04 am
Yes, the problem was not having the <target> tag as its should be there from the initial export. The translation software doesn't add any structural content/tags to xliff/xml files, they are designed to only interact with the content needing translation.

By nature, a CAT(Computer-Assisted Translation) tool is creating an exact copy of the file that is fed into the system into another language. That means that these tools do not change the structure of the file, neither would they add tags that were not originally in the file. They purely extract the text that needs to be translated and through the process of translation, replace this text by the same text in another language.

Therefore, for the import to be working, we would need a target tag to be added to the export. That way we can tell the tool to ignore the source tag (we create a rule that tells the CAT tools that this text must not be translated) and only translate the target tag. We will end up with a file containing both the English and the translation, e.g:

Export file:
<source><![CDATA[This is some text to translate.]]></source> (will be hidden for translation in CAT tool)
<target><![CDATA[This is some text to translate.]]> </target> (will be translated by CAT tool)

Import file:
<source><![CDATA[This is some text to translate.]]></source>
<target><![CDATA[Ceci est le texte à traduire.]]></target>

We're happy to talk/provide any other information that may assist.
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on April 02, 2014, 10:09:25 am
could you please try the attached version?
Title: Re: Xliff Exports for Trados
Post by: jstead on April 11, 2014, 02:39:45 am
Hi Harald,

Sorry for the delayed response, we ran into a few problems in the process, but after a bit of testing, they all ended up being on our side and not jdiction.

The new Xliff structure is great, and imported into the CAT tool with no issues.

To have the CAT tool exports import back into Jdiction, we just had to convert the translated .xlf to UTF without BOM (as the CAT Tool exported it as ANSI) and find and replace state='needs-translation' to state='translated' which only takes a few seconds. So very quick process!


We are now looking to do a complete site export/translate/import as a final test and I just had an issue with exporting the following tables.
When exporting the below from jdiction, the xliffs are empty.
com_content -> articles
com_menus -> item
(empty as in just have the xliff tag)
<xliff version='1.2' xmlns='urn:oasis:names:tc:xliff:document:1.2'></xliff>

Is com_menus -> item the actual menus front end structure for each of my menus?

The other 2 tables I required are k2 -> item and modules -> module which both are exporting/re-importing with no issues.

Thank you very much again for the great support.
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on April 11, 2014, 02:22:57 pm
funny 6 year no new version of xliff and now we have 2.0 ;-) http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html maybe I will support this in the future

Maybe your CAT tool doesn't support the features of xliff 1.2? Or I miss understood the specifications.

I added bom detection for xliff files, could you post the output xml of the CAT tool?

state='needs-translation' is interesting because the state after translation should be one of "final signed-off translated"...
Title: Re: Xliff Exports for Trados
Post by: jstead on April 14, 2014, 04:35:41 am
Hi Harald,

The items you mention below (encoding format and translation state) are working great as far as Jdiction is concerned. I was just mentioning our process as an FYI in case it was helpful.

Our translation manager mentions that our CAT tool supports XLIFF 1.2, however she did not use the standard XLIFF filter provided by the CAT tool as it didn’t allow her to customise the content as she wanted. Instead, she used an xml filter to parse and tag the HTML content within the XLIFF file, so it was not part of the translatable content. (I have attached a copy of a single item exported from our CAT program).


The only outstanding issue we have at the moment, is trying to export the com_content -> articles and com_menus -> item tables from our site for translation, as they are currently exporting empty. Is there something specific that could be causing this?

Thanks Again,
Jason
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on April 14, 2014, 10:03:47 pm
So I have a new experimental version for you, the export has bin fixed.

But there is more, new written jdlanguageswitcher helper, support for aliases for urls and some other fixes.

please try carefully.
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on April 16, 2014, 04:43:45 pm
Thats a better version with an important bugfix.
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on April 18, 2014, 02:01:33 pm
Did you tried this version? And could you please give me some feedback, I need it?
Title: Re: Xliff Exports for Trados
Post by: jstead on April 23, 2014, 03:10:05 am
Hi Harald,

Sorry for the delay, We have had multiple public holidays here and the office was closed.

Our translation manager is away until Monday 28th, so I am unable to test the import/export process with the CAT tool, but I have installed the new version, exported all tables and manually copy/pasted translations into the Xliff to test what I can.

It looks like all remaining tables (menus-items and content-article) now export correctly.

I was able to re-import the translated k2-items, modules-module and content-articles tables with no issues.

But, the menus-item table worked for every item except for 1 sub menu (and its various sub-sub menus). By not working though, they appear as translated (green flag icon and green border on entry field), but  blank. Found that I had to export the Xliff WITH duplicates, as the re-import only imported the 1st instance of each duplicate menu (each of our 6 products has the same submenu (features/benefits etc)

I also noticed that the Alias wasn't exported/translated for any menu items, not sure if this was planned to be in export, or to be manually added through Joomla UI. Although manually changing product alias to Produits for instance caused a 404. (I had this working earlier but cant remember how)

Please advise any other tests you would like me to try, or if there is any other information you may need. I will also do some more testing once the translation manager is in and supply feedback on this.

Thanks,
Jason
Title: Re: Xliff Exports for Trados
Post by: Kim on September 15, 2014, 06:14:12 pm
I've recently installed jDiction for our website and am attempting to export a xliff.  I am able to do this, however, instead of only exporting content set to a particular language (in this case English) it is pulling ALL content from the database, this includes unpublished/trashed content, example content, German and Spanish content, etc..  Please advise what I may be doing wrong here as I'm new to this tool.  Thanks.
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on September 15, 2014, 06:19:36 pm
The export has no filter for the status or the language of the content, do you need this?
Title: Re: Xliff Exports for Trados
Post by: Kim on September 15, 2014, 07:46:15 pm
Yes.  Our project entails getting all our English, published content translated into Chinese, however as mentioned everything included is being pulled instead which includes a ton of unnecessary stuff for this particular project and translators are unable to use the file due to this.
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on September 15, 2014, 07:53:15 pm
you should really don't have trashed items and should clean up, its possible to change the query not to select all content but that is based on the type you want to export.

if you have only problem with trashed content, then delete it really. If you have unpublished content, why you don't delete? Is there a reason for it?

I'm still not sure what you mean with "German and Spanish" content? if you added German content with the language Joomle default language setting then its a problem thats true...

is it content or menu entries or modules or categories? or a 3rd party component?
Title: Re: Xliff Exports for Trados
Post by: Kim on September 15, 2014, 08:42:29 pm
Thanks so much for your attention to my issue and your rapid response time, it's greatly appreciated  :).

Emptying the trash and removing the unpublished content I can easily do.  Not really any reason to keep them except in some cases unpublished content may be published again or is currently under development.  If helpful though to accomplish the export I will certainly trash/delete/empty all this.

I do see where I am able to select various tables to export, and I do actually want all of the available options.  The thing is I only want the content for these items that is in English (we also have German and Spanish versions for many of these - more detail on this included below).

To try and clarify what exactly I'm trying to do and German/Spanish content, here are some details:
 - We have an English language website which includes categories, articles, menus, and modules.  Currently these are all set to "All" for language (this was by default and I wasn't overly familiar with any language settings when initially building the site so left it as is, however, if necessary I can update these to all be English (US) as I have since installed this language.
 - As for the German and Spanish content, since we already had a German and Spanish site prior to using Joomla, content was already available to me in these languages so I created categories, articles, menus, and modules and designed the the appropriate language setting of German or Spanish as appropriate for each.
 - Now for the Chinese site development, we do not have internal resources that will provide translations and are using a professional translating service.  They have requested to have an export of all the content requiring translation from English to Chinese and hence I came across jDiction.  The translators are not interested in having all the German and Spanish content included in the export as it's irrelevant to the project.

Thanks again Harald for your assistance with this.
 
Title: Re: Xliff Exports for Trados
Post by: Harald Leithner on September 15, 2014, 11:17:18 pm
Hmm you are right, maybe it should only export content that is set to language "all"

the attached version should fix this "problem"
Title: Re: Xliff Exports for Trados
Post by: Kim on September 17, 2014, 04:58:03 pm
Thank you so much.  I'll give it a try and keep you posted.  Your support is greatly appreciated and I'll be sure and add a review in the Joomla extension area stating the commendable support you provide for this extension.