Author: ai0867
Date: Mon Nov 14 04:10:16 2011
New Revision: 51966
URL: http://svn.gna.org/viewcvs/wesnoth?rev=51966&view=rev
Log:
Fix define handling of wmlxgettext (bug #18622)
Modified:
trunk/changelog
trunk/utils/wmlxgettext
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=51966&r1=51965&r2=51966&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Mon Nov 14 04:10:16 2011
@@ -9,6 +9,7 @@
* Miscellaneous and bug fixes:
* Fixed disappearing theme UI buttons after changing fullscreen/windowed
mode
or resolution in Preferences during a game
+ * Fixed define handling of wmlxgettext (bug #18622)
Version 1.9.10:
* AI:
Modified: trunk/utils/wmlxgettext
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/wmlxgettext?rev=51966&r1=51965&r2=51966&view=diff
==============================================================================
--- trunk/utils/wmlxgettext (original)
+++ trunk/utils/wmlxgettext Mon Nov 14 04:10:16 2011
@@ -42,21 +42,18 @@
my @nodeinfostack = (["top", [], []]); # dummy top node
my @domainstack = ($initialdomain);
my $valid_wml = 1;
- my ($is_define, $macro_has_textdomain) = (0, 0);
LINE: while (<FILE>) {
# record a #define scope
- if (m/\#define\>/) {
- $is_define = 1; $macro_has_textdomain = 0;
+ if (m/\#define/) {
+ unshift @domainstack, $domainstack[0];
next LINE;
- } elsif (m/\#enddef\>/) {
- $is_define = 0;
- if ($macro_has_textdomain) { shift @domainstack; };
+ } elsif (m/\#enddef/) {
+ shift @domainstack;
}
# change the current textdomain when hitting the directive
if (m/\#textdomain\s+(\S+)/) {
- unshift @domainstack, $1;
- if ($is_define) { $macro_has_textdomain = 1; };
+ $domainstack[0] = $1;
next LINE;
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits