lib/Locale/Maketext/t/03http.t See if Locale::Maketext works
lib/Locale/Maketext/t/04super.t See if Locale::Maketext works
lib/Locale/Maketext/t/05super.t See if Locale::Maketext works
+lib/Locale/Maketext/t/06super.t See if Locale::Maketext works
lib/Locale/Maketext/t/90utf8.t Locale::Maketext
lib/Locale/Maketext/TPJ13.pod Locale::Maketext documentation article
lib/locale.pm For "use locale"
-# Time-stamp: "2004-01-11 19:02:37 AST"
+# Time-stamp: "2004-01-19 15:11:14 AST"
require 5;
package Locale::Maketext;
BEGIN { unless(defined &DEBUG) { *DEBUG = sub () {0} } }
# define the constant 'DEBUG' at compile-time
-$VERSION = "1.07";
+$VERSION = "1.08";
@ISA = ();
$MATCH_SUPERS = 1;
@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";
leaves instead of dill, or lime juice instead of lemon, et cetera.
[end]
+
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
# 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
--- /dev/null
+
+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;