[gnome-characters] build: Switch to gettext from intltool



commit 53ac35a132ff169d656fec6884a160a74037b59b
Author: Daiki Ueno <dueno src gnome org>
Date:   Thu Aug 25 16:34:06 2016 +0200

    build: Switch to gettext from intltool

 Makefile.am      |   42 +++++++++++++++++++++++++++++
 configure.ac     |    3 +-
 data/Makefile.am |   10 ++++---
 po/Makevars      |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in   |   10 +++---
 5 files changed, 133 insertions(+), 10 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9aa4bd6..6e2d4a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,7 @@ MAINTAINERCLEANFILES = \
 GITIGNOREFILES = \
        .anjuta \
        .anjuta_sym_db.db \
+       ABOUT-NLS \
        m4/intltool.m4 \
        m4/libtool.m4 \
        m4/lt* \
@@ -29,6 +30,47 @@ GITIGNOREFILES = \
        m4/introspection.m4 \
        m4/nls.m4 \
        m4/pkg.m4 \
+       m4/codeset.m4 \
+       m4/extern-inline.m4 \
+       m4/fcntl-o.m4 \
+       m4/gettext.m4 \
+       m4/glib-2.0.m4 \
+       m4/glibc2.m4 \
+       m4/glibc21.m4 \
+       m4/iconv.m4 \
+       m4/intdiv0.m4 \
+       m4/intl.m4 \
+       m4/intldir.m4 \
+       m4/intlmacosx.m4 \
+       m4/intmax.m4 \
+       m4/inttypes-pri.m4 \
+       m4/inttypes_h.m4 \
+       m4/lcmessage.m4 \
+       m4/lib-ld.m4 \
+       m4/lib-link.m4 \
+       m4/lib-prefix.m4 \
+       m4/lock.m4 \
+       m4/longlong.m4 \
+       m4/po.m4 \
+       m4/printf-posix.m4 \
+       m4/progtest.m4 \
+       m4/size_max.m4 \
+       m4/stdint_h.m4 \
+       m4/threadlib.m4 \
+       m4/uintmax_t.m4 \
+       m4/visibility.m4 \
+       m4/wchar_t.m4 \
+       m4/wint_t.m4 \
+       m4/xsize.m4 \
+       po/Rules-quot \
+       po/boldquot.sed \
+       po/en@boldquot.header \
+       po/en@quot.header \
+       po/insert-header.sin \
+       po/quot.sed \
+       po/remove-potcdate.sed \
+       po/remove-potcdate.sin \
+       po/stamp-po \
        gllib/Makefile \
        gllib/Makefile.in \
        gllib/**/*.lo \
diff --git a/configure.ac b/configure.ac
index fe68fc1..fb3158a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,8 @@ GETTEXT_PACKAGE=$PACKAGE_NAME
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
                    [The prefix for our gettext translation domains.])
-IT_PROG_INTLTOOL([0.50.1])
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.8])
 
 AC_PROG_CC
 gl_EARLY
diff --git a/data/Makefile.am b/data/Makefile.am
index ce11934..8115716 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -16,7 +16,8 @@ resource_DATA = org.gnome.Characters.data.gresource org.gnome.Characters.Backgro
 appsdir = $(datadir)/applications
 apps_DATA = org.gnome.Characters.desktop
 
-@INTLTOOL_DESKTOP_RULE@
+org.gnome.Characters.desktop: org.gnome.Characters.desktop.in
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 gsettings_SCHEMAS = org.gnome.Characters.gschema.xml
 
@@ -24,8 +25,8 @@ gsettings_SCHEMAS = org.gnome.Characters.gschema.xml
 
 appstream_XML = org.gnome.Characters.appdata.xml
 
-@APPSTREAM_XML_RULES@
-@INTLTOOL_XML_RULE@
+org.gnome.Characters.appdata.xml: org.gnome.Characters.appdata.xml.in
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 
 org.gnome.Characters.service: org.gnome.Characters.service.in
        $(AM_V_GEN) sed \
@@ -57,6 +58,8 @@ EXTRA_DIST = \
        org.gnome.Characters.appdata.xml.in \
        $(app_resource_files) \
        ShellSearchProvider2.xml \
+       $(apps_DATA) \
+       $(appstream_XML) \
        $(NULL)
 
 CLEANFILES = \
@@ -66,7 +69,6 @@ CLEANFILES = \
        org.gnome.Characters.BackgroundService.data.gresource \
        org.gnome.Characters.appdata.xml \
        org.gnome.Characters.appdata.valid \
-       $(apps_DATA) \
        *.valid \
        gschemas.compiled \
        $(NULL)
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..579ebd1
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,78 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty.  If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU =
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context.  Possible values are "yes" and "no".  Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+#   --previous            to keep previous msgids of translated messages,
+#   --quiet               to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed.  Possible values are "yes" and "no".  Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = no
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist".  Possible values are "yes" and
+# "no".  Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = no
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0a2ebdd..0626769 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,8 +1,8 @@
-[type: gettext/glade]data/app-menu.ui
-[type: gettext/glade]data/characterlist.ui
-[type: gettext/glade]data/character.ui
-[type: gettext/glade]data/mainwindow.ui
-[type: gettext/glade]data/menu.ui
+data/app-menu.ui
+data/characterlist.ui
+data/character.ui
+data/mainwindow.ui
+data/menu.ui
 data/org.gnome.Characters.appdata.xml.in
 data/org.gnome.Characters.desktop.in
 data/org.gnome.Characters.gschema.xml


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