[gnome-flashback/wip/segeiger/inputmethods: 2/4] use upstream gettext



commit ffabcd9738ca064036cb212d42e44e2576d542b9
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Sep 12 23:52:37 2015 +0300

    use upstream gettext

 Makefile.am                                      |   11 ++
 autogen.sh                                       |    1 -
 configure.ac                                     |    5 +-
 data/Makefile.am                                 |   33 +++----
 data/gnome-flashback-compiz.desktop.in.in        |    4 +-
 data/gnome-flashback-compiz.session.in           |    2 +-
 data/gnome-flashback-init.desktop.in             |    2 +-
 data/gnome-flashback-metacity.desktop.in.in      |    4 +-
 data/gnome-flashback-metacity.session.in         |    2 +-
 data/gnome-flashback-nm-applet.desktop.in        |    4 +-
 data/gnome-flashback-screensaver.desktop.in      |    4 +-
 data/gnome-flashback.desktop.in                  |    2 +-
 data/org.gnome.gnome-flashback.gschema.xml       |  111 ++++++++++++++++++++++
 data/org.gnome.gnome-flashback.gschema.xml.in.in |   93 ------------------
 po/Makevars                                      |   81 ++++++++++++++++
 po/POTFILES.in                                   |    9 +-
 po/POTFILES.skip                                 |    3 -
 17 files changed, 238 insertions(+), 133 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index df1274f..c5ab006 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,9 +11,20 @@ MAINTAINERCLEANFILES = \
        $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
        $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
        `find "m4" -type f -name "*.m4" -print` \
+       $(srcdir)/ABOUT-NLS \
        $(srcdir)/INSTALL \
+       $(srcdir)/build-aux/ \
        $(srcdir)/config.h.in~ \
        $(srcdir)/configure \
+       $(srcdir)/po/Makevars.template \
+       $(srcdir)/po/Rules-quot \
+       $(srcdir)/po/boldquot.sed \
+       $(srcdir)/po/en boldquot header \
+       $(srcdir)/po/en quot header \
+       $(srcdir)/po/insert-header.sin \
+       $(srcdir)/po/quot.sed \
+       $(srcdir)/po/remove-potcdate.sin \
+       $(srcdir)/po/stamp-po \
        $(NULL)
 
 EXTRA_DIST = \
diff --git a/autogen.sh b/autogen.sh
index 3802d95..888910b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -31,7 +31,6 @@ fi
 
 set -x
 aclocal --install || exit 1
-intltoolize --force --copy --automake || exit 1
 autoreconf --verbose --force --install -Wno-portability || exit 1
 { set +x; } 2>/dev/null
 
diff --git a/configure.ac b/configure.ac
index ba2a489..ecd6872 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,7 @@ AX_IS_RELEASE([git-directory])
 
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
 
 AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar -Wno-portability])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -24,10 +25,12 @@ LT_INIT
 
 AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
 
+AM_GNU_GETTEXT_VERSION([0.19.4])
+AM_GNU_GETTEXT([external])
+
 GETTEXT_PACKAGE=gnome-flashback
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define the gettext package to be used])
-IT_PROG_INTLTOOL([0.40.6])
 
 GLIB_GSETTINGS
 
diff --git a/data/Makefile.am b/data/Makefile.am
index 4b7cf25..352a98d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,6 +1,9 @@
+NULL =
+
 libexec_SCRIPTS = \
        gnome-flashback-compiz \
-       gnome-flashback-metacity
+       gnome-flashback-metacity \
+       $(NULL)
 
 gnome-flashback-compiz: Makefile
        $(AM_V_GEN) (echo '#! /bin/sh' && echo 'exec gnome-session --session=gnome-flashback-compiz "$$@"') > 
$@
@@ -17,7 +20,8 @@ sessiondir       = $(datadir)/gnome-session/sessions
 session_in_files = gnome-flashback-compiz.session.in gnome-flashback-metacity.session.in
 session_DATA     = $(session_in_files:.session.in=.session)
 
-%.session: %.session.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d 
-u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+%.session: %.session.in
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -o $ -t -d $(top_srcdir)/po && mv $ -t $@
 
 autostartdir       = $(sysconfdir)/xdg/autostart
 autostart_in_files = gnome-flashback-nm-applet.desktop.in gnome-flashback-screensaver.desktop.in
@@ -35,37 +39,30 @@ xsession_DATA        = $(xsession_in_files:.desktop.in=.desktop)
 %.desktop.in: %.desktop.in.in
        $(AM_V_GEN) sed -e 's,[ ]libexecdir[@],$(libexecdir),g' < $< > $@
 
