Product SiteDocumentation Site

2.5. Input Methods

2.5.1. Introduction

It is a nice feature for a software center to allows users the installation of additional input-methods. This meta-info specification describes how metadata about input-methods should be structured.
Software components providing an input-method can ship one or more files in /usr/share/appdata/%{id}.metainfo.xml.
Input-method metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that.

2.5.2. Example file

The input-method meta-info file should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<component type="inputmethod">
  <id>mathwriter-ibus.db</id>
  <metadata_license>CC0</metadata_license>
  <name>Mathwriter</name>
  <summary>Math symbols input method</summary>
  <description>
    <p>
      The input method is designed for entering mathematical symbols.
    </p>
    <p>
      Input methods are typing systems allowing users to input complex languages.
      They are necessary because these contain too many characters to simply be laid
      out on a traditional keyboard.
    </p>
  </description>
  <url type="homepage">https://github.com/mike-fabian/ibus-table-others</url>
</component>

2.5.3. File specification

Note that the XML root must have the type property set to inputmethod. This clearly identified this metainfo document as describing an input-method instead of a generic software-component.
<id/>
For input-methods, the %{id} is the same name as the input-method's database filename.
<metadata_license/>
The <metadata_license/> tag is required. See Section 2.1, “Generic Component” for a description of this tag.
<name/>
Set a name for your input-method.
<summary/>
A short description of the input-method described in this metainfo file.
<description/>
Add a long description of the input-method.
Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
<screenshots/>
A screenshot may be included, showing the input-method in use in an application.
Refer to <screenshots/> for a detailed description of this tag.
<url/>
This is a recommended tag for links of type homepage. Links of type homepage should be a link to the upstream homepage for the application. See See <url/> for a description of this tag.
<provides/>
This tag is described for generic components at <provides/> in detail.
You can add one or more children of type <library/> in case you publish some additional shared libraries. If not, and there are no public binaries involved, you may omit the provides tag for input-methods.