~ubuntu-branches/ubuntu/lucid/compiz-fusion-plugins-extra/lucid

« back to all changes in this revision

Viewing changes to intltool-merge.in

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2007-09-28 16:12:51 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20070928161251-gx5iqyzrd8haddkm
Tags: 0.5.2+git20070928-0ubuntu1
* new 0.6 git snapshot:
  - translation updates
  - fix widget property reading

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.36.2";
39
39
 
40
40
## Loaded modules
41
41
use strict; 
100
100
{
101
101
    my ($file) = @_;
102
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));
 
103
    return 1 if ((-x $file) or (system("$file -l >$devnull") == 0));
104
104
    return 0;
105
105
}
106
106
 
275
275
 
276
276
sub gather_po_files
277
277
{
278
 
    for my $po_file (glob "$PO_DIR/*.po") {
279
 
        $po_files_by_lang{po_file2lang($po_file)} = $po_file;
 
278
    if (my $linguas = $ENV{"LINGUAS"})
 
279
    {
 
280
        for my $lang (split / /, $linguas) {
 
281
            my $po_file = $PO_DIR . "/" . $lang . ".po";
 
282
            if (-e $po_file) {
 
283
                $po_files_by_lang{$lang} = $po_file;
 
284
            }
 
285
        }
 
286
    }
 
287
    else
 
288
    {
 
289
        if (open LINGUAS_FILE, "$PO_DIR/LINGUAS")
 
290
        {
 
291
            while (<LINGUAS_FILE>)
 
292
            {
 
293
                next if /^#/;
 
294
 
 
295
                if (/([-a-zA-Z_@.]+)\n/)
 
296
                {
 
297
                    my $lang = $1;
 
298
 
 
299
                    my $po_file = $PO_DIR . "/" . $lang . ".po";
 
300
                    if (-e $po_file) {
 
301
                        $po_files_by_lang{$lang} = $po_file;
 
302
                    }
 
303
                }
 
304
            }
 
305
 
 
306
            close LINGUAS_FILE;
 
307
        }
 
308
        else
 
309
        {
 
310
            for my $po_file (glob "$PO_DIR/*.po") {
 
311
                $po_files_by_lang{po_file2lang($po_file)} = $po_file;
 
312
            }
 
313
        }
280
314
    }
281
315
}
282
316