-%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d 
-u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
-
- INTLTOOL_XML_NOMERGE_RULE@
-
-gsettings_schemas_in_in = org.gnome.gnome-flashback.gschema.xml.in.in
-gsettings_schemas_in    = $(gsettings_schemas_in_in:.xml.in.in=.xml.in)
-gsettings_SCHEMAS       = $(gsettings_schemas_in:.xml.in=.xml)
-
-%.gschema.xml.in: %.gschema.xml.in.in Makefile
-       $(AM_V_GEN) $(SED) -e 's^\ GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@
+%.desktop: %.desktop.in
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -o $ -t -d $(top_srcdir)/po && mv $ -t $@
 
+gsettings_SCHEMAS = org.gnome.gnome-flashback.gschema.xml
 @GSETTINGS_RULES@
 
 EXTRA_DIST = \
        $(autostart_in_files) \
        $(desktop_in_files) \
-       $(gsettings_schemas_in_in) \
        $(menu_DATA) \
        $(session_in_files) \
-       $(xsession_in_in_files)
+       $(xsession_in_in_files) \
+       $(gsettings_SCHEMAS) \
+       $(NULL)
 
 CLEANFILES = \
        $(autostart_DATA) \
        $(desktop_DATA) \
        gnome-flashback-compiz \
        gnome-flashback-metacity \
-       $(gsettings_schemas_in) \
-       $(gsettings_SCHEMAS) \
-       *.gschema.valid \
        $(session_DATA) \
        $(xsession_in_files) \
-       $(xsession_DATA)
+       $(xsession_DATA) \
+       *.gschema.valid \
+       $(NULL)
 
 -include $(top_srcdir)/git.mk
diff --git a/data/gnome-flashback-compiz.desktop.in.in b/data/gnome-flashback-compiz.desktop.in.in
index c53e8b7..6ac3986 100644
--- a/data/gnome-flashback-compiz.desktop.in.in
+++ b/data/gnome-flashback-compiz.desktop.in.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
-_Name=GNOME Flashback (Compiz)
-_Comment=This session logs you into GNOME Flashback with Compiz
+Name=GNOME Flashback (Compiz)
+Comment=This session logs you into GNOME Flashback with Compiz
 Exec= libexecdir@/gnome-flashback-compiz
 TryExec=compiz
 Icon=
diff --git a/data/gnome-flashback-compiz.session.in b/data/gnome-flashback-compiz.session.in
index f093310..6123ceb 100644
--- a/data/gnome-flashback-compiz.session.in
+++ b/data/gnome-flashback-compiz.session.in
@@ -1,3 +1,3 @@
 [GNOME Session]
-_Name=GNOME Flashback (Compiz)
+Name=GNOME Flashback (Compiz)
 
RequiredComponents=gnome-flashback-init;gnome-flashback;gnome-panel;compiz;gnome-settings-daemon;nautilus-classic;
diff --git a/data/gnome-flashback-init.desktop.in b/data/gnome-flashback-init.desktop.in
index e07ac22..d7b4fbe 100644
--- a/data/gnome-flashback-init.desktop.in
+++ b/data/gnome-flashback-init.desktop.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
 Type=Application
-_Name=GNOME Flashback Initialization
+Name=GNOME Flashback Initialization
 Exec=gnome-flashback --initialize
 OnlyShowIn=GNOME-Flashback;
 NoDisplay=true
diff --git a/data/gnome-flashback-metacity.desktop.in.in b/data/gnome-flashback-metacity.desktop.in.in
index 42b67cc..ab8a48d 100644
--- a/data/gnome-flashback-metacity.desktop.in.in
+++ b/data/gnome-flashback-metacity.desktop.in.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
-_Name=GNOME Flashback (Metacity)
-_Comment=This session logs you into GNOME Flashback with Metacity
+Name=GNOME Flashback (Metacity)
+Comment=This session logs you into GNOME Flashback with Metacity
 Exec= libexecdir@/gnome-flashback-metacity
 TryExec=metacity
 Icon=
diff --git a/data/gnome-flashback-metacity.session.in b/data/gnome-flashback-metacity.session.in
index 5fea7e0..0895cd3 100644
--- a/data/gnome-flashback-metacity.session.in
+++ b/data/gnome-flashback-metacity.session.in
@@ -1,3 +1,3 @@
 [GNOME Session]
-_Name=GNOME Flashback (Metacity)
+Name=GNOME Flashback (Metacity)
 
RequiredComponents=gnome-flashback-init;gnome-flashback;gnome-panel;metacity;gnome-settings-daemon;nautilus-classic;
diff --git a/data/gnome-flashback-nm-applet.desktop.in b/data/gnome-flashback-nm-applet.desktop.in
index 2516df5..741b33d 100644
--- a/data/gnome-flashback-nm-applet.desktop.in
+++ b/data/gnome-flashback-nm-applet.desktop.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
-_Name=Network (GNOME Flashback)
-_Comment=Manage your network connections
+Name=Network (GNOME Flashback)
+Comment=Manage your network connections
 Icon=nm-device-wireless
 Exec=nm-applet
 TryExec=nm-applet
diff --git a/data/gnome-flashback-screensaver.desktop.in b/data/gnome-flashback-screensaver.desktop.in
index 827a04f..d7da784 100644
--- a/data/gnome-flashback-screensaver.desktop.in
+++ b/data/gnome-flashback-screensaver.desktop.in
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Type=Application
-_Name=Screensaver (GNOME Flashback)
-_Comment=Launch screensaver and locker program
+Name=Screensaver (GNOME Flashback)
+Comment=Launch screensaver and locker program
 Icon=preferences-desktop-screensaver
 Exec=gnome-screensaver
 TryExec=gnome-screensaver
diff --git a/data/gnome-flashback.desktop.in b/data/gnome-flashback.desktop.in
index 44487fe..35f5405 100644
--- a/data/gnome-flashback.desktop.in
+++ b/data/gnome-flashback.desktop.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
 Type=Application
-_Name=GNOME Flashback
+Name=GNOME Flashback
 Exec=gnome-flashback
 OnlyShowIn=GNOME-Flashback;
 NoDisplay=true
diff --git a/data/org.gnome.gnome-flashback.gschema.xml b/data/org.gnome.gnome-flashback.gschema.xml
new file mode 100644
index 0000000..783db3c
--- /dev/null
+++ b/data/org.gnome.gnome-flashback.gschema.xml
@@ -0,0 +1,111 @@
+<schemalist gettext-domain="gnome-flashback">
+  <schema id="org.gnome.gnome-flashback" path="/org/gnome/gnome-flashback/">
+
+    <key name="automount-manager" type="b">
+      <default>true</default>
+      <summary>Automount manager</summary>
+      <description>If set to true, then GNOME Flashback application will be used to automount removable 
media.</description>
+    </key>
+
+    <key name="bluetooth-applet" type="b">
+      <default>true</default>
+      <summary>Bluetooth applet</summary>
+      <description>If set to true, then GNOME Flashback application will be used to show a Bluetooth 
applet.</description>
+    </key>
+
+    <key name="desktop-background" type="b">
+      <default>true</default>
+      <summary>Desktop background</summary>
+      <description>If set to true, then GNOME Flashback application will be used to draw the desktop 
background.</description>
+    </key>
+
+    <key name="display-config" type="b">
+      <default>true</default>
+      <summary>Display configuration</summary>
+      <description>If set to true, then GNOME Flashback application will be used to provide the display 
configuration.</description>
+    </key>
+
+    <key name="end-session-dialog" type="b">
+      <default>true</default>
+      <summary>End session dialog</summary>
+      <description>If set to true, then GNOME Flashback application will be used to show the end session 
dialog.</description>
+    </key>
+
+    <key name="idle-monitor" type="b">
+      <default>true</default>
+      <summary>Idle monitor</summary>
+      <description>If set to true, then GNOME Flashback application will be used for user activity 
monitoring.</description>
+    </key>
+
+    <key name="polkit" type="b">
+      <default>true</default>
+      <summary>Authentication agent for polkit</summary>
+      <description>This is the same authentication agent that was provided by PolicyKit-gnome.</description>
+    </key>
+
+    <key name="power-applet" type="b">
+      <default>true</default>
+      <summary>Power applet</summary>
+      <description>If set to true, then GNOME Flashback application will be used to show a power 
applet.</description>
+    </key>
+
+    <key name="screencast" type="b">
+      <default>true</default>
+      <summary>Screencasts</summary>
+      <description>If set to true, then GNOME Flashback application will be used to record the 
screen.</description>
+    </key>
+
+    <key name="screenshot" type="b">
+      <default>true</default>
+      <summary>Screenshots</summary>
+      <description>If set to true, then GNOME Flashback application will be used to take 
screenshots.</description>
+    </key>
+
+    <key name="shell" type="b">
+      <default>true</default>
+      <summary>Shell</summary>
+      <description>If set to true, then GNOME Flashback application will be used as a shell.</description>
+    </key>
+
+    <key name="sound-applet" type="b">
+      <default>true</default>
+      <summary>Sound applet</summary>
+      <description>If set to true, then GNOME Flashback application will be used to show a sound applet. 
This is the same sound applet that used to be a part of GNOME Control Center.</description>
+    </key>
+
+    <key name="workarounds" type="b">
+      <default>true</default>
+      <summary>Workarounds</summary>
+      <description>If set to true, then GNOME Flashback application will use workarounds to fix 
bugs.</description>
+    </key>
+
+    <child name="desktop-background" schema="org.gnome.gnome-flashback.desktop-background"/>
+    <child name="workarounds" schema="org.gnome.gnome-flashback.workarounds"/>
+  </schema>
+
+  <schema id="org.gnome.gnome-flashback.desktop-background" 
path="/org/gnome/gnome-flashback/desktop-background/">
+
+    <key name="fade" type="b">
+      <default>true</default>
+      <summary>Fade the background on change</summary>
+      <description>If set to true, then fade effect will be used to change the desktop 
background.</description>
+    </key>
+
+  </schema>
+
+  <schema id="org.gnome.gnome-flashback.workarounds" path="/org/gnome/gnome-flashback/workarounds/">
+
+    <key name="fix-app-menu" type="b">
+      <default>true</default>
+      <summary>Fix missing app menu button</summary>
+      <description>If set to true, then gnome-flashback will force Gtk/ShellShowsAppMenu to FALSE. Disable 
if you want to use gnome-settings-daemon overrides in xsettings plugin for 'Gtk/ShellShowsAppMenu' 
property.</description>
+    </key>
+
+    <key name="fix-button-layout" type="s">
+      <default>'menu:minimize,maximize,close'</default>
+      <summary>Fix wrong button layout</summary>
+      <description>If set to non-empty string, then gnome-flashback will force Gtk/DecorationLayout to value 
set by this setting. Set to empty string if you want to use gnome-settings-daemon overrides in xsettings 
plugin for 'Gtk/DecorationLayout' property.</description>
+    </key>
+
+  </schema>
+</schemalist>
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..f002562
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,81 @@
+# 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=_ --flag=_:1:pass-c-format \
+  --keyword=N_ --flag=N_:1:pass-c-format \
+  --flag=error:3:c-format --flag=error_at_line:5:c-format
+
+# 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 bd13592..cbf8e20 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,5 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
-[encoding: UTF-8]
 data/gnome-flashback.desktop.in
 data/gnome-flashback-compiz.desktop.in.in
 data/gnome-flashback-compiz.session.in
