From e7b0afa2f7b8cd45bfea000f2d2238497ce0f982 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 18 Feb 2010 12:15:53 -0600 Subject: centralize the filename => lang mapping, and use it in more places --- lib/Locale/POFileManager/File.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Locale/POFileManager/File.pm') diff --git a/lib/Locale/POFileManager/File.pm b/lib/Locale/POFileManager/File.pm index b3aa78b..64cb60c 100644 --- a/lib/Locale/POFileManager/File.pm +++ b/lib/Locale/POFileManager/File.pm @@ -38,6 +38,13 @@ sub save { Locale::PO->save_file_fromarray($self->file->stringify, [$self->entries]); } +sub language { + my $self = shift; + my $language = $self->file->basename; + $language =~ s{(.*)\.po$}{$1}; + return $language; +} + sub find_missing_from { my $self = shift; my ($other) = @_; -- cgit v1.2.3-54-g00ecf