How to use custom XML filter in Omegat (FPRM, ITS)
Thread poster: Emal Ghamsharick
Emal Ghamsharick
Emal Ghamsharick  Identity Verified
Germany
Local time: 00:39
English to German
+ ...
Nov 28, 2017

Hello, I've been working on this a couple of hours:
Problem: I want to translate a custom XML file in Omegat.
I've tried installing the Okapi filters, but when I put the XML in the Source folder, I get an error.
Then I downloaded Rainbow and created a custom FPRM file, where I define all the attributes of my XML in ITS format.
But there's no way to import this custom definition into OmegaT.

Read through all the manuals, but no use.
I can't just strip th
... See more
Hello, I've been working on this a couple of hours:
Problem: I want to translate a custom XML file in Omegat.
I've tried installing the Okapi filters, but when I put the XML in the Source folder, I get an error.
Then I downloaded Rainbow and created a custom FPRM file, where I define all the attributes of my XML in ITS format.
But there's no way to import this custom definition into OmegaT.

Read through all the manuals, but no use.
I can't just strip the tags and work on the raw text, I need the file to stay in format.

Anyone ever succeeded at this before?
Collapse


 
Didier Briel
Didier Briel  Identity Verified
France
Local time: 00:39
English to French
+ ...
Options > File Filters Nov 29, 2017

Emal Ghamsharick wrote:
Hello, I've been working on this a couple of hours:
Problem: I want to translate a custom XML file in Omegat.
I've tried installing the Okapi filters, but when I put the XML in the Source folder, I get an error.
Then I downloaded Rainbow and created a custom FPRM file, where I define all the attributes of my XML in ITS format.
But there's no way to import this custom definition into OmegaT.

Options > File Filters > Select the XML filter you use (e.g., XML files (Okapi - XML Filter)) > Options > Use the following filter parameters file, then browse to select it and click on OK.

Read through all the manuals, but no use.

As it's provided by Okapi, not by OmegaT, it's documented by Okapi:
http://okapiframework.org/wiki/index.php?title=Okapi_Filters_Plugin_for_OmegaT


Starting in m24 you can specify a custom filter parameters file for each of the filter that supports options.

Use OmegaT's Options button in the File Filters dialog box to select whether you want to use the default settings, or a custom filter parameters file (.fprm extension) where you have stored your options.



Anyone ever succeeded at this before?

Yes.

Didier


 
Emal Ghamsharick
Emal Ghamsharick  Identity Verified
Germany
Local time: 00:39
English to German
+ ...
TOPIC STARTER
Thank you for the update Nov 29, 2017

Dear Didier, Thanks for your helpful comment.

I have a very basic XML file with only 3 attributes (reversed the >< so the code is visible):

>xml version="1.0" encoding="UTF-8"?>
>data xml:lang="de">
>article_content content1="EXAMPLE TEXT 1" content2="EXAMPLE TEXT 2"
typeid="1 (SHOULD NOT BE TRANSLATED)"/>
>/data>



Now I created the following FPRM file:
>?xml version="1.0" encoding="UTF-8"?>
>its:rules xmlns:its="http://www.w3.org/2005/11/its"
xmlns:itsx="http://www.w3.org/2008/12/its-extensions"
version="1.0">
>its:translateRule selector="/data" translate="no"/>
>its:translateRule selector="/*/@xml:lang" translate="yes"/>
>its:translateRule selector="//article_content" translate="yes"/>
>its:translateRule selector="//*/@content1" translate="yes"/>
>its:translateRule selector="//*/@content2" translate="yes"/>
>its:translateRule selector="//*/@typeid" translate="no"/>
>its:withinTextRule selector="//typeid|/data" withinText="yes"/>
>/its:rules>


However, I still can't load the XML in OmegaT, even when I select the FPRM file.

When I try to load a project with my XML with the default Okapi filters, OmegaT tells me: unable to read project file.
When I load my custom FPRM file, OmegaT tells me it's unable to load the filter.

Any ideas?


 
Didier Briel
Didier Briel  Identity Verified
France
Local time: 00:39
English to French
+ ...
Use the Yahoo support group Nov 29, 2017

Emal Ghamsharick wrote:
However, I still can't load the XML in OmegaT, even when I select the FPRM file.

When I try to load a project with my XML with the default Okapi filters, OmegaT tells me: unable to read project file.
When I load my custom FPRM file, OmegaT tells me it's unable to load the filter.

Any ideas?

There are a number of things to check.

I recommend using the Yahoo support group:
https://groups.yahoo.com/neo/groups/OmegaT/info

In addition to being more suited for support, it is followed by Okapi people, in case their expertise is needed.

Didier


 
Emal Ghamsharick
Emal Ghamsharick  Identity Verified
Germany
Local time: 00:39
English to German
+ ...
TOPIC STARTER
Thanks Nov 30, 2017

Will try that. Thanks so much!

 


There is no moderator assigned specifically to this forum.
To report site rules violations or get help, please contact site staff »


How to use custom XML filter in Omegat (FPRM, ITS)






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »