Blame doc/ocaml-gettext.xml

Packit 802e35
Packit 802e35
Packit 802e35
  ocaml-gettext: a library to translate messages
Packit 802e35
  
Packit 802e35
  Copyright (C) 2003-2008 Sylvain Le Gall <sylvain@le-gall.net>
Packit 802e35
  
Packit 802e35
  This library is free software; you can redistribute it and/or
Packit 802e35
  modify it under the terms of the GNU Lesser General Public
Packit 802e35
  License as published by the Free Software Foundation; either
Packit 802e35
  version 2.1 of the License, or (at your option) any later version;
Packit 802e35
  with the OCaml static compilation exception.
Packit 802e35
  
Packit 802e35
  This library is distributed in the hope that it will be useful,
Packit 802e35
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 802e35
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 802e35
  Lesser General Public License for more details.
Packit 802e35
  
Packit 802e35
  You should have received a copy of the GNU Lesser General Public
Packit 802e35
  License along with this library; if not, write to the Free Software
Packit 802e35
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
Packit 802e35
  USA
Packit 802e35
===================================================================-->
Packit 802e35
Packit 802e35
Packit 802e35
Packit 802e35
"/usr/share/xml/schema/dtd/4.3/docbookx.dtd" [
Packit 802e35
]>
Packit 802e35
<refentry>
Packit 802e35
  <refentryinfo>
Packit 802e35
    <productname>ocaml-gettext</productname>
Packit 802e35
    <productnumber/>
Packit 802e35
    <date>2008-04-29</date>
Packit 802e35
  </refentryinfo>
Packit 802e35
Packit 802e35
  <refmeta>
Packit 802e35
    <refentrytitle>OCAML-GETTEXT</refentrytitle>
Packit 802e35
    <manvolnum>1</manvolnum>
Packit 802e35
  </refmeta>
Packit 802e35
  
Packit 802e35
  <refnamediv>
Packit 802e35
    <refname><command>ocaml-gettext</command></refname>
Packit 802e35
    <refpurpose>program to manage PO and MO files for OCaml source files.</refpurpose>
Packit 802e35
  </refnamediv>
Packit 802e35
Packit 802e35
  <refsynopsisdiv>
Packit 802e35
    <cmdsynopsis>
Packit 802e35
      <command>ocaml-gettext</command>
Packit 802e35
      <arg choice="plain">--action 
Packit 802e35
        <sbr/>
Packit 802e35
        <group>
Packit 802e35
          <arg choice="plain">extract</arg>
Packit 802e35
          <arg choice="plain">compile</arg>
Packit 802e35
          <arg choice="plain">install</arg>
Packit 802e35
          <arg choice="plain">uninstall</arg>
Packit 802e35
          <arg choice="plain">merge</arg>
Packit 802e35
        </group>
Packit 802e35
      </arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--extract-command         <arg choice="req"><replaceable>cmd</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--extract-default-option  <arg choice="req"><replaceable>options</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--extract-filename-option <arg choice="req"><replaceable>filename</replaceable></arg>
Packit 802e35
                                                  <arg choice="req"><replaceable>options</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--extract-pot             <arg choice="req"><replaceable>filename</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--compile-output          <arg choice="req"><replaceable>filename</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--install-language        <arg choice="req"><replaceable>language</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--install-category        <arg choice="req"><replaceable>category</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--install-textdomain      <arg choice="req"><replaceable>textdomain</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--install-destdir         <arg choice="req"><replaceable>dirname</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--uninstall-language      <arg choice="req"><replaceable>language</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--uninstall-category      <arg choice="req"><replaceable>category</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--uninstall-textdomain    <arg choice="req"><replaceable>textdomain</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--uninstall-orgdir        <arg choice="req"><replaceable>dirname</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="req">--merge-pot               <arg choice="req"><replaceable>filename</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg choice="opt">--merge-backup-extension  <arg choice="req"><replaceable>extension</replaceable></arg></arg>
Packit 802e35
      <sbr/>
Packit 802e35
      
Packit 802e35
      
Packit 802e35
        href="ocaml-gettext-options.xml" 
Packit 802e35
        xmlns:xi="http://www.w3.org/2001/XInclude" 
Packit 802e35
        xpointer="xpointer(id('ocaml-gettext-options-cmdsynopsis')/node())"/>
Packit 802e35
      <group>
Packit 802e35
        <arg choice="plain">--version</arg>
Packit 802e35
        <arg choice="plain">--short-version</arg>
Packit 802e35
        <arg choice="plain">-help</arg>
Packit 802e35
        <arg choice="plain">--help</arg>
Packit 802e35
      </group>
Packit 802e35
      <sbr/>
Packit 802e35
      <arg rep="repeat">file</arg>
Packit 802e35
    </cmdsynopsis>
Packit 802e35
  </refsynopsisdiv>
Packit 802e35
Packit 802e35
  <refsect1>
Packit 802e35
    <title>DESCRIPTION</title>
Packit 802e35
Packit 802e35
    <para>
Packit 802e35
      This manual page documents briefly the <command>ocaml-gettext</command> command.
Packit 802e35
    </para>
Packit 802e35
Packit 802e35
    <variablelist>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--action <parameter>extract</parameter></option> 
Packit 802e35
        </term> 
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Files provided are considered to be OCaml source files and <command>ocaml-gettext</command>
Packit 802e35
            tries to extract translatable strings of it. The output of the command is a POT file. As a 
Packit 802e35
            special case, if a file named <filename>POTFILES</filename> is in the list of the file 
Packit 802e35
            provided, every line of it is considered as a file to be searched.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--action <parameter>compile</parameter></option> 
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Files provided are considered to be PO file. These files are compiled in binary
Packit 802e35
            MO files,
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--action <parameter>install</parameter></option> 
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Files provided are considered to be MO files. They are installed in their
Packit 802e35
            respective directories considering language, textdomain and category,
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--action <parameter>uninstall</parameter></option> 
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            This is the symmetric command to <option>install</option>, but it uninstalls files provided for the considered
Packit 802e35
            language, textdomain and category,
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--action <parameter>merge</parameter></option> 
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Merges a POT file with the provided PO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--extract-command <parameter>cmd</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Command to extract translatable strings from an OCaml source file. This command should output
Packit 802e35
            the same marshalled structure as <command>ocaml-xgettext</command>. The best to do is to use the same
Packit 802e35
            build version of <command>ocaml-gettext</command>.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--extract-default-option <parameter>options</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Default options used when extracting translatable strings. These options are <command>camlp4</command> options and 
Packit 802e35
            will be passed to <command>ocaml-xgettext</command> when processing files that don't already have specific 
Packit 802e35
            <command>camlp4</command> options.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--extract-filename-option <parameter>filename</parameter> <parameter>options</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Specific filename <command>camlp4</command> options. It is used when extracting strings from the specified filename. It
Packit 802e35
            overrides default <command>camlp4</command> options.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--extract-pot <parameter>filename</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            POT file to write when extracting translatable strings.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--compile-output <parameter>filename</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            MO file to write when compiling a PO file. If not provided, the output will be the name of the PO file with 
Packit 802e35
            ".mo" extension.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--install-language <parameter>language</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Language to use when installing a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--install-category <parameter>category</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Category to use when installing a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--install-textdomain <parameter>textdomain</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Textdomain to use when installing a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--install-destdir <parameter>dirname</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Base directory to use when installing a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--uninstall-language <parameter>language</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Language to use when uninstalling a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--uninstall-category <parameter>category</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Category to use when uninstalling a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--uninstall-textdomain <parameter>textdomain</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Textdomain to use when uninstalling a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--uninstall-orgdir <parameter>dirname</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Base directory used when uninstalling a MO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--merge-pot <parameter>filename</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            POT file to use as a master for merging PO file.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--merge-backup-extension <parameter>extension</parameter></option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Backup extension to use when moving PO file which have been merged.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--version</option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Return version information on ocaml-gettext.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>--short-version</option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Returns only the version of ocaml-gettext. The return is made to be easily parseable by <command>configure</command>
Packit 802e35
            script. The output of this command will always be the shortest version string, made of numeric characters (0-9) and 
