[PATCH 1/6] Revert "Use gettext to process glade files."
Chris Lumens
clumens at redhat.com
Wed May 20 14:43:23 UTC 2015
This reverts commit 78a3676e70550cc893238b5047023ea17668c466. RHEL currently
uses an older gettext than anaconda expects, so this patch needs to be
reverted.
Related: rhbz#1196721
---
.gitignore | 1 +
anaconda.spec.in | 5 ++---
configure.ac | 3 +--
po/POTFILES.in | 57 +++++++++++++++++++++++++++-----------------------------
po/Rules-extract | 15 +++++++++++++--
5 files changed, 44 insertions(+), 37 deletions(-)
diff --git a/.gitignore b/.gitignore
index 1f46374..c52ae23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.bak
*.desktop.in.h
*.gir
+*.glade.h
*.la
*.lo
*.o
diff --git a/anaconda.spec.in b/anaconda.spec.in
index c483ec3..62652b8 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -17,9 +17,8 @@ Source0: %{name}-%{version}.tar.bz2
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
-
-# Also update in AM_GNU_GETTEXT_VERSION in configure.ac
-%define gettextver 0.18.3
+%define gettextver 0.18.1
+%define gconfversion 2.28.1
%define intltoolver 0.31.2-3
%define pykickstartver 1.99.63
%define yumver 3.4.3-91
diff --git a/configure.ac b/configure.ac
index 0b1cf8d..2d13172 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,8 +65,7 @@ INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(
AC_SUBST(INTLTOOL_DESKTOP_RULE)
AM_GNU_GETTEXT([external])
-# Also update in gettextver in anaconda.spec.in
-AM_GNU_GETTEXT_VERSION([0.18.3])
+AM_GNU_GETTEXT_VERSION([0.18.1])
# Checks for header files.
AC_PATH_X
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7b5d1ac..8991aa5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -114,39 +114,36 @@ widgets/src/LayoutIndicator.c
widgets/src/glade-adaptor.c
widgets/src/widgets-common.c
-# Interface files.
-pyanaconda/ui/gui/spokes/advanced_user.glade
-pyanaconda/ui/gui/spokes/datetime_spoke.glade
-pyanaconda/ui/gui/spokes/filter.glade
-pyanaconda/ui/gui/spokes/network.glade
-pyanaconda/ui/gui/spokes/software.glade
-pyanaconda/ui/gui/spokes/storage.glade
-pyanaconda/ui/gui/spokes/keyboard.glade
-pyanaconda/ui/gui/spokes/langsupport.glade
-pyanaconda/ui/gui/spokes/password.glade
-pyanaconda/ui/gui/spokes/source.glade
-pyanaconda/ui/gui/spokes/welcome.glade
-pyanaconda/ui/gui/spokes/user.glade
-pyanaconda/ui/gui/spokes/custom.glade
-pyanaconda/ui/gui/spokes/advstorage/fcoe.glade
-pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
-pyanaconda/ui/gui/spokes/advstorage/dasd.glade
-pyanaconda/ui/gui/spokes/lib/cart.glade
-pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
-pyanaconda/ui/gui/spokes/lib/dasdfmt.glade
-pyanaconda/ui/gui/spokes/lib/detailederror.glade
-pyanaconda/ui/gui/spokes/lib/passphrase.glade
-pyanaconda/ui/gui/spokes/lib/refresh.glade
-pyanaconda/ui/gui/spokes/lib/resize.glade
-pyanaconda/ui/gui/spokes/lib/summary.glade
-pyanaconda/ui/gui/spokes/lib/entropy_dialog.glade
-pyanaconda/ui/gui/main.glade
-pyanaconda/ui/gui/hubs/summary.glade
-pyanaconda/ui/gui/hubs/progress.glade
-
# For file types that gettext doesn't understand, list <filename>.h and
# use Rules-extract to extract the strings into a C-style header.
+# Interface files.
+# gettext doesn't fully support glade3
+pyanaconda/ui/gui/spokes/advanced_user.glade.h
+pyanaconda/ui/gui/spokes/datetime_spoke.glade.h
+pyanaconda/ui/gui/spokes/filter.glade.h
+pyanaconda/ui/gui/spokes/network.glade.h
+pyanaconda/ui/gui/spokes/software.glade.h
+pyanaconda/ui/gui/spokes/storage.glade.h
+pyanaconda/ui/gui/spokes/keyboard.glade.h
+pyanaconda/ui/gui/spokes/langsupport.glade.h
+pyanaconda/ui/gui/spokes/password.glade.h
+pyanaconda/ui/gui/spokes/source.glade.h
+pyanaconda/ui/gui/spokes/welcome.glade.h
+pyanaconda/ui/gui/spokes/user.glade.h
+pyanaconda/ui/gui/spokes/custom.glade.h
+pyanaconda/ui/gui/spokes/advstorage/fcoe.glade.h
+pyanaconda/ui/gui/spokes/advstorage/iscsi.glade.h
+pyanaconda/ui/gui/spokes/lib/cart.glade.h
+pyanaconda/ui/gui/spokes/lib/detailederror.glade.h
+pyanaconda/ui/gui/spokes/lib/passphrase.glade.h
+pyanaconda/ui/gui/spokes/lib/refresh.glade.h
+pyanaconda/ui/gui/spokes/lib/resize.glade.h
+pyanaconda/ui/gui/spokes/lib/summary.glade.h
+pyanaconda/ui/gui/main.glade.h
+pyanaconda/ui/gui/hubs/summary.glade.h
+pyanaconda/ui/gui/hubs/progress.glade.h
+
# liveinst source files
data/liveinst/liveinst.desktop.in.h
data/liveinst/console.apps/liveinst.h
diff --git a/po/Rules-extract b/po/Rules-extract
index c5ecdbf..85d33de 100644
--- a/po/Rules-extract
+++ b/po/Rules-extract
@@ -7,10 +7,20 @@
# input file. --local will output files in a tmp/ directory relative to the
# current working directory.
#
+# intltool-extract adds "no-c-format" to any lines it finds containing format
+# specifiers, which disables the xgettext warnings on format errors. Assume
+# instead that anything in a glade file is going to be used as a python format
+# string so that our gettext tests work.
+#
# All output files need to be in $srcdir for gettext to be able to find them.
DISTFILES.common.extra2 = Rules-extract
+%.glade.h: %.glade
+ @intltool-extract -q --type=gettext/glade -l $< && \
+ sed 's/no-c-format/python-format/' < tmp/$$(basename $@) > $@ && \
+ rm -f tmp/$$(basename $@)
+
%.desktop.in.h: %.desktop.in
@intltool-extract -q --type=gettext/keys -l --srcdir / $(realpath $<) && \
sed 's/no-c-format/python-format/' < tmp/$$(basename $@) > $@ && \
@@ -28,17 +38,18 @@ DISTFILES.common.extra2 = Rules-extract
$(XGETTEXT) $(XGETTEXT_OPTIONS) --omit-header --directory=$(top_srcdir) \
--language=Python -o $@ $${input_file##$(realpath $(top_srcdir))/}
+# This file is actually JavaScript, but C is close enough
%fedora-welcome.po: %fedora-welcome
@input_file="$(realpath $<)" && \
$(XGETTEXT) $(XGETTEXT_OPTIONS) --omit-header --directory=$(top_srcdir) \
- --language=JavaScript -o $@ $${input_file##$(realpath $(top_srcdir))/}
+ --language=C -o $@ $${input_file##$(realpath $(top_srcdir))/}
maintainer-clean: maintainer-clean-extract
maintainer-clean-extract:
rm -f \
$(top_srcdir)/anaconda.po $(top_srcdir)/data/liveinst/gnome/fedora-welcome.po \
$(top_srcdir)/data/liveinst/console.apps/liveinst.h
- find $(top_srcdir) \( -name '*.desktop.in.h' \) \
+ find $(top_srcdir) \( -name '*.glade.h' -o -name '*.desktop.in.h' \) \
-exec rm -f {} \;
mostlyclean: mostlyclean-extract
--
2.2.2
More information about the anaconda-patches
mailing list