~ubuntu-branches/debian/sid/genius/sid

« back to all changes in this revision

Viewing changes to intltool-extract.in

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-02-06 09:45:34 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070206094534-02k3egxuiyuswl7c
Tags: 0.7.7-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
## Release information
33
33
my $PROGRAM      = "intltool-extract";
34
34
my $PACKAGE      = "intltool";
35
 
my $VERSION      = "0.35.0";
 
35
my $VERSION      = "0.35.4";
36
36
 
37
37
## Loaded modules
38
38
use strict; 
114
114
sub place_normal {
115
115
    $FILE        = $ARGV[0];
116
116
    $OUTFILE     = "$FILE.h";
 
117
 
 
118
    my $dirname = dirname ($OUTFILE);
 
119
    if (! -d "$dirname" && $dirname ne "") {
 
120
        system ("mkdir -p $dirname");
 
121
    }
117
122
}   
118
123
 
119
124
sub place_local {
156
161
      --type=TYPE   Specify the file type of FILENAME. Currently supports:
157
162
                    "gettext/glade", "gettext/ini", "gettext/keys"
158
163
                    "gettext/rfc822deb", "gettext/schemas",
159
 
                    "gettext/scheme", "gettext/xml"
 
164
                    "gettext/scheme", "gettext/xml", "gettext/quoted"
160
165
  -l, --local       Writes output into current working directory
161
166
                    (conflicts with --update)
162
167
      --update      Writes output into the same directory the source file 
212
217
    &type_scheme if $gettext_type eq "scheme";
213
218
    &type_schemas  if $gettext_type eq "schemas";
214
219
    &type_rfc822deb  if $gettext_type eq "rfc822deb";
 
220
    &type_quoted if $gettext_type eq "quoted";
215
221
}
216
222
 
217
223
sub entity_decode_minimal
242
248
{
243
249
    return '\"' if $_ eq '"';
244
250
    return '\n' if $_ eq "\n";
245
 
    return '\\' if $_ eq '\\';
 
251
    return '\\\\' if $_ eq '\\';
246
252
 
247
253
    return $_;
248
254
}
711
717
    return @list;
712
718
}
713
719
 
 
720
sub type_quoted {
 
721
    while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
 
722
        my $message = $1;
 
723
        my $before = $`;
 
724
        $message =~ s/\\\"/\"/g;
 
725
        $before =~ s/[^\n]//g;
 
726
        $messages{$message} = [];
 
727
        $loc{$message} = length ($before) + 2;
 
728
    }
 
729
}
 
730
 
714
731
sub type_glade {
715
732
    ### For translatable Glade XML files ###
716
733