[gnome-devel-docs] Add translating stub pages
- From: Michael Hill <mdhill src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-devel-docs] Add translating stub pages
- Date: Tue, 18 Jun 2013 18:24:10 +0000 (UTC)
commit 50fcf0fbdbc932b630c04eb2a9a04e2402c1ec2b
Author: Michael Hill <mdhillca gmail com>
Date: Mon Jun 17 17:57:15 2013 -0400
Add translating stub pages
.../translating-messages.page.stub | 52 ++++++++++++++++++++
new-platform-overview/translating-tools.page.stub | 26 ++++++++++
new-platform-overview/translating.page.stub | 33 ++++++++++++
3 files changed, 111 insertions(+), 0 deletions(-)
---
diff --git a/new-platform-overview/translating-messages.page.stub
b/new-platform-overview/translating-messages.page.stub
new file mode 100644
index 0000000..4c24a69
--- /dev/null
+++ b/new-platform-overview/translating-messages.page.stub
@@ -0,0 +1,52 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ type="topic" style="task"
+ id="translating-messages">
+ <info>
+
+ <revision version="0.1" date="2013-06-17" status="stub"/>
+
+ <credit type="author copyright">
+ <name>Michael Hill</name>
+ <email>mdhillca gmail com</email>
+ <years>2013</years>
+ </credit>
+
+ <desc></desc>
+ <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
+ </info>
+
+ <title>Preparing messages for translation</title>
+
+ <p>The messages in your application are set up for translation into other
+ languages . </p>
+
+ <steps>
+ <item><p>Wrap messages or <em>string literals</em> in your code with the
+ '_()' macro. This macro is defined in the <file>glib/gi18n.h</file> header
+ file, which must be included at the top of your application source.</p>
+ <note style="advanced">
+ <p>This is the syntax for the macro using C. Check with the
+ documentation for your language for the syntax you need to use.</p>
+ </note>
+ <p>Your wrapped strings should look like this:</p>
+ <code>_("Press a key to continue")</code>
+ <p>This marks the strings as translatable, and at runtime calls
+ <app>gettext</app> to substitute the translated strings.</p>
+ </item>
+ <item><p>(other syntax to indicate plural).</p></item>
+ <item><p>(set up in the build system to run automatically).</p></item>
+ <item><p>Create a <file>po/</file> subdirectory in your project
+ directory.</p></item>
+ <item><p>Tell <app>gettext</app> which files have translatable strings by
+ listing those files in <file>po/POTFILES.in</file>. List files
+ <em>without</em> translatable strings in
+ <file>po/POTFILES.skip</file>.</p></item>
+ <item><p>Run <cmd>make projectname.pot</cmd> in the
+ <file>po</file> directory. This runs <cmd>intltool-extract</cmd> to extract
+ the translatable strings and put them in a po template (POT) file.</p></item>
+ </steps>
+
+ <p>At this point the strings are ready for
+ <link xref="translating-tools">translation</link>.</p>
+
+</page>
diff --git a/new-platform-overview/translating-tools.page.stub
b/new-platform-overview/translating-tools.page.stub
new file mode 100644
index 0000000..394f424
--- /dev/null
+++ b/new-platform-overview/translating-tools.page.stub
@@ -0,0 +1,26 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ type="topic" style="task"
+ id="translating-tools">
+ <info>
+ <revision version="0.1" date="2013-06-18" status="stub"/>
+
+ <credit type="author copyright">
+ <name>Michael Hill</name>
+ <email>mdhillca gmail com</email>
+ <years>2013</years>
+ </credit>
+
+ <desc></desc>
+ </info>
+
+ <title>Translation tools</title>
+
+ <p>At this point the strings are ready for translation, or
+ <em>localization</em>. For projects hosted in the GNOME Git repositories,
+ this task is handled by the GNOME Translation Project.
+ <link href="http://projects.gnome.org/gtranslator/"><app>Gtranslator</app></link>
+ is a GNOME tool for editing <file>.po</file> files. Other online and offline
+ localization tools include <app>Transifex</app>, <app>Virtaal</app>,
+ <app>KBabel</app> or <app>Pootle</app>.</p>
+
+</page>
diff --git a/new-platform-overview/translating.page.stub b/new-platform-overview/translating.page.stub
new file mode 100644
index 0000000..9941503
--- /dev/null
+++ b/new-platform-overview/translating.page.stub
@@ -0,0 +1,33 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ type="topic" style="task"
+ id="translating">
+ <info>
+ <revision version="0.1" date="2013-06-17" status="stub"/>
+
+ <credit type="author copyright">
+ <name>Michael Hill</name>
+ <email>mdhillca gmail com</email>
+ <years>2013</years>
+ </credit>
+
+ <desc>
+ </desc>
+
+ <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
+ </info>
+
+ <title>Making your application translatable</title>
+
+ <p>The messages in your application can be translated into other languages if
+ they are set up properly. This is done with
+ <link href="http://freedesktop.org/wiki/Software/intltool/"><app>intltool</app></link>,
+ using the
+ <link href="http://www.gnu.org/software/gettext/manual/gettext.html"><app>GNU
+ gettext</app></link> conventions.</p>
+
+ <p>Tutorial <link xref="translating-messages">here</link>.</p>
+
+ <p>Translating <link xref="translating-messages">help</link> for your
+ application.</p>
+
+</page>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]