External Finder
This section describes about org.omegat.externalfinder
package
ExternalFinder XML Format
ExternalFinder feature is configured by XML file
Attribute | Description |
---|---|
items | This element has an optional attribute priority. |
item | This element has an optional attribute nopopup. |
name | A string to show as a menu item. For a mnemonic, you can use '&' (written in XML as '&'). |
url | A URL with a {target} placeholder with optional attributes: target and encoding. |
command | A command string with a {target} placeholder with optional attributes: target, encoding, and delimiter. |
keystroke | A definition of the keyboard shortcut (same as OmegaT's custom keyboard shortcut). Ref. KeyStroke_ (Java Platform SE 8 ) |
.. _KeyStroke: http://docs.oracle.com/javase/8/docs/api/javax/swing/KeyStroke.html#getKeyStroke-java.lang.String-
XML examples:
The value of the priority attribute determines the position of items on popup menu.
The default value is 50. See EditorPopups.java
.
- The value of nopopup attribute MUST be true.
- The value of target attribute can be both, ascii_only, or non_ascii_only.
- The value of encoding attribute can be default, escape, or none. The difference between default and escape is the whitespace which becomes + with default (URL Encoding) and %20 with escape (for some web sites).
- The default values of target and encoding attributes are both and default.
<?xml version="1.0" encoding="UTF-8" ?>
<items priority="50">
<item nopopup="true">
<name>Google</name>
<url target="both" encoding="default">https://www.google.com/search?q={target}</url>
<url target="ascii_only">https://www.google.com/search?q=define%3A{target}</url>
<keystroke>ctrl shift F</keystroke>
</item>
<item>
<name>Yahoo</name>
<url target="ascii_only">http://search.yahoo.com/search?p={target}</url>
<url target="non_ascii_only">http://search.yahoo.co.jp/search?p={target}</url>
</item>
<item>
<name>Google &amp;definition</name>
<url target="ascii_only">https://www.google.com/search?q=Define+{target}</url>
</item>
<item>
<name>Google &amp;patent</name>
<url target="ascii_only">https://www.google.com/search?q=Patent+{target}</url>
</item>
<item>
<name>Google (&amp;ja)</name>
<url target="both" encoding="default">https://www.google.com/search?q=%22{target}%22&amp;lr=lang_ja&amp;ie=UTF-8</url>
</item>
</items>
- This plugin can call executables using command element. The default values of target and encoding attributes are both and none.
- The delimiter attribute for command element is used to define the delimiter for parameters. The default delimiter is |.