HTML sub-filter in JSON filter not working in OmegaT

23 views
Skip to first unread message

Manuel Souto Pico

unread,
May 11, 2022, 12:03:21 PM5/11/22
to okapi-users
Dear all,

I have successfully used the okf_html sub-filter with the okf_json filter in Okapi Rainbow. The XLIFF that I generate looks perfect and tags show the underlying markup when I hover over them in OmegaT.

I have tried to use the filters directly in OmegaT, without using Okapi Rainbow or XLIFF, as I normally do with other file formats after configuring the filter in Rainbow.

I have put my okf_...@foo.fprm file definition in the omegat folder of the project and I have added this file in the project settings (i.e. Edit Project > File Filters > JSON files (Okapi) > Options > Use the following filter parameters file: okf_...@foo.fprm. So far so good.

Then, I'm not sure how to add the sub-filter. I have tried with both subfilter=okf_...@foo.fprm  and subfilter=okf_...@foo.fprm inside the okf_json file, but to no avail. HTML markup is not encoded and segmentation is messed up often, e.g.

image.png

Is there anything I'm doing wrong? Any tips welcome.
Thanks in advance.

Cheers, Manuel

PS: My omegat/okf_...@foo.fprm file definition:

#v1
extractIsolatedStrings.b=false
extractAllPairs.b=false
exceptions=current_translation
useKeyAsName.b=true
useFullKeyPath.b=false
useLeadingSlashOnKeyPath.b=false
escapeForwardSlashes.b=true
useCodeFinder.b=false
noteRules=
extractionRules=
idRules=key
genericMetaRules=
codeFinderRules.count.i=1
codeFinderRules.rule0=</?([A-Z0-9a-z]*)\b[^>]*>
codeFinderRules.sample=&name; <tag></at><tag/> <tag attr='val'> </tag="val">$0a$<span class="g-blockly-subtarget-single" id="blockly-replace1"> bla </span>
codeFinderRules.useAllRulesWhenTesting.b=true
subfilter=okf_html
subfilterRules=

Manuel Souto Pico

unread,
May 14, 2022, 6:14:21 AM5/14/22
to okapi-users
Reply all
Reply to author
Forward
0 new messages