[gtkmm-documentation] Update the Internationalization chapter



commit 152a42f142e9098c04cca3fcd561136d7fe7fe3f
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed Jan 20 16:03:44 2016 +0100

    Update the Internationalization chapter
    
    Replace the deprecated AM_GLIB_GNU_GETTEXT macro by AM_GNU_GETTEXT in
    a code snippet. Show an example of an autogen.sh file. Bug #701908.

 docs/tutorial/C/index-in.docbook |   36 ++++++++++++++++++++++++++++++++++--
 1 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/docs/tutorial/C/index-in.docbook b/docs/tutorial/C/index-in.docbook
index d3cb0ca..3b30315 100644
--- a/docs/tutorial/C/index-in.docbook
+++ b/docs/tutorial/C/index-in.docbook
@@ -6724,13 +6724,27 @@ This example shows how to load a <application>Glade</application> file at runtim
         that you are using <ulink
           url="http://git.gnome.org/browse/gnome-common/tree/autogen.sh";>
           <literal>./autogen.sh</literal> from
-          <application>gnome-common</application></ulink>, which, among other
+          <application>gnome-common</application></ulink>
+        or a similar <literal>autogen.sh</literal> file, which, among other
         things, takes care of some <application>intltool</application>
         initialization.
       </para>
     </note>
 
     <para>
+      An alternative to <application>gnome-common</application>'s
+      <literal>autogen.sh</literal> may look like this:
+    </para>
+    <programlisting>#! /bin/sh -e
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+autoreconf --force --install --verbose --warnings=all "$srcdir"
+echo "Running intltoolize --copy --force --automake"
+intltoolize --copy --force --automake
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"</programlisting>
+
+    <para>
       Create a sub-directory named <literal>po</literal> in your project's root
       directory. This directory will eventually contain all of your
       translations. Within it, create a file named <literal>LINGUAS</literal>
@@ -6797,7 +6811,8 @@ GETTEXT_PACKAGE=programname
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
                    [The domain to use with gettext])
-AM_GLIB_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.17])
 
 PROGRAMNAME_LOCALEDIR=[${datadir}/locale]
 AC_SUBST(PROGRAMNAME_LOCALEDIR)</programlisting>
@@ -6810,6 +6825,13 @@ AC_SUBST(PROGRAMNAME_LOCALEDIR)</programlisting>
     </para>
 
     <para>
+      <literal>AM_GLIB_GNU_GETTEXT</literal> has been an alternative to
+      <literal>AM_GNU_GETTEXT</literal> and <literal>AM_GNU_GETTEXT_VERSION</literal>,
+      but <literal>AM_GLIB_GNU_GETTEXT</literal> is now deprecated, and shall
+      not be used in new code.
+    </para>
+
+    <para>
       In the top-level Makefile.am:
       <itemizedlist>
         <listitem>
@@ -6842,6 +6864,16 @@ AC_SUBST(PROGRAMNAME_LOCALEDIR)</programlisting>
                  po/.intltool-merge-cache</programlisting>
           </para>
         </listitem>
+        <listitem>
+          <para>
+            Depending on the types of files that contain translatable strings,
+            add code such as
+            <programlisting>desktopdir = $(datadir)/applications
+desktop_in_files = programname.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ INTLTOOL_DESKTOP_RULE@</programlisting>
+          </para>
+        </listitem>
       </itemizedlist>
     </para>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]