The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/env perl
use strict;
use warnings;
# PODNAME: po_add_stubs
# ABSTRACT: add stubs for missing msgids to a set of po files


use Locale::POFileManager;

my ($dir, $lang) = @ARGV;
$dir  ||= '.';
$lang ||= 'en';

my $manager = Locale::POFileManager->new(
    base_dir           => $dir,
    canonical_language => $lang,
    stub_msgstr        => sub {
        my %args = @_;
        "$args{canonical_msgstr} ($args{lang})";
    },
);

$manager->add_stubs;

__END__
=pod

=head1 NAME

po_add_stubs - add stubs for missing msgids to a set of po files

=head1 VERSION

version 0.04

=head1 SYNOPSIS

  po_add_stubs <directory> <language>

=head1 AUTHOR

Jesse Luehrs <doy at tozt dot net>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Jesse Luehrs.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut