Changelog:

  • Do not auto select first AutoComplete item by default to avoid affecting Chinese input methods
  • Read Okapi Tikal configs from project’s config folder

There will be a fc.conf in project’s config folder. Users can specify the encoding and options used for a specific file format.

A fc.conf file is like this:

sdlxliff	okf_xliff-sdl	utf-8
md	okf_markdown@yaml.fprm	utf-8

The first column is the extension. The second is the config id. The third is encoding.

Config id can be the Okapi’s default filter name or a modified config’s name.

So why do we need to modify the config?

For example, Okapi’s default markdown filter do not translate embeded yaml which is used as metadata. By modifying the config, we can enable the translate yaml option of markdown filter.

The config file is like this:

#v1
useCodeFinder.b=false
translateUrls.b=false
urlToTranslatePattern=.+
translateCodeBlocks.b=true
translateInlineCodeBlocks.b=true
translateHeaderMetadata.b=true
translateImageAltText.b=true
codeFinderRules.count.i=1
codeFinderRules.rule0=\{\{[^}]+\}\}
codeFinderRules.sample= handle bar test $0a$$0a$
codeFinderRules.useAllRulesWhenTesting.b=true

We can use Rainbow to create such config files. To use a config, store the config file in the project’s config folder and modify fc.conf.