[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/utils wmlxgettext
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/utils wmlxgettext |
Date: |
Sun, 05 Sep 2004 12:18:02 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 04/09/05 16:13:06
Modified files:
utils : wmlxgettext
Log message:
improved wmlxgettext to catch strings in other places than attribute
assignments
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/utils/wmlxgettext.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: wesnoth/utils/wmlxgettext
diff -u wesnoth/utils/wmlxgettext:1.2 wesnoth/utils/wmlxgettext:1.3
--- wesnoth/utils/wmlxgettext:1.2 Sun Aug 15 20:25:11 2004
+++ wesnoth/utils/wmlxgettext Sun Sep 5 16:13:06 2004
@@ -21,22 +21,21 @@
# skip comments
next LINE if m/^\s*\#/ and !defined $str;
- if (m/\S+\s*=\s*((?:_\s*)?)\"([^\"]*)\"\s*(?:\#.*)?$/) {
+ if (m/^(?:[^\"]*?)((?:_\s*)?)\"([^\"]*)\"(.*)$/) {
# single-line quoted string
die "nested string in $file" if defined $str;
push @{$messages{raw2postring($2)}}, "$file:$."
if ($1 ne ''); # ie. translatable
- } elsif (m/\S+\s*=\s*((?:_\s*)?)\s*\"([^\"]*)/) {
+ } elsif (!defined $str and m/^(?:[^\"]*?)((?:_\s*)?)\s*\"([^\"]*)/) {
# start of multi-line
- die "nested string in $file" if defined $str;
$translatable = ($1 ne '');
$str = $2;
$line = $.;
- } elsif (m/(.*)\"\s*(?:\#.*)?$/) {
+ } elsif (m/(.*?)\"(.*)$/) {
# end of multi-line
die "end of string without a start in $file" if !defined $str;
@@ -83,7 +82,7 @@
"Project-Id-Version: PACKAGE VERSION\\n"
"Report-Msgid-Bugs-To: http://bugs.wesnoth.org/\\n"
"POT-Creation-Date: 2004-08-08 15:00+0200\\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"
+"PO-Revision-Date: 2004-09-05 18:10+0200\\n"
"Last-Translator: FULL NAME <address@hidden>\\n"
"Language-Team: LANGUAGE <address@hidden>\\n"
"MIME-Version: 1.0\\n"
- [Wesnoth-cvs-commits] wesnoth/utils wmlxgettext,
Yann Dirson <=