@@ -9,19 +8,19 @@ data/gnome-flashback-metacity.desktop.in.in
 data/gnome-flashback-metacity.session.in
 data/gnome-flashback-nm-applet.desktop.in
 data/gnome-flashback-screensaver.desktop.in
-data/org.gnome.gnome-flashback.gschema.xml.in.in
+data/org.gnome.gnome-flashback.gschema.xml
 gnome-flashback/gf-main.c
 gnome-flashback/libautomount-manager/gsd-automount-manager.c
 gnome-flashback/libautomount-manager/gsd-autorun.c
 gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c
-[type: gettext/glade]gnome-flashback/libdisplay-config/flashback-confirm-dialog.ui
+gnome-flashback/libdisplay-config/flashback-confirm-dialog.ui
 gnome-flashback/libdisplay-config/flashback-display-config.c
 gnome-flashback/libend-session-dialog/flashback-inhibit-dialog.c
-[type: gettext/glade]gnome-flashback/libend-session-dialog/flashback-inhibit-dialog.ui
+gnome-flashback/libend-session-dialog/flashback-inhibit-dialog.ui
 gnome-flashback/libpolkit/flashback-authenticator.c
 gnome-flashback/libpolkit/flashback-listener.c
 gnome-flashback/libpolkit/flashback-polkit-dialog.c
-[type: gettext/glade]gnome-flashback/libpolkit/flashback-polkit-dialog.ui
+gnome-flashback/libpolkit/flashback-polkit-dialog.ui
 gnome-flashback/libpower-applet/gf-power-applet.c
 gnome-flashback/libsound-applet/gf-sound-applet.c
 gnome-flashback/libsound-applet/gvc-channel-bar.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 99b59c9..0fb3682 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,5 +1,2 @@
 # List of source files that should *not* be translated.
 # Please keep this file sorted alphabetically.
-data/gnome-flashback-compiz.desktop.in
-data/gnome-flashback-metacity.desktop.in
-data/org.gnome.gnome-flashback.gschema.xml.in


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