[Catalyst-commits] r13342 - in Catalyst-Plugin-I18N/trunk: .
lib/Catalyst/Plugin t/lib
tonvoon at dev.catalyst.perl.org
tonvoon at dev.catalyst.perl.org
Mon Jun 14 14:25:45 GMT 2010
Author: tonvoon
Date: 2010-06-14 15:25:45 +0100 (Mon, 14 Jun 2010)
New Revision: 13342
Modified:
Catalyst-Plugin-I18N/trunk/Changes
Catalyst-Plugin-I18N/trunk/lib/Catalyst/Plugin/I18N.pm
Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm
Log:
Renamed $c->languages_list to $c->installed_languages for clarity
Modified: Catalyst-Plugin-I18N/trunk/Changes
===================================================================
--- Catalyst-Plugin-I18N/trunk/Changes 2010-06-14 14:20:56 UTC (rev 13341)
+++ Catalyst-Plugin-I18N/trunk/Changes 2010-06-14 14:25:45 UTC (rev 13342)
@@ -1,6 +1,6 @@
Revision history for Perl extension Catalyst::Plugin::I18N.
- - Add Language List feature by Ton Voon and Chris Dolan (RT #25050)
+ - Add Installed Languages feature by Ton Voon and Chris Dolan (RT #25050)
- Add dependency and tests for i-default fallback feature in Locale::Maketext::Simple 0.19
0.09 Sat Apr 18 2009
Modified: Catalyst-Plugin-I18N/trunk/lib/Catalyst/Plugin/I18N.pm
===================================================================
--- Catalyst-Plugin-I18N/trunk/lib/Catalyst/Plugin/I18N.pm 2010-06-14 14:20:56 UTC (rev 13341)
+++ Catalyst-Plugin-I18N/trunk/lib/Catalyst/Plugin/I18N.pm 2010-06-14 14:25:45 UTC (rev 13342)
@@ -38,7 +38,7 @@
=head1 DESCRIPTION
-Supports mo/po files and Maketext classes under your applications I18N
+Supports mo/po files and Maketext classes under your application's I18N
namespace.
# MyApp/I18N/de.po
@@ -190,15 +190,15 @@
return "$class\::I18N"->get_handle( @{ $c->languages } )->language_tag;
}
-=head3 languages_list
+=head3 installed_languages
-Returns a hash of { langtag => "descriptive name for language" } based on languages
-available in the namespace. The descriptive name is based on I18N::LangTags::List information.
+Returns a hash of { langtag => "descriptive name for language" } based on language files
+in your application's I18N directory. The descriptive name is based on I18N::LangTags::List information.
If the descriptive name is not available, will be undef.
=cut
-sub languages_list {
+sub installed_languages {
my $c = shift;
return $c->config->{ 'Plugin::I18N' }->{installed_languages};
}
Modified: Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm
===================================================================
--- Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm 2010-06-14 14:20:56 UTC (rev 13341)
+++ Catalyst-Plugin-I18N/trunk/t/lib/TestApp.pm 2010-06-14 14:25:45 UTC (rev 13342)
@@ -26,7 +26,7 @@
sub current_languages_list : Global {
my( $self, $c ) = @_;
- my $h = $c->languages_list;
+ my $h = $c->installed_languages;
my $output = join(", ", map { "$_=".$h->{$_} } (sort keys %$h) );
$c->res->body( $output );
}
More information about the Catalyst-commits
mailing list