OmegaT plugin: Error when using Yaml SubFilter in Markdown filter

Issue #964 new
佐藤 洋行 created an issue

I get an error when using Yaml SubFilter.

The issue(#741) says the following, but I don't know where the known location is.

YAML subfilter configuration ID (yamlSubfilter) The custom configuration ID of the YAML filter that will be called to process YAML Metadata Header within Markdown documents. The configuration file must be saved in a known location with .fprm suffix. Specify nothing to use the default YAML filter configuration tailored for the Markdown filter. Default: (empty)

Error message

The error message is as follows:

Error: Cannot find filter configuration 'okf_yaml@my-conf'

Settings

okf_markdown@my-conf.fprm in omegat folder is as follows:

#v1
useCodeFinder.b=false
translateUrls.b=false
urlToTranslatePattern=.+
translateCodeBlocks.b=false
translateHeaderMetadata.b=true
translateImageAltText.b=false
codeFinderRules.count.i=1
codeFinderRules.rule0=\{\{[^}]+\}\}
codeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$
codeFinderRules.useAllRulesWhenTesting.b=true
yamlSubfilter=okf_yaml@my-conf

okf_yaml@my-conf.fprm in omegat folder is as follows:

#v1
extractIsolatedStrings.b=false
extractAllPairs.b=false
exceptions=description|title
useKeyAsName.b=true
useFullKeyPath.b=true
useCodeFinder.b=true
subFilterProcessLiteralAsBlock.b=false
escapeNonAscii.b=false
wrap.b=true
codeFinderRules.count.i=3
codeFinderRules.rule0=%(([-0+#]?)[-0+#]?)((\d\$)?)(([\d\*]*)(\.[\d\*]*)?)[dioxXucsfeEgGpnYyBbHhSMmAZ]
codeFinderRules.rule1=(\\r\\n)|\\a|\\b|\\f|\\n|\\r|\\t|\\v
codeFinderRules.rule2=\{\{\w.*?\}\}
codeFinderRules.sample=%s, %d, {1}, \n, \r, \t, {{var}} etc.
codeFinderRules.useAllRulesWhenTesting.b=true

Comments (4)

  1. Chase Tingley

    Hmm, that would normally be correct. The subfilter configuration path is normally evaluated relative to the current working directory. I wonder if for OmegaT the CWD is somewhere else.

    One thing you might try is to specify yamlSubfilter as an absolute path to the file and see if that makes a difference?

    Also cc @YvesS , as I don’t know much about the plugin.

  2. 佐藤 洋行 reporter

    I tried to specify yamlSubfilter as an absolute path to the file, it makes no difference.

  3. Qabiria

    I’m trying to do the same from Rainbow and get the same error, so apparently it’s not related to the OmegaT plugin. I’ve checked the options to use HTML subfilter and YAML subfilter, adding okf_yaml@my-config with or without frpm and with or without the absolute path, but I always get the same above error “cannot find filter configuration”.

  4. Log in to comment