~ubuntu-branches/ubuntu/lucid/libgnomecanvas/lucid

« back to all changes in this revision

Viewing changes to intltool-merge.in

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-09-18 16:40:41 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070918164041-1h76ekcoj9kwj9vy
Tags: 2.20.0-1ubuntu1
* Merge with Debian, remaining Ubuntu changes:
  - debian/control.in: differing Conflicts (it refers to a binNMU in
    Debian).

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
## Release information
36
36
my $PROGRAM = "intltool-merge";
37
37
my $PACKAGE = "intltool";
38
 
my $VERSION = "0.36.1";
 
38
my $VERSION = "0.35.5";
39
39
 
40
40
## Loaded modules
41
41
use strict; 
93
93
 
94
94
my %po_files_by_lang = ();
95
95
my %translations = ();
96
 
my $iconv = $ENV{"ICONV"} || "iconv";
 
96
my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "@INTLTOOL_ICONV@";
97
97
my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
98
98
 
99
 
sub isProgramInPath
100
 
{
101
 
    my ($file) = @_;
102
 
    # If either a file exists, or when run it returns 0 exit status
103
 
    return 1 if ((-x $file) or (system("$file --version >$devnull") == 0));
104
 
    return 0;
105
 
}
106
 
 
107
 
if (! isProgramInPath ("$iconv"))
108
 
{
109
 
        print STDERR " *** iconv is not found on this system!\n".
110
 
                     " *** Without it, intltool-merge can not convert encodings.\n";
111
 
        exit;
112
 
}
113
 
 
114
99
# Use this instead of \w for XML files to handle more possible characters.
115
100
my $w = "[-A-Za-z0-9._:]";
116
101
 
509
494
    return $string;
510
495
}
511
496
 
 
497
## NOTE: deal with < - &lt; but not > - &gt;  because it seems its ok to have 
 
498
## > in the entity. For further info please look at #84738.
512
499
sub entity_decode
513
500
{
514
501
    local ($_) = @_;
515
502
 
516
503
    s/&apos;/'/g; # '
517
504
    s/&quot;/"/g; # "
 
505
    s/&amp;/&/g;
518
506
    s/&lt;/</g;
519
 
    s/&gt;/>/g;
520
 
    s/&amp;/&/g;
521
507
 
522
508
    return $_;
523
509
}