#!/usr/bin/env perl
use strict;
use warnings;
# PODNAME: po_find_missing
# ABSTRACT: find missing keys from a set of po files


use Locale::POFileManager;

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

binmode STDOUT, ':utf8';

my $manager = Locale::POFileManager->new(
    base_dir           => $dir,
    canonical_language => $lang,
);

my %missing = $manager->find_missing;
for my $lang (keys %missing) {
    if (@{ $missing{$lang} }) {
        print "$lang:\n";
        print for map { "  $_\n" } @{ $missing{$lang} };
    }
}

__END__
=pod

=head1 NAME

po_find_missing - find missing keys from a set of po files

=head1 VERSION

version 0.04

=head1 SYNOPSIS

  po_find_missing <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

