How to use custom XML filter in Omegat (FPRM, ITS)
Thread poster: Emal Ghamsharick
Emal Ghamsharick
Emal Ghamsharick  Identity Verified
Germany
Local time: 10:41
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: 10:41
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: 10:41
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: 10:41
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: 10:41
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)






Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »