[gnome-user-share/gettext: 22/22] Stop using intltool



commit 49de69f756405ff1cb3f3631dc3c56db60b28a3e
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Mon Jan 14 13:35:00 2019 -0500

    Stop using intltool
    
    modern gettext is sufficient
    
    https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration

 Makefile.am                                        | 10 ---
 configure.ac                                       |  6 +-
 data/Makefile.am                                   | 11 +--
 data/gnome-user-share-webdav.desktop.in.in         |  8 ++-
 ... => org.gnome.desktop.file-sharing.gschema.xml} |  4 +-
 po/Makevars                                        | 78 ++++++++++++++++++++++
 po/POTFILES.in                                     |  2 +-
 po/POTFILES.skip                                   |  3 -
 8 files changed, 91 insertions(+), 31 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5f83339..00f567c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,16 +2,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 SUBDIRS = data po src
 
-EXTRA_DIST =                   \
-       intltool-extract.in     \
-       intltool-merge.in       \
-       intltool-update.in
-
-DISTCLEANFILES =               \
-       intltool-extract        \
-       intltool-merge          \
-       intltool-update
-
 AM_DISTCHECK_CONFIGURE_FLAGS = \
        --disable-schemas-install                                               \
        --with-nautilusdir='$${libdir}/nautilus/extensions-2.0-distcheck'       \
diff --git a/configure.ac b/configure.ac
index add2ca7..708431d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,14 +87,13 @@ if test "x$exec_prefix" = "xNONE"; then
 fi
 
 dnl ==========================================================================
-IT_PROG_INTLTOOL([0.35.0])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
 
 GETTEXT_PACKAGE=gnome-user-share
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],"$GETTEXT_PACKAGE", [The gettext package])
 
-AM_GLIB_GNU_GETTEXT
-
 dnl ==========================================================================
 dnl systemd user unit directory
 PKG_CHECK_EXISTS([systemd],, [AC_MSG_ERROR([systemd development headers not found])])
@@ -186,7 +185,6 @@ fi
 AC_CONFIG_FILES([
 Makefile
 data/Makefile
-data/org.gnome.desktop.file-sharing.gschema.xml.in
 po/Makefile.in
 src/Makefile
 ])
diff --git a/data/Makefile.am b/data/Makefile.am
index 3e2f12c..1efcf0c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,7 +1,8 @@
-@INTLTOOL_DESKTOP_RULE@
 applicationsdir = $(datadir)/applications/
 applications_DATA = $(applications_in_files:.desktop.in=.desktop)
 applications_in_files = gnome-user-share-webdav.desktop.in
+$(applications_DATA): $(applications_in_files)
+       $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 gnome-user-share-webdav.desktop.in: gnome-user-share-webdav.desktop.in.in Makefile
        $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
@@ -9,10 +10,7 @@ gnome-user-share-webdav.desktop.in: gnome-user-share-webdav.desktop.in.in Makefi
 appdir = $(datadir)/gnome-user-share
 app_DATA=dav_user_2.0.conf dav_user_2.2.conf dav_user_2.4.conf dav_groupfile
 
-gsettingsdir = $(datadir)/glib-2.0/schemas
-gsettings_in_files = org.gnome.desktop.file-sharing.gschema.xml.in
-gsettings_DATA = $(gsettings_in_files:.xml.in=.xml)
-@INTLTOOL_XML_NOMERGE_RULE@
+gsettings_SCHEMAS = org.gnome.desktop.file-sharing.gschema.xml
 @GSETTINGS_RULES@
 
 systemdservicedir = $(systemduserunitdir)
@@ -33,10 +31,7 @@ EXTRA_DIST = $(app_DATA)  \
 
 CLEANFILES = $(applications_DATA) \
        $(autostart_DATA) \
-       $(gsettings_DATA) \
        $(systemdservice_DATA) \
        $(applications_in_files)
 
-DISTCLEANFILES = $(gsettings_DATA)
-
 -include $(top_srcdir)/git.mk
diff --git a/data/gnome-user-share-webdav.desktop.in.in b/data/gnome-user-share-webdav.desktop.in.in
index ecb88d4..4e5429d 100644
--- a/data/gnome-user-share-webdav.desktop.in.in
+++ b/data/gnome-user-share-webdav.desktop.in.in
@@ -1,7 +1,9 @@
 [Desktop Entry]
-_Name=Personal File Sharing
-_Comment=Launch Personal File Sharing if enabled
-_Keywords=share;files;http;network;copy;send;
+Name=Personal File Sharing
+Comment=Launch Personal File Sharing if enabled
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list 
MUST also end with a semicolon!
+Keywords=share;files;http;network;copy;send;
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=folder-remote
 Exec=@libexecdir@/gnome-user-share-webdav
 Terminal=false
diff --git a/data/org.gnome.desktop.file-sharing.gschema.xml.in.in 
b/data/org.gnome.desktop.file-sharing.gschema.xml
similarity index 59%
rename from data/org.gnome.desktop.file-sharing.gschema.xml.in.in
rename to data/org.gnome.desktop.file-sharing.gschema.xml
index f387634..c53414e 100644
--- a/data/org.gnome.desktop.file-sharing.gschema.xml.in.in
+++ b/data/org.gnome.desktop.file-sharing.gschema.xml
@@ -2,8 +2,8 @@
 <schema gettext-domain="gnome-user-share" id="org.gnome.desktop.file-sharing" 
path="/org/gnome/desktop/file-sharing/">
        <key name="require-password" type="s">
                <default>'never'</default>
-               <_summary>When to require passwords</_summary>
-               <_description>When to ask for passwords. Possible values are "never", "on_write", and 
"always".</_description>
+               <summary>When to require passwords</summary>
+               <description>When to ask for passwords. Possible values are "never", "on_write", and 
"always".</description>
        </key>
 </schema>
 </schemalist>
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..bde8c0d
--- /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 = The GNOME User Share Developers
+
+# 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 = https://gitlab.gnome.org/GNOME/gnome-user-share/issues
+
+# 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 aa3171f..96ff086 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
-data/org.gnome.desktop.file-sharing.gschema.xml.in.in
+data/org.gnome.desktop.file-sharing.gschema.xml
 data/gnome-user-share-webdav.desktop.in.in
 src/nautilus-share-bar.c
 src/share-extension.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 2e1aa3e..58f9118 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -2,6 +2,3 @@
 # Please keep this file sorted alphabetically.
 data/file-share-properties.ui
 data/gnome-user-share-webdav.desktop.in
-data/org.gnome.desktop.file-sharing.gschema.xml.in
-sub/data/gnome-user-share-webdav.desktop.in
-sub/data/org.gnome.desktop.file-sharing.gschema.xml.in


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