r15092 - in /branches/upstream/liblocale-maketext-lexicon-perl/current: ./ inc/Test/ inc/Test/Builder/ lib/Locale/Maketext/ lib/Locale/Maketext/Lexicon/ t/
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sun Feb 17 22:21:19 UTC 2008
Author: gregoa-guest
Date: Sun Feb 17 22:21:18 2008
New Revision: 15092
URL: http://svn.debian.org/wsvn/?sc=1&rev=15092
Log:
[svn-upgrade] Integrating new upstream version, liblocale-maketext-lexicon-perl (0.66)
Modified:
branches/upstream/liblocale-maketext-lexicon-perl/current/Changes
branches/upstream/liblocale-maketext-lexicon-perl/current/META.yml
branches/upstream/liblocale-maketext-lexicon-perl/current/README
branches/upstream/liblocale-maketext-lexicon-perl/current/SIGNATURE
branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder.pm
branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder/Module.pm
branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/More.pm
branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Extract.pm
branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon.pm
branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon/Auto.pm
branches/upstream/liblocale-maketext-lexicon-perl/current/t/5-extract.t
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/Changes?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/Changes (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/Changes Sun Feb 17 22:21:18 2008
@@ -1,3 +1,9 @@
+[Changes for 0.66 - 2008-02-12]
+
+* Locale::Maketext::Extract: Support in Extract.pm->extract for
+ HTML::FormFu config files.
+ Contributed by: Andreas Marienborg
+
[Changes for 0.65 - 2007-12-22]
* Perl 5.9.5+ is pickier about what "being used only once" means,
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/META.yml?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/META.yml (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/META.yml Sun Feb 17 22:21:18 2008
@@ -16,4 +16,4 @@
requires:
Locale::Maketext: 0.01
perl: 5.004
-version: 0.65
+version: 0.66
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/README?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/README (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/README Sun Feb 17 22:21:18 2008
@@ -1,50 +1,203 @@
-This is the README file for Locale::Maketext::Lexicon, a module providing
-lexicon-handling backends, for "Locale::Maketext" to read from other
-localization formats, such as PO files, MO files, or from databases via
-the "Tie" interface.
-
-For extracting translatable strings from source files, a "xgettext.pl"
-utility is also installed by default.
-
-You can also read my presentation "Web Localization in Perl" in the docs/
-directory. It gives an overview for the localization process, features
-a comparison between Gettext, Msgcat and Maketext, and talks about my
-experiences at localizing web applications based on HTML::Mason and the
-Template Toolkit.
-
-* Installation
-
-Locale::Maketext::Lexicon uses the standard perl module install process:
-
- cpansign -v # optional; see the SIGNATURE file for details
- perl Makefile.PL
- make # or 'nmake' on Win32
- make test
- make install
-
-* Copyright
-
-Copyright 2002, 2003, 2004, 2005, 2006, 2007 by Audrey Tang <cpan at audreyt.org>.
-
-This software is released under the MIT license cited below.
-
-* The "MIT" License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
+NAME
+ Locale::Maketext::Lexicon - Use other catalog formats in Maketext
+
+VERSION
+ This document describes version 0.66 of Locale::Maketext::Lexicon,
+ released February 12, 2008.
+
+SYNOPSIS
+ As part of a localization class, automatically glob for available
+ lexicons:
+
+ package Hello::I18N;
+ use base 'Locale::Maketext';
+ use Locale::Maketext::Lexicon {
+ '*' => [Gettext => '/usr/local/share/locale/*/LC_MESSAGES/hello.mo'],
+ ### Uncomment to decode lexicon entries into Unicode strings
+ # _decode => 1,
+ ### Uncomment to fallback when a key is missing from lexicons
+ # _auto => 1,
+ ### Uncomment to use %1 / %quant(%1) instead of [_1] / [quant, _1]
+ # _style => 'gettext',
+ };
+
+ Explicitly specify languages, during compile- or run-time:
+
+ package Hello::I18N;
+ use base 'Locale::Maketext';
+ use Locale::Maketext::Lexicon {
+ de => [Gettext => 'hello_de.po'],
+ fr => [
+ Gettext => 'hello_fr.po',
+ Gettext => 'local/hello/fr.po',
+ ],
+ };
+ # ... incrementally add new lexicons
+ Locale::Maketext::Lexicon->import({
+ de => [Gettext => 'local/hello/de.po'],
+ })
+
+ Alternatively, as part of a localization subclass:
+
+ package Hello::I18N::de;
+ use base 'Hello::I18N';
+ use Locale::Maketext::Lexicon (Gettext => \*DATA);
+ __DATA__
+ # Some sample data
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: Hello 1.3.22.1\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=iso8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+
+ #: Hello.pm:10
+ msgid "Hello, World!"
+ msgstr "Hallo, Welt!"
+
+ #: Hello.pm:11
+ msgid "You have %quant(%1,piece) of mail."
+ msgstr "Sie haben %quant(%1,Poststueck,Poststuecken)."
+
+DESCRIPTION
+ This module provides lexicon-handling modules to read from other
+ localization formats, such as *Gettext*, *Msgcat*, and so on.
+
+ If you are unfamiliar with the concept of lexicon modules, please
+ consult Locale::Maketext and <http://www.autrijus.org/webl10n/> first.
+
+ A command-line utility xgettext.pl is also installed with this module,
+ for extracting translatable strings from source files.
+
+ The "import" function
+ The "import()" function accepts two forms of arguments:
+
+ (*format* => *source* ... )
+ This form takes any number of argument pairs (usually one); *source*
+ may be a file name, a filehandle, or an array reference.
+
+ For each such pair, it pass the contents specified by the second
+ argument to Locale::Maketext::Lexicon::*format*->parse as a plain
+ list, and export its return value as the %Lexicon hash in the
+ calling package.
+
+ In the case that there are multiple such pairs, the lexicon defined
+ by latter ones overrides earlier ones.
+
+ { *language* => [ *format*, *source* ... ] ... }
+ This form accepts a hash reference. It will export a %Lexicon into
+ the subclasses specified by each *language*, using the process
+ described above. It is designed to alleviate the need to set up a
+ separate subclass for each localized language, and just use the
+ catalog files.
+
+ This module will convert the *language* arguments into lowercase,
+ and replace all "-" with "_", so "zh_TW" and "zh-tw" will both map
+ to the "zh_tw" subclass.
+
+ If *language* begins with "_", it is taken as an option that
+ controls how lexicons are parsed. See "Options" for a list of
+ available options.
+
+ The "*" is a special *language*; it must be used in conjunction with
+ a filename that also contains "*"; all matched files with a valid
+ language code in the place of "*" will be automatically prepared as
+ a lexicon subclass. If there is multiple "*" in the filename, the
+ last one is used as the language name.
+
+ Options
+ "_auto"
+ If set to a true value, missing lookups on lexicons are handled
+ silently, as if an "Auto" lexicon has been appended on all language
+ lexicons.
+
+ "_decode"
+ If set to a true value, source entries will be converted into
+ utf8-strings (available in Perl 5.6.1 or later). This feature needs
+ the Encode or Encode::compat module.
+
+ Currently, only the "Gettext" backend supports this option.
+
+ "_encoding"
+ This option only has effect when "_decode" is set to true. It
+ specifies an encoding to store lexicon entries, instead of
+ utf8-strings.
+
+ If "_encoding" is set to "locale", the encoding from the current
+ locale setting is used.
+
+ Subclassing format handlers
+ If you wish to override how sources specified in different data types
+ are handled, please use a subclass that overrides "lexicon_get_*TYPE*".
+
+ XXX: not documented well enough yet. Patches welcome.
+
+NOTES
+ When you attempt to localize an entry missing in the lexicon, Maketext
+ will throw an exception by default. To inhibit this behaviour, override
+ the "_AUTO" key in your language subclasses, for example:
+
+ $Hello::I18N::en::Lexicon{_AUTO} = 1; # autocreate missing keys
+
+ If you want to implement a new "Lexicon::*" backend module, please note
+ that "parse()" takes an array containing the source strings from the
+ specified filehandle or filename, which are *not* "chomp"ed. Although if
+ the source is an array reference, its elements will probably not contain
+ any newline characters anyway.
+
+ The "parse()" function should return a hash reference, which will be
+ assigned to the *typeglob* (*Lexicon) of the language module. All it
+ amounts to is that if the returned reference points to a tied hash, the
+ %Lexicon will be aliased to the same tied hash if it was not initialized
+ previously.
+
+ACKNOWLEDGMENTS
+ Thanks to Jesse Vincent for suggesting this module to be written.
+
+ Thanks also to Sean M. Burke for coming up with Locale::Maketext in the
+ first place, and encouraging me to experiment with alternative Lexicon
+ syntaxes.
+
+ Thanks also to Yi Ma Mao for providing the MO file parsing subroutine,
+ as well as inspiring me to implement file globbing and transcoding
+ support.
+
+ See the AUTHORS file in the distribution for a list of people who have
+ sent helpful patches, ideas or comments.
+
+SEE ALSO
+ xgettext.pl for extracting translatable strings from common template
+ systems and perl source files.
+
+ Locale::Maketext, Locale::Maketext::Lexicon::Auto,
+ Locale::Maketext::Lexicon::Gettext, Locale::Maketext::Lexicon::Msgcat,
+ Locale::Maketext::Lexicon::Tie
+
+AUTHORS
+ Audrey Tang <cpan at audreyt.org>
+
+COPYRIGHT
+ Copyright 2002-2008 by Audrey Tang <cpan at audreyt.org>.
+
+ This software is released under the MIT license cited below.
+
+ The "MIT" License
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/SIGNATURE?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/SIGNATURE (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/SIGNATURE Sun Feb 17 22:21:18 2008
@@ -15,11 +15,11 @@
Hash: SHA1
SHA1 81c677a805827bf5cee403196d398d01ee84b53f AUTHORS
-SHA1 abb8fe88d429a0e9ff933007e2a4bfaf1ca0114a Changes
+SHA1 073b48b62af6cb1f7887ef6a47cc91e9e319f823 Changes
SHA1 a954b8f9dc3f07767ec68f0cf0dca739aacd8a55 MANIFEST
-SHA1 2c6e5734cc51eca73895a4767aa250ad2ec661ce META.yml
+SHA1 353c68f79a042ae9b421072192fee9fa74f67088 META.yml
SHA1 fa0bad8af854f2b377311c90380a55edef614941 Makefile.PL
-SHA1 f58c6ea60a6a26c247095c0a8a3f4df714cffb91 README
+SHA1 70e3f7cd11da87ff03ae9dc33ee3298157f9b649 README
SHA1 7fdfd4cbb0192d65e96e99e9b1b430eb749e5c4f docs/webl10n.html
SHA1 f18225dc7b3944df8aa37337907918fedb9e0385 docs/webl10n.zh-tw.html
SHA1 7e2cfa1b9efe0d502ee57717649c90ba4bd28ba9 inc/Module/Install.pm
@@ -32,14 +32,14 @@
SHA1 92b109a1c78889f8d03eb2b2a1e0c5ea73b7ae72 inc/Module/Install/Scripts.pm
SHA1 0a8b66180229ba2f9deaea1fedd0aacf7a7ace6b inc/Module/Install/Win32.pm
SHA1 d3352eb33fe43a5f3ead513f645224fe34d73bc9 inc/Module/Install/WriteAll.pm
-SHA1 fb711fed1e4269f7569da5d09980648acf47a750 inc/Test/Builder.pm
-SHA1 028954a5cb377df3f660a7ade8631c265df026cc inc/Test/Builder/Module.pm
-SHA1 0781d008b60551d1bd74d56bf065861f4d84cf9d inc/Test/More.pm
+SHA1 98cd56704e09b57d9ba121b45d976c3d09a9f19c inc/Test/Builder.pm
+SHA1 6e95f0ebeb31abc5608a987e88edf2e2427912c4 inc/Test/Builder/Module.pm
+SHA1 1296aa4ac787d6df9f9679d2bae4851ffef63e5a inc/Test/More.pm
SHA1 f8e70396a1f3e0b34668d08871d7519321995283 inc/attributes.pm
-SHA1 481ad7a7ea25f5bc2f5c9117545aa8979e480fea lib/Locale/Maketext/Extract.pm
+SHA1 3e27ca42e11927b55d483164017c54befa72cd6a lib/Locale/Maketext/Extract.pm
SHA1 ae1c100252e17e5963a0e07a1505746d3e851515 lib/Locale/Maketext/Extract/Run.pm
-SHA1 9b5c816344ba880e4124efd390c467bbf70f9b9c lib/Locale/Maketext/Lexicon.pm
-SHA1 80f70b4290f107d76a11032eb161106ed8877f0f lib/Locale/Maketext/Lexicon/Auto.pm
+SHA1 7f5c5483642c2ab88a96e15ce835c1ad5c7e030a lib/Locale/Maketext/Lexicon.pm
+SHA1 6d18ec954610e5bef54e3521dc57db781aee84e2 lib/Locale/Maketext/Lexicon/Auto.pm
SHA1 d3598903e065636bf5f927ab075773ca74af57d2 lib/Locale/Maketext/Lexicon/Gettext.pm
SHA1 aa70e8728c63c0165aea0280e85b8db7be70650f lib/Locale/Maketext/Lexicon/Msgcat.pm
SHA1 b7b970b5ce31515a45e164cb520021e6dbacf8f9 lib/Locale/Maketext/Lexicon/Tie.pm
@@ -48,7 +48,7 @@
SHA1 812a92de30302293470bb12512fdb9b4e0271f4c t/2-lmg.t
SHA1 2e6e1f69fef9c3868bc2d9d323888ef843851e73 t/3-big-endian.t
SHA1 07e68cea617f91bb9dbbd9ce0b8fdd0a486f3125 t/4-encodings.t
-SHA1 6e59cb71b3005eac720da2c2022b27adb451ec4d t/5-extract.t
+SHA1 0305386868418e95ba3ceebadb1299aa744ed433 t/5-extract.t
SHA1 00c15dd4ee62792ab292386b641194fad9d1bf11 t/6-gettext.t
SHA1 ce5c72c3bc2c78bbf8da1a0d73b08523c5d03025 t/99-bug-import-for-subclasses.t
SHA1 20689d41baa53f44caf0bc8ef8fdefcda77d82f9 t/T_L10N.pm
@@ -67,7 +67,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
-iD8DBQFHbTJ7tLPdNzw1AaARAsQNAJ40U0nFKRjATBL3sqXK6vR9xbzQUwCdH8tw
-HER5KzOsvjFJoomD+9r+gyQ=
-=ziUb
+iD8DBQFHsZdbtLPdNzw1AaARAmMIAJ9iSpRJp0uG5QAau0zpULYNKBKzRACeJ7TP
+e/8qskWLXivHQSyUU3QhJ0o=
+=6mss
-----END PGP SIGNATURE-----
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder.pm
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder.pm?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder.pm (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder.pm Sun Feb 17 22:21:18 2008
@@ -9,7 +9,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.72';
+$VERSION = '0.74';
$VERSION = eval $VERSION; # make the alpha version come out as a number
# Make Test::Builder thread-safe for ithreads.
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder/Module.pm
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder/Module.pm?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder/Module.pm (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/Builder/Module.pm Sun Feb 17 22:21:18 2008
@@ -6,7 +6,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = '0.72';
+$VERSION = '0.74';
use strict;
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/More.pm
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/More.pm?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/More.pm (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/inc/Test/More.pm Sun Feb 17 22:21:18 2008
@@ -17,7 +17,7 @@
use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS $TODO);
-$VERSION = '0.72';
+$VERSION = '0.74';
$VERSION = eval $VERSION; # make the alpha version come out as a number
use Test::Builder::Module;
@@ -233,32 +233,37 @@
my($pack,$filename,$line) = caller;
- local($@,$!,$SIG{__DIE__}); # isolate eval
-
- if( @imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/ ) {
- # probably a version check. Perl needs to see the bare number
- # for it to work with non-Exporter based modules.
- eval <<USE;
+ # Work around a glitch in $@ and eval
+ my $eval_error;
+ {
+ local($@,$!,$SIG{__DIE__}); # isolate eval
+
+ if( @imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/ ) {
+ # probably a version check. Perl needs to see the bare number
+ # for it to work with non-Exporter based modules.
+ eval <<USE;
package $pack;
use $module $imports[0];
USE
- }
- else {
- eval <<USE;
+ }
+ else {
+ eval <<USE;
package $pack;
use $module \@imports;
USE
- }
-
- my $ok = $tb->ok( !$@, "use $module;" );
+ }
+ $eval_error = $@;
+ }
+
+ my $ok = $tb->ok( !$eval_error, "use $module;" );
unless( $ok ) {
- chomp $@;
+ chomp $eval_error;
$@ =~ s{^BEGIN failed--compilation aborted at .*$}
{BEGIN failed--compilation aborted at $filename line $line.}m;
$tb->diag(<<DIAGNOSTIC);
Tried to use '$module'.
- Error: $@
+ Error: $eval_error
DIAGNOSTIC
}
@@ -266,7 +271,7 @@
return $ok;
}
-#line 702
+#line 707
sub require_ok ($) {
my($module) = shift;
@@ -310,7 +315,7 @@
$module =~ /^[a-zA-Z]\w*$/;
}
-#line 779
+#line 784
use vars qw(@Data_Stack %Refs_Seen);
my $DNE = bless [], 'Does::Not::Exist';
@@ -417,7 +422,7 @@
return '';
}
-#line 925
+#line 930
sub diag {
my $tb = Test::More->builder;
@@ -426,7 +431,7 @@
}
-#line 994
+#line 999
#'#
sub skip {
@@ -454,7 +459,7 @@
}
-#line 1081
+#line 1086
sub todo_skip {
my($why, $how_many) = @_;
@@ -475,7 +480,7 @@
last TODO;
}
-#line 1134
+#line 1139
sub BAIL_OUT {
my $reason = shift;
@@ -484,7 +489,7 @@
$tb->BAIL_OUT($reason);
}
-#line 1173
+#line 1178
#'#
sub eq_array {
@@ -608,7 +613,7 @@
}
-#line 1304
+#line 1309
sub eq_hash {
local @Data_Stack;
@@ -641,7 +646,7 @@
return $ok;
}
-#line 1361
+#line 1366
sub eq_set {
my($a1, $a2) = @_;
@@ -667,6 +672,6 @@
);
}
-#line 1551
+#line 1556
1;
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Extract.pm
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Extract.pm?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Extract.pm (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Extract.pm Sun Feb 17 22:21:18 2008
@@ -1,5 +1,5 @@
package Locale::Maketext::Extract;
-$Locale::Maketext::Extract::VERSION = '0.22';
+$Locale::Maketext::Extract::VERSION = '0.23';
use strict;
@@ -50,6 +50,14 @@
=item Text::Template
Sentences between C<STARTxxx> and C<ENDxxx> are extracted individually.
+
+=item HTML::FormFu
+
+HTML::FormFu uses a config-file to generate forms, with built in
+support for localizing errors, labels etc.
+
+We extract the text after C<_loc: >:
+ content_loc: this is the string
=item Generic Template
@@ -233,6 +241,14 @@
$vars =~ s/\)\s*$//;
$self->add_entry($str, [ $file, $line, $vars ]);
}
+
+ # HTML::FormFu config-files
+ $line = 1; pos($_) = 0;
+ while (m/\G(.*?_loc:\s+(.*))/sg) {
+ my ($str) = $2;
+ $line += ( () = ($1 =~ /\n/g) ); # cryptocontext!
+ $self->add_entry($str, [ $file, $line ]);
+ }
# Generic Template:
$line = 1; pos($_) = 0;
@@ -528,7 +544,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005, 2006, 2007 by Audrey Tang E<lt>cpan at audreyt.orgE<gt>.
+Copyright 2003-2008 by Audrey Tang E<lt>cpan at audreyt.orgE<gt>.
This software is released under the MIT license cited below.
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon.pm
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon.pm?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon.pm (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon.pm Sun Feb 17 22:21:18 2008
@@ -1,5 +1,5 @@
package Locale::Maketext::Lexicon;
-$Locale::Maketext::Lexicon::VERSION = '0.65';
+$Locale::Maketext::Lexicon::VERSION = '0.66';
use 5.004;
use strict;
@@ -10,8 +10,8 @@
=head1 VERSION
-This document describes version 0.65 of Locale::Maketext::Lexicon,
-released December 22, 2007.
+This document describes version 0.66 of Locale::Maketext::Lexicon,
+released February 12, 2008.
=head1 SYNOPSIS
@@ -535,7 +535,7 @@
=head1 COPYRIGHT
-Copyright 2002, 2003, 2004, 2005, 2006, 2007 by Audrey Tang E<lt>cpan at audreyt.orgE<gt>.
+Copyright 2002-2008 by Audrey Tang E<lt>cpan at audreyt.orgE<gt>.
This software is released under the MIT license cited below.
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon/Auto.pm
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon/Auto.pm?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon/Auto.pm (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/lib/Locale/Maketext/Lexicon/Auto.pm Sun Feb 17 22:21:18 2008
@@ -1,5 +1,5 @@
package Locale::Maketext::Lexicon::Auto;
-$Locale::Maketext::Lexicon::Auto::VERSION = '0.04';
+$Locale::Maketext::Lexicon::Auto::VERSION = '0.10';
use strict;
@@ -34,7 +34,7 @@
=cut
sub parse {
- return { _AUTO => 1 };
+ +{ _AUTO => 1 };
}
1;
Modified: branches/upstream/liblocale-maketext-lexicon-perl/current/t/5-extract.t
URL: http://svn.debian.org/wsvn/branches/upstream/liblocale-maketext-lexicon-perl/current/t/5-extract.t?rev=15092&op=diff
==============================================================================
--- branches/upstream/liblocale-maketext-lexicon-perl/current/t/5-extract.t (original)
+++ branches/upstream/liblocale-maketext-lexicon-perl/current/t/5-extract.t Sun Feb 17 22:21:18 2008
@@ -1,7 +1,7 @@
#! /usr/bin/perl -w
use lib '../lib';
use strict;
-use Test::More tests => 28;
+use Test::More tests => 29;
use_ok('Locale::Maketext::Extract');
my $Ext = Locale::Maketext::Extract->new;
@@ -44,6 +44,8 @@
extract_ok(q(_(q{foo\\\\bar})) => 'foo\\bar', 'Normalized \\\\ in q');
extract_ok(q(_(qq{foo\bar})) => "foo\bar", 'Interpolated \b in qq');
+# HTML::FormFu test
+extract_ok(' content_loc: foo bar' => "foo bar", "html-formfu extraction");
extract_ok(
q(my $x = loc('I "think" you\'re a cow.') . "\n";) => 'I "think" you\'re a cow.',
More information about the Pkg-perl-cvs-commits
mailing list