summaryrefslogtreecommitdiff
path: root/gnome-unstable/libgweather/gettext-not-xml.patch
blob: 46ea98f4818f1213aacbe90eb0d9f7bed38329bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
diff -Nur libgweather-3.4.0.orig/configure.ac libgweather-3.4.0/configure.ac
--- libgweather-3.4.0.orig/configure.ac	2012-03-08 20:49:21.497783149 +0000
+++ libgweather-3.4.0/configure.ac	2012-03-08 20:59:21.082941563 +0000
@@ -43,19 +43,16 @@
 LT_PREREQ([2.2.6])
 LT_INIT([dlopen win32-dll disable-static])
 
+dnl IT_PROG_INTLTOOL does this for us in the case of the po/ subdir, but we're on our own for po-locations
+AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po-locations/Makefile.in > po-locations/Makefile])
+IT_PO_SUBDIR([po-locations])
+
 IT_PROG_INTLTOOL([0.40.6])
 PKG_PROG_PKG_CONFIG([0.19])
 
 AC_PROG_CC
 AC_PATH_PROG(GCONFTOOL, gconftool-2)
 
-AC_ARG_ENABLE(all-translations-in-one-xml,
-        [AS_HELP_STRING([--enable-all-translations-in-one-xml],
-                        [Put all translations in a big Locations.xml file (slow to parse)])],
-        [enable_big_xml=yes],
-        [enable_big_xml=no])
-AM_CONDITIONAL(USE_ONE_BIG_XML, test "x$enable_big_xml" = "xyes")
-
 AC_ARG_ENABLE(locations-compression,
         [AS_HELP_STRING([--enable-locations-compression],
                         [Compress Locations.xml files])],
@@ -178,7 +175,7 @@
 Makefile
 doc/Makefile
 po/Makefile.in
-po-locations/Makefile
+po-locations/Makefile.in
 libgweather/Makefile
 libgweather/gweather-3.0.pc
 libgweather/gweather-3.0-uninstalled.pc
@@ -187,12 +184,6 @@
 ])
 AC_OUTPUT
 
-if test "x$enable_big_xml" = "xyes"; then
-	LOCATIONS_XML_TRANSLATIONS="one big file"
-else
-	LOCATIONS_XML_TRANSLATIONS="one file per translation"
-fi
-
 dnl ***************************************************************************
 dnl *** Display Summary                                                     ***
 dnl ***************************************************************************
@@ -203,6 +194,4 @@
 	Source code location:		${srcdir}
 	Compiler:			${CC}
 	Introspection support:          ${found_introspection}
-	Locations.xml translations:	${LOCATIONS_XML_TRANSLATIONS}
-	Locations.xml compression:	${enable_locations_compression}
 " >&2
diff -Nur libgweather-3.4.0.orig/data/Makefile.am libgweather-3.4.0/data/Makefile.am
--- libgweather-3.4.0.orig/data/Makefile.am	2012-03-08 20:49:21.484449916 +0000
+++ libgweather-3.4.0/data/Makefile.am	2012-03-08 21:00:28.359065326 +0000
@@ -4,55 +4,23 @@
 libgweatherlocationsdir = $(pkgdatadir)
 libgweatherlocations_in_files = Locations.xml.in
 
