diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2004-01-24 08:59:11 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2004-01-24 08:59:11 +0000 |
commit | cb0af21342720ff0ea17f82801a612db684404a9 (patch) | |
tree | 999619b69c7132044ca7a2a452ec40362ed9d0a5 /lib/Locale | |
parent | 176ab42ac987e047ebcd48fa0f08231f4084718a (diff) | |
download | perl-cb0af21342720ff0ea17f82801a612db684404a9.tar.gz |
Upgrade to Locale::Maketext 1.08.
p4raw-id: //depot/perl@22204
Diffstat (limited to 'lib/Locale')
-rw-r--r-- | lib/Locale/Maketext.pm | 9 | ||||
-rw-r--r-- | lib/Locale/Maketext/ChangeLog | 13 | ||||
-rw-r--r-- | lib/Locale/Maketext/TPJ13.pod | 2 | ||||
-rw-r--r-- | lib/Locale/Maketext/t/06super.t | 31 |
4 files changed, 50 insertions, 5 deletions
diff --git a/lib/Locale/Maketext.pm b/lib/Locale/Maketext.pm index 757b817e08..07b6b19796 100644 --- a/lib/Locale/Maketext.pm +++ b/lib/Locale/Maketext.pm @@ -1,5 +1,5 @@ -# Time-stamp: "2004-01-11 19:02:37 AST" +# Time-stamp: "2004-01-19 15:11:14 AST" require 5; package Locale::Maketext; @@ -14,7 +14,7 @@ use I18N::LangTags 0.21 (); BEGIN { unless(defined &DEBUG) { *DEBUG = sub () {0} } } # define the constant 'DEBUG' at compile-time -$VERSION = "1.07"; +$VERSION = "1.08"; @ISA = (); $MATCH_SUPERS = 1; @@ -283,14 +283,14 @@ sub _langtag_munging { @languages; # catch alternation DEBUG and print "Lgs\@", __LINE__, ": ", map("<$_>", @languages), "\n"; + @languages = $base_class->_add_supers( @languages ); + if( defined &I18N::LangTags::panic_languages ) { push @languages, I18N::LangTags::panic_languages(@languages); DEBUG and print "After adding panic languages:\n", " Lgs\@", __LINE__, ": ", map("<$_>", @languages), "\n"; } - @languages = $base_class->_add_supers( @languages ); - push @languages, $base_class->fallback_languages; # You are free to override fallback_languages to return empty-list! DEBUG and print "Lgs\@", __LINE__, ": ", map("<$_>", @languages), "\n"; @@ -559,3 +559,4 @@ you could easily halve or double the amount of cumin, or use chopped mint leaves instead of dill, or lime juice instead of lemon, et cetera. [end] + diff --git a/lib/Locale/Maketext/ChangeLog b/lib/Locale/Maketext/ChangeLog index f19ffc8a05..96556f4118 100644 --- a/lib/Locale/Maketext/ChangeLog +++ b/lib/Locale/Maketext/ChangeLog @@ -1,6 +1,17 @@ Revision history for Perl suite Locale::Maketext - Time-stamp: "2004-01-11 18:30:43 AST" + Time-stamp: "2004-01-19 15:11:56 AST" +2004-01-19 Sean M. Burke sburke@cpan.org + + * Release 1.08: + + * Corrected a one-line code bug in v1.07 that accidentally demoted + all en-* tags in cases of lexicon-groups that had an en.pm but no + en_*.pm. Thanks to Robert Spier for spotting this. Test added. + So don't use v1.07! + + * Autrijus found some typoes in the TPJ article. Fixed.1 + 2004-01-11 Sean M. Burke sburke@cpan.org * Release 1.07: Now uses a new and different rule for implicating diff --git a/lib/Locale/Maketext/TPJ13.pod b/lib/Locale/Maketext/TPJ13.pod index 10f0428767..149b84c153 100644 --- a/lib/Locale/Maketext/TPJ13.pod +++ b/lib/Locale/Maketext/TPJ13.pod @@ -2,6 +2,8 @@ # This document contains text in Perl "POD" format. # Use a POD viewer like perldoc or perlman to render it. +# This corrects some typoes in the previous release. + =head1 NAME Locale::Maketext::TPJ13 -- article about software localization diff --git a/lib/Locale/Maketext/t/06super.t b/lib/Locale/Maketext/t/06super.t new file mode 100644 index 0000000000..922275d179 --- /dev/null +++ b/lib/Locale/Maketext/t/06super.t @@ -0,0 +1,31 @@ + +require 5; +use strict; +use Test; + +# use a BEGIN block so we print our plan before MyModule is loaded +BEGIN { plan tests => 3 } + +ok 1; +print "# Locale::Maketext version $Locale::Maketext::VERSION\n"; + +#sub Locale::Maketext::DEBUG () {10}; +use Locale::Maketext (); +{ package Whunk::L10N; use vars qw(@ISA %Lexicon); @ISA = 'Locale::Maketext'; + %Lexicon = ("hello" => "SROBLR!"); +} +{ package Whunk::L10N::en; use vars qw(@ISA %Lexicon); @ISA = 'Whunk::L10N'; + %Lexicon = ("hello" => "HI AND STUFF!"); +} +{ package Whunk::L10N::zh_tw; use vars qw(@ISA %Lexicon); @ISA = 'Whunk::L10N'; + %Lexicon = ("hello" => "NIHAU JOE!"); +} + +$ENV{'REQUEST_METHOD'} = 'GET'; +$ENV{'HTTP_ACCEPT_LANGUAGE'} = 'en-US, zh-TW'; + +my $x = Whunk::L10N->get_handle; +print "# LH object: $x\n"; +ok $x->maketext('hello'), "HI AND STUFF!"; +print "# OK bye\n"; +ok 1; |