diff options
author | Badlop <badlop@process-one.net> | 2008-08-17 16:35:58 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2008-08-17 16:35:58 +0000 |
commit | 61a639d5d99416cdb5743413230fb9ddc36ecf91 (patch) | |
tree | 48c8678173ee05be1dbbb7bee0668b6e41d4aa90 /doc | |
parent | * src/msgs/sv.msg: Fixed formatting typos (diff) |
* contrib/extract_translations/extract_translations.erl: Use
Gettext PO for translators, export to ejabberd MSG (EJAB-468)
* contrib/extract_translations/prepare-translation.sh: Likewise
* doc/guide.tex: Likewise
* doc/guide.html: Likewise
* src/Makefile.in: New option 'make translations'
* src/msgs/ejabberd.pot: Template translation file
* src/msgs/*.po: Generated from old MSG files
* src/msgs/*.msg: Automatic exported from PO files
SVN Revision: 1527
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guide.html | 10 | ||||
-rw-r--r-- | doc/guide.tex | 13 |
2 files changed, 21 insertions, 2 deletions
diff --git a/doc/guide.html b/doc/guide.html index 413a3597..42325933 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -1137,7 +1137,7 @@ To set Russian as default language: <PRE CLASS="verbatim">{language, "ru"}. </PRE></LI><LI CLASS="li-itemize">To set Spanish as default language: <PRE CLASS="verbatim">{language, "es"}. -</PRE></LI></UL><P> <A NAME="includeconfigfile"></A> </P><!--TOC subsection Include Additional Configuration Files--> +</PRE></LI></UL><P>Translators and developers can check details in Appendix <A HREF="#i18ni10n">A</A>.</P><P> <A NAME="includeconfigfile"></A> </P><!--TOC subsection Include Additional Configuration Files--> <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc28">3.1.8</A>  <A HREF="#includeconfigfile">Include Additional Configuration Files</A></H3><!--SEC END --><P> <A NAME="includeconfigfile"></A> </P><P>The option <TT>include_config_file</TT> in a configuration file instructs <TT>ejabberd</TT> to include other configuration files immediately.</P><P>The basic usage is: </P><PRE CLASS="verbatim">{include_config_file, <filename>}. @@ -3246,7 +3246,13 @@ so it is important to use it with extremely care. There are some simple and safe examples in the article <A HREF="http://www.ejabberd.im/interconnect-erl-nodes">Interconnecting Erlang Nodes</A></P><P>To exit the shell, close the window or press the keys: control+c control+c.</P><P> <A NAME="i18ni10n"></A> </P><!--TOC chapter Internationalization and Localization--> <H1 CLASS="chapter"><!--SEC ANCHOR --><A NAME="htoc88">Appendix A</A>  <A HREF="#i18ni10n">Internationalization and Localization</A></H1><!--SEC END --><P> <A NAME="i18ni10n"></A> -</P><P>All built-in modules support the <TT>xml:lang</TT> attribute inside IQ queries. +</P><P>The source code of <TT>ejabberd</TT> supports localization. +The translators can edit the Gettext PO files using any capable program (KBabel, Lokalizer, Poedit...) or a simple text editor.</P><P>Then <A HREF="http://www.gnu.org/software/gettext/">Gettext</A> +is used to extract, update and export the language files to the MSG format read by <TT>ejabberd</TT>. +To perform those management tasks, in the <TT>src/</TT> directory execute <TT>make translations</TT>. +The translatable strings are extracted from source code to generate the file <TT>ejabberd.pot</TT>. +This file is merged with each <TT>*.po</TT> language file to produce updated language files. +Finally those <TT>*.po</TT> files are exported to <TT>*.msg</TT> files, that have a format easily readable by <TT>ejabberd</TT>.</P><P>All built-in modules support the <TT>xml:lang</TT> attribute inside IQ queries. Figure <A HREF="#fig:discorus">A.1</A>, for example, shows the reply to the following query: </P><PRE CLASS="verbatim"><iq id='5' to='example.org' diff --git a/doc/guide.tex b/doc/guide.tex index afee3376..3c0f8591 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -1409,6 +1409,9 @@ Examples: \end{verbatim} \end{itemize} +Translators and developers can check details in Appendix \ref{i18ni10n}. + + \makesubsection{includeconfigfile}{Include Additional Configuration Files} \ind{options!includeconfigfile}\ind{includeconfigfile} @@ -4263,6 +4266,16 @@ To exit the shell, close the window or press the keys: control+c control+c. \makechapter{i18ni10n}{Internationalization and Localization} \ind{xml:lang}\ind{internationalization}\ind{localization}\ind{i18n}\ind{l10n} +The source code of \ejabberd{} supports localization. +The translators can edit the Gettext PO files using any capable program (KBabel, Lokalizer, Poedit...) or a simple text editor. + +Then \footahref{http://www.gnu.org/software/gettext/}{Gettext} +is used to extract, update and export the language files to the MSG format read by \ejabberd{}. +To perform those management tasks, in the \term{src/} directory execute \term{make translations}. +The translatable strings are extracted from source code to generate the file \term{ejabberd.pot}. +This file is merged with each \term{*.po} language file to produce updated language files. +Finally those \term{*.po} files are exported to \term{*.msg} files, that have a format easily readable by \ejabberd{}. + All built-in modules support the \texttt{xml:lang} attribute inside IQ queries. Figure~\ref{fig:discorus}, for example, shows the reply to the following query: \begin{verbatim} |