-if USE_ONE_BIG_XML
-
-LOCATIONS_STAMP = 
-
-libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml$(COMPRESS_EXT))
-
-%.xml$(COMPRESS_EXT): %.xml.in $(wildcard $(top_srcdir)/po-locations/*.po)
-	$(AM_V_GEN)LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po-locations/.intltool-merge-cache $(top_srcdir)/po-locations $< `echo $@ | sed "s/.xml$(COMPRESS_EXT)/.xml/"` && \
-	if test "x$(COMPRESS_EXT)" = "x.gz"; then				\
-		gzip --force `echo $@ | sed "s/.xml$(COMPRESS_EXT)/.xml/"`;	\
-	fi
-
-else # USE_ONE_BIG_XML
-
 LOCATIONS_STAMP = stamp-Locations.xml
 
-PO_LOCATIONS = $(shell if test -n "$(LINGUAS)"; then for lang in $(LINGUAS); do if test -f "$(top_srcdir)/po-locations/$$lang.po"; then echo "$(top_srcdir)/po-locations/$$lang.po "; fi; done; else for pofile in $(top_srcdir)/po-locations/*.po; do echo $$pofile; done; fi)
-
 # Helper variable
-libgweatherlocations_data = $(libgweatherlocations_in_files:.xml.in=.xml)
-
-libgweatherlocations_DATA = $(shell echo $(PO_LOCATIONS) | sed "s|$(top_srcdir)/po-locations/|Locations.|g;s|\.po|.xml$(COMPRESS_EXT)|g") $(libgweatherlocations_data)$(COMPRESS_EXT)
+libgweatherlocations_DATA = $(libgweatherlocations_in_files:.xml.in=.xml)
 
 # We need this step so that we merge all the make Locations.xy.xml destinations
 # into one unique destination. This makes -j2 work. (Else, we end up with
 # multiple and conflicting calls to intltool-merge)
 $(libgweatherlocations_DATA): $(LOCATIONS_STAMP)
 
-$(LOCATIONS_STAMP): $(libgweatherlocations_in_files) $(PO_LOCATIONS) Makefile
-	$(AM_V_at)LC_ALL=C $(INTLTOOL_MERGE) --multiple-output --xml-style --utf8 --cache=$(top_builddir)/po-locations/.intltool-merge-cache $(top_srcdir)/po-locations $< $(libgweatherlocations_data) && \
-	for pofile in $(PO_LOCATIONS); do \
-		locale=`echo $$pofile | sed "s;$(top_srcdir)/po-locations/\(.*\)\.po;\1;"`;	\
-		xmllint --noblanks -o Locations.$$locale.xml $$locale/$(libgweatherlocations_data); \
-		rm -f $$locale/$(libgweatherlocations_data);		\
-		test -d $$locale && rmdir $$locale;			\
-		if test "x$(COMPRESS_EXT)" = "x.gz"; then		\
-			gzip --force Locations.$$locale.xml;		\
-		fi;							\
-	done &&								\
-	xmllint --noblanks -o Locations.xml C/$(libgweatherlocations_data) && \
-	rm -f C/$(libgweatherlocations_data) &&				\
-	test -d C && rmdir C &&						\
-	if test "x$(COMPRESS_EXT)" = "x.gz"; then			\
-		gzip --force Locations.xml;				\
-	fi &&								\
+$(LOCATIONS_STAMP): $(libgweatherlocations_in_files) Makefile
+	LC_ALL=C $(INTLTOOL_MERGE) --multiple-output --xml-style --utf8 --cache=$(top_builddir)/po-locations/.intltool-merge-cache /dev/null $< $(libgweatherlocations_DATA)
+	xmllint --noblanks -o Locations.xml C/$(libgweatherlocations_DATA)
+	rm -f C/$(libgweatherlocations_DATA)
+	test -d C && rmdir C
 	touch $@
 
-endif # USE_ONE_BIG_XML
-
 ### Locations.xml.in rebuild
 rebuild-locations: locationdb.sqlite update-locations.py
 	$(AM_V_GEN)($(srcdir)/update-locations.py > Locations.xml.in.new && mv Locations.xml.in.new Locations.xml.in) || rm -f Locations.xml.in.new
diff -Nur libgweather-3.4.0.orig/libgweather/gweather-location.c libgweather-3.4.0/libgweather/gweather-location.c
--- libgweather-3.4.0.orig/libgweather/gweather-location.c	2012-03-08 20:49:21.487783240 +0000
+++ libgweather-3.4.0/libgweather/gweather-location.c	2012-03-08 21:00:28.359065326 +0000
@@ -22,11 +22,14 @@
 #include <config.h>
 #endif
 
+#include "config.h"
+
 #include <string.h>
 #include <math.h>
 #include <locale.h>
 #include <gtk/gtk.h>
 #include <libxml/xmlreader.h>
+#include <libintl.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
 #include "gweather-location.h"
@@ -185,10 +188,20 @@
 
 	tagname = (const char *) xmlTextReaderConstName (parser->xml);
 	if (!strcmp (tagname, "name") && !loc->name) {
-	    value = gweather_parser_get_localized_value (parser);
+	    char *context = NULL;
+	    context = xmlTextReaderGetAttribute(parser->xml,"msgctxt"); 
+	   
+	    value = gweather_parser_get_value (parser);
 	    if (!value)
 		goto error_out;
-	    loc->name = g_strdup (value);
+
+	    if (context != NULL) {
+	    	loc->name = g_strdup (g_dpgettext2(GETTEXT_PACKAGE "-locations", context, value));
+	    	xmlFree (context);
+	    }
+	    else
+	    	loc->name = g_strdup (dgettext(GETTEXT_PACKAGE "-locations",value));
+	    
 	    xmlFree (value);
 	    normalized = g_utf8_normalize (loc->name, -1, G_NORMALIZE_ALL);
 	    loc->sort_name = g_utf8_casefold (normalized, -1);
diff -Nur libgweather-3.4.0.orig/libgweather/gweather-timezone.c libgweather-3.4.0/libgweather/gweather-timezone.c
--- libgweather-3.4.0.orig/libgweather/gweather-timezone.c	2012-03-08 20:49:21.487783240 +0000
+++ libgweather-3.4.0/libgweather/gweather-timezone.c	2012-03-08 21:00:28.359065326 +0000
@@ -23,6 +23,7 @@
 #endif
 
 #include <string.h>
+#include <libintl.h>
 
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
 #include "gweather-timezone.h"
@@ -154,7 +155,7 @@
 parse_timezone (GWeatherParser *parser)
 {
     GWeatherTimezone *zone = NULL;
-    char *id = NULL, *name = NULL;
+    char *id = NULL, *name = NULL, *context = NULL;
     int offset = 0, dst_offset = 0;
     gboolean has_dst = FALSE;
 
@@ -177,27 +178,34 @@
 		continue;
 	    }
 
-	    if (!strcmp ((const char *) xmlTextReaderConstName (parser->xml), "name"))
-		name = gweather_parser_get_localized_value (parser);
+	    if (!strcmp ((const char *) xmlTextReaderConstName (parser->xml), "name")) {
+		context = xmlTextReaderGetAttribute(parser->xml,"msgctxt"); 
+		name = gweather_parser_get_value (parser);
+	    }
 	    else {
 		if (xmlTextReaderNext (parser->xml) != 1)
 		    break;
 	    }
 	}
     }
-
+	    
     if (parse_tzdata (id, parser->year_start, parser->year_end,
 		      &offset, &has_dst, &dst_offset)) {
 	zone = g_slice_new0 (GWeatherTimezone);
 	zone->ref_count = 1;
 	zone->id = g_strdup (id);
-	zone->name = g_strdup (name);
+	if (context != NULL)
+		zone->name = g_strdup (g_dpgettext2(GETTEXT_PACKAGE "-locations", context, name));
+	else
+		zone->name = g_strdup (dgettext(GETTEXT_PACKAGE "-locations",name));
 	zone->offset = offset;
 	zone->has_dst = has_dst;
 	zone->dst_offset = dst_offset;
     }
 
     xmlFree (id);
+    if (context)
+    	xmlFree (context);
     if (name)
 	xmlFree (name);
 
diff -Nur libgweather-3.4.0.orig/po-locations/LINGUAS libgweather-3.4.0/po-locations/LINGUAS
--- libgweather-3.4.0.orig/po-locations/LINGUAS	1970-01-01 00:00:00.000000000 +0000
+++ libgweather-3.4.0/po-locations/LINGUAS	2012-03-08 21:00:28.359065326 +0000
@@ -0,0 +1,78 @@
+ang
+ar
+as
+az
+be
+be@latin
+bg
+bn_IN
+bn
+bs
+ca
+cs
+cy
+da
+de
+dz
+el
+en_CA
+en_GB
+es
+et
+eu
+fa
+fi
+fr
+ga
+gl
+gu
+he
+hi
+hr
+hu
+id
+it
+ja
+ka
+kn
+ko
+ku
+ky
+lt
+lv
+mai
+mg
+mk
+ml
+mn
+mr
+ms
+nb
+ne
+nl
+nn
+oc
+or
+pa
+pl
+pt_BR
+pt
+ro
+ru
+rw
+si
+sk
+sl
+sq
+sr@latin
+sr
+sv
+ta
+te
+th
+tr
+uk
+vi
+zh_CN
+zh_HK
+zh_TW
diff -Nur libgweather-3.4.0.orig/po-locations/Makefile.in.in libgweather-3.4.0/po-locations/Makefile.in.in
--- libgweather-3.4.0.orig/po-locations/Makefile.in.in	1970-01-01 00:00:00.000000000 +0000
+++ libgweather-3.4.0/po-locations/Makefile.in.in	2012-03-08 21:00:28.359065326 +0000
@@ -0,0 +1,217 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
+#
+# This file may be copied and used freely without restrictions.  It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
+#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob@ximian.com> to install
+#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@-locations
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po-locations
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p@.
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+	$(MSGFMT) -o $@ $<
+
+.po.gmo:
+	file=`echo $* | sed 's,.*/,,'`.gmo \
+	  && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+	sed -f ../intl/po2msg.sed < $< > $*.msg \
+	  && rm -f $@ && gencat $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+	$(GENPOT)
+
+install: install-data
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $$dir; \
+	  if test -r $$lang.gmo; then \
+	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+	  else \
+	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $(srcdir)/$$lang.gmo as" \
+		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
+	  fi; \
+	  if test -r $$lang.gmo.m; then \
+	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	  else \
+	    if test -r $(srcdir)/$$lang.gmo.m ; then \
+	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+		$$dir/$(GETTEXT_PACKAGE).mo.m; \
+	      echo "installing $(srcdir)/$$lang.gmo.m as" \
+		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	    else \
+	      true; \
+	    fi; \
+	  fi; \
+	done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+	done
+
+check: all $(GETTEXT_PACKAGE).pot
+	rm -f missing notexist
+	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+	if [ -r missing -o -r notexist ]; then \
+	  exit 1; \
+	fi
+
+mostlyclean:
+	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+	rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile Makefile.in POTFILES stamp-it
+	rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	extra_dists="$(EXTRA_DISTFILES)"; \
+	for file in $$extra_dists; do \
+	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+	done; \
+	for file in $$dists; do \
+	  test -f $$file || file="$(srcdir)/$$file"; \
+	  ln $$file $(distdir) 2> /dev/null \
+	    || cp -p $$file $(distdir); \
+	done
+
+update-po: Makefile
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	tmpdir=`pwd`; \
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  echo "$$lang:"; \
+	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+	  if $$result; then \
+	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	      rm -f $$tmpdir/$$lang.new.po; \
+            else \
+	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	        :; \
+	      else \
+	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	        rm -f $$tmpdir/$$lang.new.po; \
+	        exit 1; \
+	      fi; \
+	    fi; \
+	  else \
+	    echo "msgmerge for $$lang.gmo failed!"; \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  fi; \
+	done
+
+Makefile POTFILES: stamp-it
+	@if test ! -f $@; then \
+	  rm -f stamp-it; \
+	  $(MAKE) stamp-it; \
+	fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+	       $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -Nur libgweather-3.4.0.orig/po-locations/POTFILES.in libgweather-3.4.0/po-locations/POTFILES.in
--- libgweather-3.4.0.orig/po-locations/POTFILES.in	1970-01-01 00:00:00.000000000 +0000
+++ libgweather-3.4.0/po-locations/POTFILES.in	2012-03-08 21:00:28.359065326 +0000
@@ -0,0 +1,4 @@
+# This list should contain *only* data/Locations.xml.in.
+# Everything else should be in POTFILES.skip.
+[encoding:UTF-8]
+data/Locations.xml.in