[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1294
Date : Sun Jun 11 18:37:44 BST 2006
Changed paths:
M /Trunk/XaraLX/Scripts/build-resources.pl
Add comments to translated strings
Diff:
Index: Trunk/XaraLX/Scripts/build-resources.pl
===================================================================
--- Trunk/XaraLX/Scripts/build-resources.pl (revision 1293)
+++ Trunk/XaraLX/Scripts/build-resources.pl (revision 1294)
@@ -382,15 +382,17 @@
while (<STRINGS>)
{
chomp;
- s/^\S+ //;
- # skip completely blank lines
- next if (/^\s*$/);
+ s/(^\S+) //;
+ my $comment=$1;
+ # skip completely blank lines or a single hyphen
+ next if (/^\s*((-)?)\s*$/);
# escape slashes
s/\/\\/g;
# escape quotes
s/\"/\\"/g;
my $s;
- $s="_(\"$_\");";
+ $s="/* $comment */ _(\"$_\");";
+# $s="_(\"$_\");";
push @strings, $s;
print STDERR "String: $s
" if ($verbose>2);
}
@@ -410,8 +412,8 @@
{
# Note wxrc removes XML escaping
chomp;
- # zap blank lines
- next if (/^_\(\"\s*\"\)/);
+ # zap blank lines and single hyphens
+ next if (/^_\(\"\s*((-)?)\"\)/);
print STDERR "Dialog: $_
" if ($verbose>2);
push @strings,$_;
$dlines++;
@@ -445,7 +447,7 @@
}
my $n=1;
- open (XGETTEXT, "|".$xgettext.' --from-code ISO-8859-1 --force-po -k_ -C -i - --no-location --copyright-holder "Xara Group Ltd" --msgid-bugs-address=bugs@xxxxxxxx -d xaralx -o '.$outputdir."/xrc/xaralx.po") || die "Can't run $xgettext: $!";
+ open (XGETTEXT, "|".$xgettext.' --from-code ISO-8859-1 --force-po -k_ -c -C -i - --no-location --copyright-holder "Xara Group Ltd" --msgid-bugs-address=bugs@xxxxxxxx -d xaralx -o '.$outputdir."/xrc/xaralx.po") || die "Can't run $xgettext: $!";
foreach $i (@uniqstrings)
{
print STDERR "Line $n, translate: $i
" if ($verbose>2);
Xara