mirror of
https://github.com/gryf/window-maker.github.io.git
synced 2025-12-17 19:20:17 +01:00
Deploy gryf/window-maker.github.io to github.com/gryf/window-maker.github.io.git:gh-pages
This commit is contained in:
424
docs/wmaker_i18n.html
Normal file
424
docs/wmaker_i18n.html
Normal file
@@ -0,0 +1,424 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Window Maker: Internationalisation</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="/style.css" media="screen">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, minimumscale=1.0, maximum-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">
|
||||
<span class="first">Window</span><span class="second">Maker</span>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<aside>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li id="dock">
|
||||
<a href="#"></a>
|
||||
</li>
|
||||
<li id="home" title="Home">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li id="news" title="News">
|
||||
<a href="/news">News</a>
|
||||
</li>
|
||||
<li id="docs" title="Documentation">
|
||||
<a href="/docs">Documentation</a>
|
||||
</li>
|
||||
<li id="mail" title="Mailing lists">
|
||||
<a href="/lists">Mailing</a>
|
||||
</li>
|
||||
<li id="devel" title="Development">
|
||||
<a href="/dev">Development</a>
|
||||
</li>
|
||||
<li id="screenshots" title="Screenshots">
|
||||
<a href="/screenshots">Screenshots</a>
|
||||
</li>
|
||||
<li id="themes" title="Themes">
|
||||
<a href="/themes">Themes</a>
|
||||
</li>
|
||||
<li id="links" title="Links">
|
||||
<a href="/links">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<article>
|
||||
|
||||
<div class="document" id="window-maker-internationalisation">
|
||||
<h1 class="title">Window Maker Internationalisation</h1>
|
||||
|
||||
<p>A guide to enable support for language translations in WINDOW MAKER and to the
|
||||
contributors who want to help translating.</p>
|
||||
<div class="contents topic" id="table-of-contents">
|
||||
<p class="topic-title first">Table of Contents</p>
|
||||
<ul class="auto-toc simple">
|
||||
<li>
|
||||
<p><a class="reference internal" href="#enabling-languages-support" id="id5"><span class="sectnum">1</span> Enabling Languages support</a></p>
|
||||
<ul class="auto-toc">
|
||||
<li><p><a class="reference internal" href="#getting-the-list-of-supported-languages" id="id6"><span class="sectnum">1.1</span> Getting the list of supported languages</a></p></li>
|
||||
<li><p><a class="reference internal" href="#translations-for-menus" id="id7"><span class="sectnum">1.2</span> Translations for Menus</a></p></li>
|
||||
<li><p><a class="reference internal" href="#setting-linguas-at-system-level" id="id8"><span class="sectnum">1.3</span> Setting <span class="docutils literal">LINGUAS</span> at system level</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a class="reference internal" href="#choosing-the-language" id="id9"><span class="sectnum">2</span> Choosing the Language</a></p></li>
|
||||
<li><p><a class="reference internal" href="#troubleshooting" id="id10"><span class="sectnum">3</span> Troubleshooting</a></p></li>
|
||||
<li>
|
||||
<p><a class="reference internal" href="#contribute-to-translations" id="id11"><span class="sectnum">4</span> Contribute to Translations</a></p>
|
||||
<ul class="auto-toc">
|
||||
<li><p><a class="reference internal" href="#install-the-latest-sources" id="id12"><span class="sectnum">4.1</span> Install the latest sources</a></p></li>
|
||||
<li><p><a class="reference internal" href="#updating-the-translations" id="id13"><span class="sectnum">4.2</span> Updating the Translations</a></p></li>
|
||||
<li><p><a class="reference internal" href="#translate-the-man-pages" id="id14"><span class="sectnum">4.3</span> Translate the Man Pages</a></p></li>
|
||||
<li><p><a class="reference internal" href="#checking-the-result" id="id15"><span class="sectnum">4.4</span> Checking the Result</a></p></li>
|
||||
<li><p><a class="reference internal" href="#submitting-your-contribution" id="id16"><span class="sectnum">4.5</span> Submitting your Contribution</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>This manual is for Window Maker, version git#next.</p>
|
||||
<hr class="docutils">
|
||||
<div class="section" id="enabling-languages-support">
|
||||
<h1>
|
||||
<span class="sectnum">1</span> Enabling Languages support</h1>
|
||||
<p>WINDOW MAKER has the possibility to be translated in many languages, but by
|
||||
default none of them will be installed, and the support for translation will
|
||||
not be compiled.</p>
|
||||
<p>To enable the translation capabilities, you have to specify which language(s)
|
||||
you want to be installed: this is done with the variable <span class="docutils literal">LINGUAS</span> when
|
||||
running the <span class="docutils literal">configure</span> script. This variable should contain the
|
||||
space-separated list of languages you want to install.</p>
|
||||
<p>You could for instance enable both French (<span class="docutils literal">fr</span>) and Dutch (<span class="docutils literal">nl</span>) with
|
||||
this:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="gp">$</span> ./configure <span class="nv">LINGUAS</span><span class="o">=</span><span class="s2">"fr nl"</span></code></pre>
|
||||
<p>You can of course add any other option that you want to the <span class="docutils literal">configure</span>
|
||||
command. From the moment you specify the variable, the <span class="docutils literal">configure</span> script
|
||||
will check that you have the appropriate dependencies for this (basically the
|
||||
<span class="docutils literal">gettext</span> function and the <span class="docutils literal">libintl</span> library); when you run <span class="docutils literal">make</span> to
|
||||
compile the project, it will also compile the translation (<span class="docutils literal">mo</span> files) for
|
||||
the language(s) you asked (if available, of course), and during <span class="docutils literal">make install</span> it will install them in the usual directory.</p>
|
||||
<p>The installation directory can be changed with the standard option
|
||||
<span class="docutils literal"><span class="pre">--localedir</span></span> to the <span class="docutils literal">configure</span> script, the default path being
|
||||
<span class="docutils literal"><span class="pre">PREFIX/share/locale/<lang>/LC_MESSAGES</span></span>).</p>
|
||||
<div class="section" id="getting-the-list-of-supported-languages">
|
||||
<h2>
|
||||
<span class="sectnum">1.1</span> Getting the list of supported languages</h2>
|
||||
<p>The naming convention for the languages follows the <span class="docutils literal">ISO <span class="pre">639-1</span></span> standard, for
|
||||
which you can find a summary list in the <a class="reference external" href="https://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html">GNU gettext manual</a>.</p>
|
||||
<p>But as WINDOW MAKER does not support all of them, the <span class="docutils literal">configure</span> script will
|
||||
print a warning for each language you specify that it does not know, and sum up
|
||||
at the end the list of enabled languages that will be installed.</p>
|
||||
<p>There is a non-standard possibility to set <span class="docutils literal">LINGUAS</span> to <span class="docutils literal">list</span>, in which
|
||||
case the <span class="docutils literal">configure</span> script will provide you the list of languages it
|
||||
supports, and stop:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">./configure LINGUAS="list"</span></code></pre>
|
||||
<p>There is also another non-standard possibility to enable all the languages that
|
||||
WINDOW MAKER supports by setting <span class="docutils literal">LINGUAS</span> to <span class="docutils literal">*</span>. This is an internal
|
||||
trick implemented so the development team can have the command <span class="docutils literal">make distcheck</span> include some checks on translations:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">./configure LINGUAS='*'</span></code></pre>
|
||||
</div>
|
||||
<div class="section" id="translations-for-menus">
|
||||
<h2>
|
||||
<span class="sectnum">1.2</span> Translations for Menus</h2>
|
||||
<p>In order to propose an <em>Application Menu</em> (also called <em>Root Menu</em>) that is
|
||||
also translated in the language of the interface, WINDOW MAKER implements two
|
||||
complementary mechanisms:</p>
|
||||
<p>The first, always enabled when i18n support is enabled, is to look for the menu
|
||||
file containing the name of the locale. For example, if the file is called
|
||||
<span class="docutils literal">menu</span> and the language is set as <span class="docutils literal"><span class="pre">LANG=fr_FR.utf-8</span></span>, then WINDOW MAKER
|
||||
will search for, and use the first match found:</p>
|
||||
<ul class="simple">
|
||||
<li><p><span class="docutils literal"><span class="pre">menu.fr_FR.utf-8</span></span></p></li>
|
||||
<li><p><span class="docutils literal">menu.fr_FR</span></p></li>
|
||||
<li><p><span class="docutils literal">menu.fr</span></p></li>
|
||||
<li><p><span class="docutils literal">menu</span></p></li>
|
||||
</ul>
|
||||
<p>The second possibility, which is not enabled by default, is to be able to use a
|
||||
custom <span class="docutils literal">po</span> file which contains the translations for the text of the menu.
|
||||
This feature is enabled at compile time, using the option
|
||||
<span class="docutils literal"><span class="pre">--with-menu-textdomain</span></span> to the <span class="docutils literal">configure</span> script. For example, if you
|
||||
specify:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">./configure --with-menu-textdomain=WMMenu</span></code></pre>
|
||||
<p>then the translations for the menu will be searched in the file <span class="docutils literal">WMMenu.mo</span>
|
||||
located at the standard location, the default path being
|
||||
<cite>PREFIX/share/locale/[lang]/LC_MESSAGES/WMMenu.mo</cite>.</p>
|
||||
<p>If you do not enable the feature (the default behaviour, or with an explicit
|
||||
<span class="docutils literal"><span class="pre">--without-menu-textdomain</span></span>), then WINDOW MAKER will <strong>not</strong> try to translate
|
||||
the strings, even using its own domain file (<span class="docutils literal">WindowMaker.mo</span>).</p>
|
||||
</div>
|
||||
<div class="section" id="setting-linguas-at-system-level">
|
||||
<h2>
|
||||
<span class="sectnum">1.3</span> Setting <span class="docutils literal">LINGUAS</span> at system level</h2>
|
||||
<p>As the variable <span class="docutils literal">LINGUAS</span> is quite standard, you also have the possibility to
|
||||
set its value in the <span class="docutils literal">config.site</span> file for AUTOCONF. This file can be placed
|
||||
in one of these paths:</p>
|
||||
<ul class="simple">
|
||||
<li><p><span class="docutils literal">PREFIX/share/config.site</span></p></li>
|
||||
<li><p><span class="docutils literal">PREFIX/etc/config.site</span></p></li>
|
||||
</ul>
|
||||
<p>This way, the same language list will be used for all the programs that use
|
||||
AUTOCONF that you would compile. Please note that if you also specify a value
|
||||
on the command line, it will have precedence over the value in that file.</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="docutils">
|
||||
<div class="section" id="choosing-the-language">
|
||||
<h1>
|
||||
<span class="sectnum">2</span> Choosing the Language</h1>
|
||||
<p>If you have compiled and installed WINDOW MAKER with support for your language,
|
||||
the effective translation is done is the very same way as any other application
|
||||
on an UNIX system, you just have to set the shell variable <span class="docutils literal">LANG</span> to your
|
||||
language before <span class="docutils literal">wmaker</span> is started. In <span class="docutils literal">sh</span> type of shell (SH, KSH, BASH,
|
||||
...), this is done for example with (<span class="docutils literal">fr</span> is for French):</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">export LANG=fr</span></code></pre>
|
||||
<p>There is also a command line option <span class="docutils literal"><span class="pre">--locale</span></span> for WINDOW MAKER which may be
|
||||
used to set the language:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">wmaker --locale fr</span></code></pre>
|
||||
<p>When using this option, WINDOW MAKER will use the locale you specified,
|
||||
redefining the <span class="docutils literal">LANG</span> environment variable to this value so all program
|
||||
started from WINDOW MAKER will inherit its value.</p>
|
||||
<p>If your system is using SYSTEMD, you can also configure the locale at system
|
||||
level using the command:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">localectl set-locale LANG=fr</span></code></pre>
|
||||
<p>You can check if the current value is properly supported with the command:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">locale</span></code></pre>
|
||||
<p>If this does not work, you may need first to activate the support for your
|
||||
locale in the system; you can get the list of currently enabled locales with
|
||||
the command:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">locale -a</span></code></pre>
|
||||
<p>You should be able to enable a new language support by editing the file
|
||||
<span class="docutils literal">/etc/locale.gen</span> to uncomment the locale(s) you need (by removing the <span class="docutils literal">#</span>
|
||||
character and space(s) in front of it, and by running the command
|
||||
<span class="docutils literal"><span class="pre">locale-gen</span></span> as root.</p>
|
||||
<p>For further information, you may wish to read dedicated documentation, for
|
||||
example from <a class="reference external" href="http://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html">the Linux Documentation Project</a> or through pages like
|
||||
<a class="reference external" href="http://www.shellhacks.com/en/HowTo-Change-Locale-Language-and-Character-Set-in-Linux">Shell Hacks' note on Changing Locale</a>.</p>
|
||||
</div>
|
||||
<hr class="docutils">
|
||||
<div class="section" id="troubleshooting">
|
||||
<h1>
|
||||
<span class="sectnum">3</span> Troubleshooting</h1>
|
||||
<p>If I18N support does not work for you, check these:</p>
|
||||
<ul>
|
||||
<li><p>the <span class="docutils literal">LANG</span> environment variable is set to your locale, and
|
||||
the locale is supported by your OS's locale or X's locale
|
||||
emulation. you can display all supported locales by
|
||||
executing "<span class="docutils literal">locale <span class="pre">-a</span></span>" command if it is available; you
|
||||
can check if your locale is supported by X's locale emulation,
|
||||
see <span class="docutils literal">/usr/share/X11/locale/locale.alias</span></p></li>
|
||||
<li><p>check if you are using an appropriate fonts for the locale you chose. If
|
||||
you're using a font set that has a different encoding than the one used by
|
||||
XLIB or LIBC, bad things can happen. Try specifically putting the encoding in
|
||||
the <span class="docutils literal">LANG</span> variable, like <span class="docutils literal"><span class="pre">ru_RU.KOI8-R</span></span>. Again, see
|
||||
<span class="docutils literal">/usr/share/X11/locale/locale.alias</span></p></li>
|
||||
<li>
|
||||
<p>the fonts you're using support your locale. if your font setting on
|
||||
<span class="docutils literal">$HOME/GNUstep/Defaults/WindowMaker</span> is like...</p>
|
||||
<pre class="code ini highlight literal-block"><code><span class="na">WindowTitleFont</span> <span class="o">=</span> <span class="s">"Trebuchet MS:bold:pixelsize=12";</span>
|
||||
<span class="na">MenuTitleFont</span> <span class="o">=</span> <span class="s">"Trebuchet MS:bold:pixelsize=12";</span></code></pre>
|
||||
<p>then you can't display Asian languages (<span class="docutils literal">ja</span>, <span class="docutils literal">ko</span>, <span class="docutils literal">ch</span>, ...)
|
||||
characters using <span class="docutils literal">Trebuchet MS</span>. A font that is guaranteed to work for any
|
||||
language is <span class="docutils literal">sans</span> (or <span class="docutils literal"><span class="pre">sans-serif</span></span>). <span class="docutils literal">sans</span> is not a font itself, but
|
||||
an alias which points to multiple fonts and will load the first in that list
|
||||
that has the ability to show glyphs in your language. If you don't know a
|
||||
font that is suited for your language you can always set all your fonts to
|
||||
something like:</p>
|
||||
<pre class="code ini highlight literal-block"><code><span class="na">"sans:pixelsize</span><span class="o">=</span><span class="s">12"</span></code></pre>
|
||||
<p>However, please note that if your font is something like:</p>
|
||||
<pre class="code ini highlight literal-block"><code><span class="na">"Trebuchet MS,sans serif:pixelsize</span><span class="o">=</span><span class="s">12"</span></code></pre>
|
||||
<p>this will not be able to display Asian languages if any of the previous fonts
|
||||
before sans are installed. This is because unlike the proper font pickup that
|
||||
<span class="docutils literal">sans</span> guarantees for your language, this construct only allows a font
|
||||
fallback mechanism, which tries all the fonts in the list in order, until it
|
||||
finds one that is available, even if it doesn't support your language.</p>
|
||||
<p>Also you need to change font settings in style files in the
|
||||
<span class="docutils literal">$HOME/Library/WindowMaker/Style</span> directory.</p>
|
||||
</li>
|
||||
<li><p>the <span class="docutils literal">LC_CTYPE</span> environment variable is unset or it has the correct value.
|
||||
If you don't know what is the correct value, unset it.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr class="docutils">
|
||||
<div class="section" id="contribute-to-translations">
|
||||
<h1>
|
||||
<span class="sectnum">4</span> Contribute to Translations</h1>
|
||||
<p>You may have noticed that many translations are not up to date, because the
|
||||
code has evolved but the persons who initially contributed may not have had the
|
||||
time to continue, so any help is welcome.</p>
|
||||
<p>Since WINDOW MAKER 0.95.7 there are some targets to <span class="docutils literal">make</span> that can help you
|
||||
in that task.</p>
|
||||
<div class="section" id="install-the-latest-sources">
|
||||
<h2>
|
||||
<span class="sectnum">4.1</span> Install the latest sources</h2>
|
||||
<p>If you want to contribute, the first step is get the development branch of the code;
|
||||
this is done using <span class="docutils literal">git</span>. If you do not feel confident at all with using
|
||||
<span class="docutils literal">git</span>, you may also try to ask for a <em>snapshot</em> on the developer's mailing
|
||||
list <a class="reference external" href="mailto:wmaker-dev@lists.windowmaker.org">wmaker-dev@lists.windowmaker.org</a>. With <span class="docutils literal">git</span> the procedure is:</p>
|
||||
<pre class="code bash highlight literal-block"><code><span class="c1"># Get your working copy of the sources
|
||||
</span>git clone git://repo.or.cz/wmaker-crm.git
|
||||
|
||||
<span class="c1"># Go into that newly created directory
|
||||
</span><span class="nb">cd</span> wmaker-crm
|
||||
|
||||
<span class="c1"># Switch to the branch where everything happens
|
||||
</span>git checkout next
|
||||
|
||||
<span class="c1"># Generate the configuration script
|
||||
</span>./autogen.sh</code></pre>
|
||||
<p>Now you should have an up-to-date working copy ready to be compiled; you will
|
||||
not need to go the full way but you should run the <span class="docutils literal">configure</span> script, so it
|
||||
will create the <span class="docutils literal">Makefile`s</span>, and you may want to compile the code once so it
|
||||
will not do it again automatically later while you are doing something else:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="gp">#</span> Setup the build, enabling at least the language you want to work on
|
||||
<span class="go">./configure LINGUAS="<list of iso 639 country code>"
|
||||
|
||||
</span><span class="gp">#</span> Compile the code once
|
||||
<span class="go">make</span></code></pre>
|
||||
</div>
|
||||
<div class="section" id="updating-the-translations">
|
||||
<h2>
|
||||
<span class="sectnum">4.2</span> Updating the Translations</h2>
|
||||
<p>The typical process for translating one program is:</p>
|
||||
<ul class="simple">
|
||||
<li><p>generate a POT file (PO Template): this is done with <span class="docutils literal">xgettext</span> which
|
||||
searches for all the strings from the sources that can be translated;</p></li>
|
||||
<li><p>update the PO file for your language: this is done with <span class="docutils literal">msgmerge</span> which
|
||||
compares the PO file and aligns it to the latest template;</p></li>
|
||||
<li><p>edit the new PO file: this is done by you with your favourite editor, to add
|
||||
the missing <span class="docutils literal">msgstr</span>, review the possible <em>fuzzy matches</em>, …</p></li>
|
||||
<li><p>check the PO file: unfortunately there is no definitive method for this;</p></li>
|
||||
<li><p>submit your contribution to the project: this is done with <span class="docutils literal">git</span>.</p></li>
|
||||
</ul>
|
||||
<p>In WINDOW MAKER, you have actually 4 <span class="docutils literal">po</span> files to take care of:</p>
|
||||
<ul class="simple">
|
||||
<li><p><span class="docutils literal"><span class="pre">po/<LANG>.po</span></span>: for WINDOW MAKER itself</p></li>
|
||||
<li><p><span class="docutils literal"><span class="pre">WPrefs.app/po/<LANG>.po</span></span>: for the Preference Editor program</p></li>
|
||||
<li><p><span class="docutils literal"><span class="pre">WINGs/po/<LANG>.po</span></span>: for the graphic toolkit library</p></li>
|
||||
<li><p><span class="docutils literal"><span class="pre">util/po/<LANG>.po</span></span>: for the command-line tools of WINDOW MAKER</p></li>
|
||||
</ul>
|
||||
<p>As stated previously, there is a <span class="docutils literal">make</span> target that can help you to
|
||||
automatically generate the POT and update the PO for these 4 cases:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">make update-lang PO=<LANG></span></code></pre>
|
||||
<p>Once run, it will have updated as needed the 4 <span class="docutils literal">po</span> files against the latest
|
||||
source code. You may wish to use the command <span class="docutils literal">git gui</span> to view the changes;
|
||||
you can now edit the files to complete the translation, correct them, remove
|
||||
deprecated stuff, … Please note that the encoding should be set to <em>UTF-8</em> as
|
||||
this is now the standard.</p>
|
||||
<!-- TODO: change mailing list address -->
|
||||
<p>If you think an error message is too obscure, just ask on the developer mailing
|
||||
list <a class="reference external" href="mailto:wmaker-dev@lists.windowmaker.org">wmaker-dev@lists.windowmaker.org</a>: in addition to clarifications
|
||||
there's even a chance for the original message to be improved!</p>
|
||||
<p>You may find some information on working with <span class="docutils literal">po</span> file in the <a class="reference external" href="https://www.gnu.org/software/gettext/manual/html_node/Editing.html">GNU gettext
|
||||
documentation</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="translate-the-man-pages">
|
||||
<h2>
|
||||
<span class="sectnum">4.3</span> Translate the Man Pages</h2>
|
||||
<p>You may want to extend the translation to the documentation that is provided to
|
||||
users in the form of Unix <em>man pages</em>. The sources of the man pages are located
|
||||
in the <span class="docutils literal">doc/</span> directory; the translation should be placed in the directory
|
||||
<span class="docutils literal">doc/LANG/</span> with the same file name.</p>
|
||||
<!-- TODO: change mailing list address -->
|
||||
<p>The directory will also need a file <span class="docutils literal">Makefile.am</span> which provides the list of
|
||||
man pages to be included in the distribution package and to be installed. You
|
||||
can probably get inspiration from an existing one from another language; if you
|
||||
do not feel confident about it do not hesitate to ask on the project's mailing
|
||||
list (<a class="reference external" href="mailto:wmaker-dev@lists.windowmaker.org">wmaker-dev@lists.windowmaker.org</a>), either for help or to ask someone
|
||||
to make it for you.</p>
|
||||
<p>Please note that although most man pages sources are directly in man page
|
||||
format (<em>nroff</em>, the file extension being a number), a few of them are
|
||||
processed by a script (those with the <span class="docutils literal">.in</span> extension, like <span class="docutils literal">wmaker.in</span>).
|
||||
This is done because in some case we want the man page to reflect the actual
|
||||
compilation options.</p>
|
||||
<p>You may not want to bother with this hassle, in which case you can simply name
|
||||
your translation file with the <span class="docutils literal">.1</span> and remove the special <span class="docutils literal">@keyword@</span>
|
||||
marks. If you are sure you want to keep that processing but do not feel
|
||||
confident about hacking the <span class="docutils literal">Makefile.am</span> do not hesitate to ask on the
|
||||
project's mailing list (<a class="reference external" href="mailto:wmaker-dev@lists.windowmaker.org">wmaker-dev@lists.windowmaker.org</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="checking-the-result">
|
||||
<h2>
|
||||
<span class="sectnum">4.4</span> Checking the Result</h2>
|
||||
<p>In the WINDOW MAKER build tree you also have another target that can help you,
|
||||
it is <span class="docutils literal">make check</span>.</p>
|
||||
<p>At current time, it does not check much, but if during the <span class="docutils literal">make <span class="pre">update-lang</span></span>
|
||||
new <span class="docutils literal">po</span> file have been created you may get some errors, because you have to
|
||||
add these new files to the variable <span class="docutils literal">EXTRA_DIST</span> in the corresponding
|
||||
<span class="docutils literal">Makefile</span>.</p>
|
||||
<p>If you do not feel confident about doing it, do not worry, just tell about it
|
||||
when you submit your work, and some developer on the mailing list will just be
|
||||
happy to do it for you when integrating your valuable contribution (we always
|
||||
like when someone helps making WINDOW MAKER better).</p>
|
||||
</div>
|
||||
<div class="section" id="submitting-your-contribution">
|
||||
<h2>
|
||||
<span class="sectnum">4.5</span> Submitting your Contribution</h2>
|
||||
<p><em>Preliminary Remark</em>: if the update process made changes in a <span class="docutils literal">po</span> file but
|
||||
you did not change any <span class="docutils literal">msgstr</span> content, it is probably a good idea to not
|
||||
submit the changes to that <span class="docutils literal">po</span> file because it would just add noise.</p>
|
||||
<p>When you feel ready to send your changes, the first step is to prepare them.
|
||||
This is done with <span class="docutils literal">git</span>: if you have not run the <span class="docutils literal">git gui</span> previously then
|
||||
it is a good time to do it now. This window offers you the possibility to show
|
||||
your changes and to decide what you want to send.</p>
|
||||
<p>The window is divided in 4 panes:</p>
|
||||
<ul class="simple">
|
||||
<li><p>top-right show the current changes you have selected, for review (and also
|
||||
for cherry-picking stuff if you want to select precisely)</p></li>
|
||||
<li><p>top-left ("Unstaged Changes") the list of files with changes to be send, you
|
||||
can click on the name of the file to see the changes, you can click on the
|
||||
icon of the file if you want to send all the changes in this file; an icon in
|
||||
blue shows a file that have been changed and an icon in black shows a file
|
||||
that is new</p></li>
|
||||
<li><p>bottom-left ("Staged Changes") the list of files with changes that you have
|
||||
chosen to send so far, you can click on the file name to view these changes,
|
||||
you can click on the icon if you want to remove the changes from this file
|
||||
from the list to send</p></li>
|
||||
<li><p>bottom-right ("Commit Message") the message you want to attach to your
|
||||
changes when you submit them to the development team</p></li>
|
||||
</ul>
|
||||
<p>The idea here is to pick your changes to the <span class="docutils literal">po</span> files; for the <em>commit
|
||||
message</em> you may wish to stuck to a simple, single line:</p>
|
||||
<div class="line-block">
|
||||
<div class="line">"Updated translations for <LANG>"</div>
|
||||
</div>
|
||||
<p>The penultimate step is to click on the button <span class="docutils literal">Sign Off</span> (it will add a line
|
||||
in the commit message), and then click on the button <span class="docutils literal">Commit</span>. From this
|
||||
time, the commit message will clear itself and the "Staged Changes" also,
|
||||
showing that your action was done.</p>
|
||||
<p>You may now quit the <span class="docutils literal">git gui</span>, the final step begins by running this
|
||||
command:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">git format-patch HEAD^</span></code></pre>
|
||||
<!-- TODO: change mailing list address -->
|
||||
<p>This will generate a file named like <span class="docutils literal"><span class="pre">0001-updated-translations-for-XX.patch</span></span>
|
||||
which contains your changes, ready for sending. The goal will now be to email
|
||||
this file to <a class="reference external" href="mailto:wmaker-dev@lists.windowmaker.org">wmaker-dev@lists.windowmaker.org</a>. If you feel confident in having
|
||||
<span class="docutils literal">git</span> send it for you, you may want to read the file
|
||||
<span class="docutils literal"><span class="pre">The-perfect-Window-Maker-patch.txt</span></span> to see how to configure <span class="docutils literal">git</span> for
|
||||
mailing, so you can run:</p>
|
||||
<pre class="code console highlight literal-block"><code><span class="go">git send-email 0001-updated-translations-for-XX.patch</span></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<div id="titlebar">
|
||||
<div id="minimize"></div>
|
||||
<div id="titlebar-inner">Window Maker: Internationalisation</div>
|
||||
<div id="close"></div>
|
||||
</div>
|
||||
<div id="resizebar">
|
||||
<div id="resizel"></div>
|
||||
<div id="resizebar-inner">
|
||||
</div>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user