[gnome-characters/wip/dueno/gettext] build: Stop using intltool



commit c30752432a1a7760c5c7cec1239308fac8cd8c23
Author: Daiki Ueno <dueno src gnome org>
Date:   Wed Oct 7 10:59:00 2015 +0900

    build: Stop using intltool

 Makefile.am                              |   39 ++++++++++++++-
 autogen.sh                               |    1 -
 configure.ac                             |    4 +-
 data/Makefile.am                         |   16 +++++-
 data/org.gnome.Characters.appdata.xml.in |    8 ++--
 data/org.gnome.Characters.desktop.in     |    6 +-
 po/Makevars                              |   78 ++++++++++++++++++++++++++++++
 po/POTFILES.in                           |   10 ++--
 8 files changed, 145 insertions(+), 17 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9aa4bd6..a034950 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,9 +19,9 @@ MAINTAINERCLEANFILES = \
        $(srcdir)/mkinstalldirs
 
 GITIGNOREFILES = \
+       ABOUT-NLS \
        .anjuta \
        .anjuta_sym_db.db \
-       m4/intltool.m4 \
        m4/libtool.m4 \
        m4/lt* \
        m4/appstream-xml.m4 \
@@ -29,6 +29,37 @@ 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/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 \
        gllib/Makefile \
        gllib/Makefile.in \
        gllib/**/*.lo \
@@ -48,6 +79,12 @@ GITIGNOREFILES = \
        gllib/unitypes.h \
        gllib/unused-parameter.h \
        gllib/**/.dirstamp \
+       po/Makevars.template \
+       po/Rules* \
+       po/*.sed \
+       po/*.sin \
+       po/*.header \
+       po/stamp-po \
        rpms/
 
 distdir = $(PACKAGE_TARNAME)-$(VERSION)
diff --git a/autogen.sh b/autogen.sh
index 5316f47..d364b52 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -22,7 +22,6 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
 fi
 
 aclocal --install || exit 1
-intltoolize --force --copy --automake || exit 1
 autoreconf --verbose --force --install -Wno-portability || exit 1
 
 test -z "$GNULIB_SRCDIR" || \
diff --git a/configure.ac b/configure.ac
index 374369c..92e1516 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,9 @@ 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_REQUIRE_VERSION([0.19.6])
+AM_GNU_GETTEXT_VERSION([0.19.6])
 
 AC_PROG_CC
 gl_EARLY
diff --git a/data/Makefile.am b/data/Makefile.am
index ce11934..7c0c204 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,10 @@ gsettings_SCHEMAS = org.gnome.Characters.gschema.xml
 
 appstream_XML = org.gnome.Characters.appdata.xml
 
+org.gnome.Characters.appdata.xml: org.gnome.Characters.appdata.xml.in
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
 @APPSTREAM_XML_RULES@
- INTLTOOL_XML_RULE@
 
 org.gnome.Characters.service: org.gnome.Characters.service.in
        $(AM_V_GEN) sed \
@@ -48,6 +51,7 @@ searchproviderdir = $(datadir)/gnome-shell/search-providers
 dist_searchprovider_DATA = org.gnome.Characters.search-provider.ini
 
 EXTRA_DIST = \
+       org.gnome.Characters.desktop \
        org.gnome.Characters.desktop.in \
        org.gnome.Characters.service.in \
        org.gnome.Characters.BackgroundService.service.in \
@@ -55,6 +59,7 @@ EXTRA_DIST = \
        org.gnome.Characters.BackgroundService.data.gresource.xml \
        $(gsettings_SCHEMAS) \
        org.gnome.Characters.appdata.xml.in \
+       org.gnome.Characters.appdata.xml \
        $(app_resource_files) \
        ShellSearchProvider2.xml \
        $(NULL)
@@ -71,6 +76,13 @@ CLEANFILES = \
        gschemas.compiled \
        $(NULL)
 
+# Ship files generated by msgfmt, so that building from tarball don't
+# require msgfmt.
+MAINTAINERCLEANFILES = \
+       org.gnome.Characters.desktop \
+       org.gnome.Characters.appdata.xml \
+       $(NULL)
+
 # For uninstalled use
 all-local:
        $(GLIB_COMPILE_SCHEMAS) $(builddir)
diff --git a/data/org.gnome.Characters.appdata.xml.in b/data/org.gnome.Characters.appdata.xml.in
index d9b1bbd..768c36c 100644
--- a/data/org.gnome.Characters.appdata.xml.in
+++ b/data/org.gnome.Characters.appdata.xml.in
@@ -5,12 +5,12 @@
   <summary>Character map application</summary>
   <licence>CC0</licence>
   <description>
-    <_p>
+    <p>
       Characters is a simple utility application to find and insert unusual characters.  It allows you to 
quickly find the character you are looking for by searching for keywords.
-    </_p>
-    <_p>
+    </p>
+    <p>
       You can also browse characters by categories, such as Punctuation, Pictures, etc.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot type="default" width="1024" 
height="768">https://raw.github.com/gnome-design-team/gnome-mockups/master/character-map/png/grid.png</screenshot>
diff --git a/data/org.gnome.Characters.desktop.in b/data/org.gnome.Characters.desktop.in
index 72903b3..d874f83 100644
--- a/data/org.gnome.Characters.desktop.in
+++ b/data/org.gnome.Characters.desktop.in
@@ -1,10 +1,10 @@
 [Desktop Entry]
 Type=Application
-_Name=Characters
-_Comment=Utility application to find and insert unusual characters
+Name=Characters
+Comment=Utility application to find and insert unusual characters
 Icon=gnome-characters
 Exec=gapplication launch org.gnome.Characters
 DBusActivatable=true
 StartupNotify=true
 Categories=GNOME;GTK;Utility;X-GNOME-Utilities;
-_Keywords=characters;unicode;
+Keywords=characters;unicode;
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..df09a7b
--- /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_ --from-code=UTF-8
+
+# 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]