~ubuntu-branches/ubuntu/maverick/gq/maverick

« back to all changes in this revision

Viewing changes to intltool-extract.in

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2009-10-25 23:34:56 UTC
  • mfrom: (1.1.4 upstream) (3.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091025233456-i794n3yg2cff930j
Tags: 1.3.4-1
* QA upload.
  + Set maintainer to Debian QA Group <packages@qa.debian.org>.
* New upstream release. (Closes: #534705).
  + Does not segfault on amd64. (Closes: #444312).
  + Remove all existing patches and change patch system to quilt.
  + Replace dpatch build-dep with quilt.
* 01_desktop_file.diff - Remove encoding and bogus categories 
  from desktop file.
* Copy in config.{sub,guess} on configure, rm them on clean.
  + Add build-dep on autotools-dev.
* Make clean not ignore errors.
* Add copyright holders and version path to GPL (GPL-2).
* Update watch file to use SF redirector. (Closes: #449749).
* Bump debhelper build-dep and compat to 5.
* Bump Standards Version to 3.8.3.
  + Menu policy transition.

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.36.2";
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
231
237
 
232
238
    s/&apos;/'/g; # '
233
239
    s/&quot;/"/g; # "
234
 
    s/&amp;/&/g;
235
240
    s/&lt;/</g;
236
241
    s/&gt;/>/g;
 
242
    s/&amp;/&/g;
237
243
 
238
244
    return $_;
239
245
}
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
}
255
261
 
256
262
sub type_ini {
257
263
    ### For generic translatable desktop files ###
258
 
    while ($input =~ /^_.*=(.*)$/mg) {
259
 
        $messages{$1} = [];
 
264
    while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) {
 
265
        if (defined($2))  {
 
266
            $comments{$3} = $2;
 
267
        }
 
268
        $messages{$3} = [];
260
269
    }
261
270
}
262
271
 
711
720
    return @list;
712
721
}
713
722
 
 
723
sub type_quoted {
 
724
    while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
 
725
        my $message = $1;
 
726
        my $before = $`;
 
727
        $message =~ s/\\\"/\"/g;
 
728
        $before =~ s/[^\n]//g;
 
729
        $messages{$message} = [];
 
730
        $loc{$message} = length ($before) + 2;
 
731
    }
 
732
}
 
733
 
714
734
sub type_glade {
715
735
    ### For translatable Glade XML files ###
716
736