[gnome-disk-utility] Stop using intltool



commit 1913caacb0ad0d5a6129ce9436c4fb94d3c4e4a7
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Nov 10 14:06:03 2016 -0600

    Stop using intltool

 autogen.sh                                |    1 -
 configure.ac                              |    6 +-
 data/Makefile.am                          |   12 +++-
 data/gnome-disk-image-mounter.desktop.in  |    1 +
 data/gnome-disk-image-writer.desktop.in   |    1 +
 data/org.gnome.DiskUtility.appdata.xml.in |   16 +++---
 data/org.gnome.DiskUtility.desktop.in     |    8 ++-
 po/Makevars                               |   78 +++++++++++++++++++++++++++++
 po/POTFILES.in                            |   44 ++++++++---------
 9 files changed, 126 insertions(+), 41 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 0f80d5d..0f50916 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
 
 cd $olddir
diff --git a/configure.ac b/configure.ac
index 54970ac..5d4b517 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,11 +118,11 @@ if test -z "$XSLTPROC"; then
   AC_MSG_ERROR([xsltproc is needed])
 fi
 
-AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
-IT_PROG_INTLTOOL([0.50.2])
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.8])
 
 GETTEXT_PACKAGE=gnome-disk-utility
-AC_SUBST([GETTEXT_PACKAGE])
+AC_SUBST([GETTEXT_PACKAGE], [gnome-disk-utility])
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])
 
 AC_CONFIG_FILES([
diff --git a/data/Makefile.am b/data/Makefile.am
index a98df81..7be7a3e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -11,6 +11,9 @@ desktop_in_files =                            \
 
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
+$(desktop_DATA): $(desktop_in_files)
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
 dbusservicedir = $(datadir)/dbus-1/services
 dbusservice_DATA = org.gnome.DiskUtility.service
 
@@ -26,13 +29,16 @@ gsettings_SCHEMAS =                                                 \
        org.gnome.settings-daemon.plugins.gdu-sd.gschema.xml    \
        $(NULL)
 
+@GSETTINGS_RULES@
+
 appstream_in_files = org.gnome.DiskUtility.appdata.xml.in
 appstream_XML = $(appstream_in_files:.xml.in=.xml)
 
+$(appstream_XML): $(appstream_in_files)
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
 @APPSTREAM_XML_RULES@
-@INTLTOOL_DESKTOP_RULE@
-@INTLTOOL_XML_RULE@
-@GSETTINGS_RULES@
+
 
 DISTCHECK_CONFIGURE_FLAGS == --enable-appdata-check
 
diff --git a/data/gnome-disk-image-mounter.desktop.in b/data/gnome-disk-image-mounter.desktop.in
index 1a586f4..7face19 100644
--- a/data/gnome-disk-image-mounter.desktop.in
+++ b/data/gnome-disk-image-mounter.desktop.in
@@ -2,6 +2,7 @@
 _Name=Disk Image Mounter
 _Comment=Mount Disk Images
 Exec=gnome-disk-image-mounter %U
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=drive-removable-media
 MimeType=application/x-cd-image;application/x-raw-disk-image;
 Terminal=false
diff --git a/data/gnome-disk-image-writer.desktop.in b/data/gnome-disk-image-writer.desktop.in
index b26a2ac..ec6799e 100644
--- a/data/gnome-disk-image-writer.desktop.in
+++ b/data/gnome-disk-image-writer.desktop.in
@@ -2,6 +2,7 @@
 _Name=Disk Image Writer
 _Comment=Write Disk Images to Devices
 Exec=gnome-disks --restore-disk-image %U
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=drive-removable-media
 MimeType=application/x-cd-image;application/x-raw-disk-image;application/x-raw-disk-image-xz-compressed;
 Terminal=false
diff --git a/data/org.gnome.DiskUtility.appdata.xml.in b/data/org.gnome.DiskUtility.appdata.xml.in
index 4eb2cd9..00a9d5e 100644
--- a/data/org.gnome.DiskUtility.appdata.xml.in
+++ b/data/org.gnome.DiskUtility.appdata.xml.in
@@ -4,23 +4,23 @@
   <id>org.gnome.DiskUtility.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+</project_license>
-  <_name>GNOME Disks</_name>
-  <_summary>Disk management utility for GNOME</_summary>
+  <name>GNOME Disks</name>
+  <summary>Disk management utility for GNOME</summary>
   <description>
-    <_p>
+    <p>
       Disks provides an easy way to inspect, format, partition, and configure disks
       and block devices.
-    </_p>
-    <_p>
+    </p>
+    <p>
       Using Disks, you can view SMART data, manage RAID devices, benchmark physical
       disks, and image USB sticks. Tasks are executed in the background, even after
       the application has been closed by the user.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot type="default">
       <image>https://git.gnome.org/browse/gnome-disk-utility/plain/data/appdata-screenshot.png</image>
-      <_caption>An easy way to manage your disks</_caption>
+      <caption>An easy way to manage your disks</caption>
     </screenshot>
   </screenshots>
   <url type="homepage">https://wiki.gnome.org/Design/Apps/Disks</url>
@@ -32,7 +32,7 @@
     <kudo>ModernToolkit</kudo>
   </kudos>
   <translation type="gettext">gnome-disk-utility</translation>
-  <_developer_name>The GNOME Project</_developer_name>
+  <developer_name>The GNOME Project</developer_name>
   <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-disk-utility</url>
   <url type="donation">https://www.gnome.org/friends/</url>
   <url type="help">https://help.gnome.org/users/gnome-help/stable/disk.html</url>
diff --git a/data/org.gnome.DiskUtility.desktop.in b/data/org.gnome.DiskUtility.desktop.in
index 7416752..8becfaf 100644
--- a/data/org.gnome.DiskUtility.desktop.in
+++ b/data/org.gnome.DiskUtility.desktop.in
@@ -1,8 +1,10 @@
 [Desktop Entry]
-_Name=Disks
-_Comment=Manage Drives and Media
-_Keywords=disk;drive;volume;harddisk;hdd;disc;cdrom;dvd;partition;iso;image;backup;restore;benchmark;raid;luks;encryption;S.M.A.R.T.;smart;
+Name=Disks
+Comment=Manage Drives and Media
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list 
MUST also end with a semicolon!
+Keywords=disk;drive;volume;harddisk;hdd;disc;cdrom;dvd;partition;iso;image;backup;restore;benchmark;raid;luks;encryption;S.M.A.R.T.;smart;
 Exec=gnome-disks
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=gnome-disks
 Terminal=false
 Type=Application
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..6800e27
--- /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 = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 
--keyword=g_dngettext:2,3 --add-comments
+
+# 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 = no
+
+# 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 = yes
+
+# 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 76f68ed..79d2c7f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,3 @@
-[encoding: UTF-8]
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
 data/gnome-disk-image-mounter.desktop.in
@@ -32,27 +31,26 @@ src/disks/gduvolumegrid.c
 src/disks/gduwindow.c
 src/disks/gduxzdecompressor.c
 src/disks/main.c
-[type: gettext/glade]src/disks/ui/about-dialog.ui
-[type: gettext/glade]src/disks/ui/app-menu.ui
-[type: gettext/glade]src/disks/ui/benchmark-dialog.ui
-[type: gettext/glade]src/disks/ui/change-passphrase-dialog.ui
-[type: gettext/glade]src/disks/ui/create-disk-image-dialog.ui
-[type: gettext/glade]src/disks/ui/create-partition-dialog.ui
-[type: gettext/glade]src/disks/ui/disk-settings-dialog.ui
-[type: gettext/glade]src/disks/ui/disks.ui
-[type: gettext/glade]src/disks/ui/edit-crypttab-dialog.ui
-[type: gettext/glade]src/disks/ui/edit-dos-partition-dialog.ui
-[type: gettext/glade]src/disks/ui/edit-filesystem-dialog.ui
-[type: gettext/glade]src/disks/ui/edit-fstab-dialog.ui
-[type: gettext/glade]src/disks/ui/edit-gpt-partition-dialog.ui
-[type: gettext/glade]src/disks/ui/edit-partition-dialog.ui
-[type: gettext/glade]src/disks/ui/erase-multiple-disks-dialog.ui
-[type: gettext/glade]src/disks/ui/filesystem-create.ui
-[type: gettext/glade]src/disks/ui/format-disk-dialog.ui
-[type: gettext/glade]src/disks/ui/format-volume-dialog.ui
-[type: gettext/glade]src/disks/ui/restore-disk-image-dialog.ui
-[type: gettext/glade]src/disks/ui/smart-dialog.ui
-[type: gettext/glade]src/disks/ui/unlock-device-dialog.ui
+src/disks/ui/about-dialog.ui
+src/disks/ui/app-menu.ui
+src/disks/ui/benchmark-dialog.ui
+src/disks/ui/change-passphrase-dialog.ui
+src/disks/ui/create-disk-image-dialog.ui
+src/disks/ui/create-partition-dialog.ui
+src/disks/ui/disk-settings-dialog.ui
+src/disks/ui/disks.ui
+src/disks/ui/edit-crypttab-dialog.ui
+src/disks/ui/edit-dos-partition-dialog.ui
+src/disks/ui/edit-filesystem-dialog.ui
+src/disks/ui/edit-fstab-dialog.ui
+src/disks/ui/edit-gpt-partition-dialog.ui
+src/disks/ui/edit-partition-dialog.ui
+src/disks/ui/erase-multiple-disks-dialog.ui
+src/disks/ui/filesystem-create.ui
+src/disks/ui/format-disk-dialog.ui
+src/disks/ui/format-volume-dialog.ui
+src/disks/ui/restore-disk-image-dialog.ui
+src/disks/ui/smart-dialog.ui
+src/disks/ui/unlock-device-dialog.ui
 src/libgdu/gduutils.c
 src/notify/gdusdmonitor.c
-[type: gettext/ini]src/notify/org.gnome.SettingsDaemon.DiskUtilityNotify.desktop.in


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