[Jifty-commit] r818 - in jifty/trunk: lib/Jifty/Script

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Apr 5 20:56:13 EDT 2006


Author: jesse
Date: Wed Apr  5 20:56:12 2006
New Revision: 818

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Script/Po.pm

Log:
 r11092 at hualien:  jesse | 2006-04-05 20:55:44 -0400
 * Documented Jifty::Script::Po


Modified: jifty/trunk/lib/Jifty/Script/Po.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Po.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/Po.pm	Wed Apr  5 20:56:12 2006
@@ -10,8 +10,9 @@
 use Locale::Maketext::Extract;
 use File::Find::Rule;
 use MIME::Types;
-our $mime  = MIME::Types->new();
+our $MIME = MIME::Types->new();
 our $LMExtract = Locale::Maketext::Extract->new;
+use constant USE_GETTEXT_STYLE => 1;
 
 __PACKAGE__->mk_accessors(qw/language/);
 
@@ -54,17 +55,26 @@
 
 =head2 _check_mime_type FILENAME
 
+This routine returns a mimetype for the file C<FILENAME>.
+
 =cut
 
 sub _check_mime_type {
     my $self       = shift;
     my $local_path = shift;
-    my $mimeobj = $mime->mimeTypeOf($local_path);
+    my $mimeobj = $MIME->mimeTypeOf($local_path);
     my $mime_type = ($mimeobj ? $mimeobj->type : "unknown");
     return if ( $mime_type =~ /^image/ );
     return 1;
 }
 
+=head2 update_catalogs
+
+Extracts localizable messages from all files in your application, finds
+all your message catalogs and updates them with new and changed messages.
+
+=cut
+
 sub update_catalogs {
     my $self = shift;
     $self->extract_messages();
@@ -79,8 +89,13 @@
 
 }
 
+=head2 update_catalog FILENAME
+
+Reads C<FILENAME>, a message catalog and integrates new or changed 
+translations.
+
+=cut
 
-use constant USE_GETTEXT_STYLE => 1;
 sub update_catalog {
     my $self       = shift;
     my $translation = shift;
@@ -92,6 +107,12 @@
 }
 
 
+=head2 extract_messages
+
+Find all translatable messages in your application, using 
+L<Locale::Maketext::Extract>.
+
+=cut
 
 sub extract_messages {
     my $self = shift;


More information about the Jifty-commit mailing list