[network-manager-applet] po: return po/iso3166.tab.h back into POTFILES.in
- From: JiÅÃ KlimeÅ <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] po: return po/iso3166.tab.h back into POTFILES.in
- Date: Wed, 7 Sep 2011 13:32:03 +0000 (UTC)
commit c46822ba9f46a0a6e6ae53cf9d1f9ad3158ec885
Author: JiÅÃ KlimeÅ <jklimes redhat com>
Date: Wed Sep 7 15:19:05 2011 +0200
po: return po/iso3166.tab.h back into POTFILES.in
po/iso3166.tab.h is a generated file containing country names to be translated.
The file is generated from /usr/share/zoneinfo/iso3166.tab by Rules-iso3166,
that gets appended to Makefile.
Rules-iso3166 is now updated to search for the input file in
$(datadir)/zoneinfo/iso3166.tab, and if not found in /usr/share/zoneinfo/iso3166.tab
When no input file is found, empty po/iso3166.tab.h is created and a warning
printed.
po/POTFILES.in | 6 ++++++
po/Rules-iso3166 | 17 +++++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4afbe21..4e548cc 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,6 +15,12 @@ src/applet.c
src/applet.h
[type: gettext/glade]src/gsm-unlock.ui
[type: gettext/glade]src/info.ui
+
+# Generated file for country names translation
+# (generated from /usr/share/zoneinfo/iso3166.tab)
+# see Rules-iso3166
+po/iso3166.tab.h
+
[type: gettext/glade]src/wired-8021x.ui
src/connection-editor/ce-page.c
[type: gettext/glade]src/connection-editor/ce-ip4-routes.ui
diff --git a/po/Rules-iso3166 b/po/Rules-iso3166
index d2aa1ab..16b1868 100644
--- a/po/Rules-iso3166
+++ b/po/Rules-iso3166
@@ -1,8 +1,17 @@
# For translation of country names (taken from /usr/share/zoneinfo/iso3166.tab)
-$(top_builddir)/po/iso3166.tab.h: $(datadir)/zoneinfo/iso3166.tab
- @rm -f $(top_builddir)/po/iso3166.tab.h
- @cat $(datadir)/zoneinfo/iso3166.tab | grep -v "#" | cut -f 2 | while read country ; do \
- echo "char *s = N_(\"$${country}\")" >> $(top_builddir)/po/iso3166.tab.h ; \
+$(top_builddir)/po/iso3166.tab.h:
+ @rm -f $(top_builddir)/po/iso3166.tab.h; \
+ countries="$(datadir)/zoneinfo/iso3166.tab"; \
+ if test ! -f $$countries; then \
+ countries="/usr/share/zoneinfo/iso3166.tab"; \
+ if test ! -f $$countries; then \
+ echo "Warning: file $$countries not found; country names won't be translated. Please install tzdata to fix it." 1>&2; \
+ touch $(top_builddir)/po/iso3166.tab.h ; \
+ exit 0; \
+ fi \
+ fi; \
+ cat $$countries | grep -v "#" | cut -f 2 | while read country ; do \
+ echo "char *s = N_(\"$${country}\")" >> $(top_builddir)/po/iso3166.tab.h; \
done
mostlyclean-iso3166:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]