Packit 802e35
            ".". The version strings should be compared considering that a version A is greater than a version B if there is a 
Packit 802e35
            number between two "." of A that is greater than B the corresponding number, beginning at the right of the string. 
Packit 802e35
            For example: 0.14 is greater than 0.13.1.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
      <varlistentry>
Packit 802e35
        <term>
Packit 802e35
          <option>-help</option> 
Packit 802e35
        </term>
Packit 802e35
        <term>
Packit 802e35
          <option>--help</option>
Packit 802e35
        </term>
Packit 802e35
        <listitem>
Packit 802e35
          <para>
Packit 802e35
            Displays the help about the <command>ocaml-gettext</command> command.
Packit 802e35
          </para>
Packit 802e35
        </listitem>
Packit 802e35
      </varlistentry>
Packit 802e35
    </variablelist>
Packit 802e35
  </refsect1>
Packit 802e35
Packit 802e35
  <refsect1>
Packit 802e35
    
Packit 802e35
      href="ocaml-gettext-options.xml"
Packit 802e35
      xmlns:xi="http://www.w3.org/2001/XInclude"
Packit 802e35
      xpointer="xpointer(id('ocaml-gettext-options-description')/node())" />
Packit 802e35
  </refsect1>
Packit 802e35
  
Packit 802e35
  <refsect1>
Packit 802e35
    <title>NOTES</title>
Packit 802e35
    <para>
Packit 802e35
      Options <option>--uninstall-language</option>, <option>--uninstall-textdomain</option>,
Packit 802e35
      <option>--install-language</option> and <option>--install-textdomain</option> could be 
Packit 802e35
      guessed from the filename provided. You must be aware that these options can conflict with the fact that you 
Packit 802e35
      provide several files to install. For example, if you provide a textdomain, you should either install several 
Packit 802e35
      MO files which filenames only reflect the language or only one MO file if you also provide a language. For
Packit 802e35
      example, you can execute 
Packit 802e35
      <command>ocaml-gettext 
Packit 802e35
        <option>--install-textdomain <parameter>mytextdomain</parameter></option>
Packit 802e35
        <parameter><filename>fr.po</filename></parameter> 
Packit 802e35
        <parameter><filename>de.po</filename></parameter>
Packit 802e35
      </command> 
Packit 802e35
      without problem, but you cannot execute
Packit 802e35
      <command>ocaml-gettext 
Packit 802e35
        <option>--install-textdomain <parameter>mytextdomain</parameter></option>
Packit 802e35
        <option>--install-language <parameter>fr</parameter></option>
Packit 802e35
        <parameter><filename>fr.po</filename></parameter> 
Packit 802e35
        <parameter><filename>de.po</filename></parameter>
Packit 802e35
      </command>. This restriction is due to the fact that you should not over specified file installation.
Packit 802e35
    </para>
Packit 802e35
    <para>
Packit 802e35
      Rules for guessing the language/textdomain are: language[.textdomain].mo. For a full automated install
Packit 802e35
      without giving any hints, through command line options, you should name your file 
Packit 802e35
      <filename>fr.mytextdomain.mo</filename> or <filename>de.mytextdomain.mo</filename>.
Packit 802e35
    </para>
Packit 802e35
  </refsect1>
Packit 802e35
  <refsect1>
Packit 802e35
    <title>SEE ALSO</title>
Packit 802e35
  
Packit 802e35
    <para>
Packit 802e35
      <citerefentry>
Packit 802e35
        <refentrytitle><command>ocaml-xgettext</command></refentrytitle>
Packit 802e35
        <manvolnum>1</manvolnum>
Packit 802e35
      </citerefentry>
Packit 802e35
    </para>
Packit 802e35
    <para>
Packit 802e35
      <citerefentry>
Packit 802e35
        <refentrytitle>ocaml-gettext</refentrytitle>
Packit 802e35
        <manvolnum>5</manvolnum>
Packit 802e35
      </citerefentry>
Packit 802e35
    </para>
Packit 802e35
  </refsect1>
Packit 802e35
</refentry>