[Jifty-commit] r2144 - in jifty/branches/template-declare: . debian
examples/Chat/t lib lib/Jifty lib/Jifty/Manual
lib/Jifty/Script lib/Jifty/Web/Form lib/Jifty/Web/Form/Field
plugins/EditInPlace/debian plugins/Login/debian
plugins/Login/lib/Jifty/Plugin/Login
plugins/Login/lib/Jifty/Plugin/Login/Action
plugins/Login/lib/Jifty/Plugin/Login/Notification
plugins/Login/share/po plugins/Login/share/web/templates/let
share/po t t/TestApp/t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Nov 12 20:26:00 EST 2006
Author: jesse
Date: Sun Nov 12 20:25:58 2006
New Revision: 2144
Added:
jifty/branches/template-declare/examples/Chat/t/00compile.t
jifty/branches/template-declare/examples/Chat/t/01startup.t
jifty/branches/template-declare/plugins/EditInPlace/debian/
jifty/branches/template-declare/plugins/EditInPlace/debian/changelog
jifty/branches/template-declare/plugins/EditInPlace/debian/compat
jifty/branches/template-declare/plugins/EditInPlace/debian/control
jifty/branches/template-declare/plugins/EditInPlace/debian/rules (contents, props changed)
jifty/branches/template-declare/plugins/Login/debian/
jifty/branches/template-declare/plugins/Login/debian/changelog
jifty/branches/template-declare/plugins/Login/debian/compat
jifty/branches/template-declare/plugins/Login/debian/control
jifty/branches/template-declare/plugins/Login/debian/rules (contents, props changed)
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ChangePassword.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm
jifty/branches/template-declare/plugins/Login/share/po/en.po
jifty/branches/template-declare/plugins/Login/share/po/fr.po
jifty/branches/template-declare/plugins/Login/share/web/templates/chgpasswd
jifty/branches/template-declare/plugins/Login/share/web/templates/let/reset_lost_password
jifty/branches/template-declare/plugins/Login/share/web/templates/passwordreminder
jifty/branches/template-declare/share/po/fr.po
jifty/branches/template-declare/t/01-test-web.t
Modified:
jifty/branches/template-declare/ (props changed)
jifty/branches/template-declare/debian/README
jifty/branches/template-declare/debian/changelog
jifty/branches/template-declare/debian/control
jifty/branches/template-declare/debian/rules
jifty/branches/template-declare/lib/Jifty.pm
jifty/branches/template-declare/lib/Jifty/Action.pm
jifty/branches/template-declare/lib/Jifty/I18N.pm
jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod
jifty/branches/template-declare/lib/Jifty/Param.pm
jifty/branches/template-declare/lib/Jifty/Request.pm
jifty/branches/template-declare/lib/Jifty/Result.pm
jifty/branches/template-declare/lib/Jifty/Script/FastCGI.pm
jifty/branches/template-declare/lib/Jifty/Script/Po.pm
jifty/branches/template-declare/lib/Jifty/Test.pm
jifty/branches/template-declare/lib/Jifty/Web/Form/Element.pm
jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm
jifty/branches/template-declare/lib/Jifty/Web/Form/Field/Combobox.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Login.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Dispatcher.pm
jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm
jifty/branches/template-declare/plugins/Login/share/web/templates/login
jifty/branches/template-declare/plugins/Login/share/web/templates/logout
jifty/branches/template-declare/plugins/Login/share/web/templates/signup
jifty/branches/template-declare/t/TestApp/t/12-search.t
Log:
r44774 at pinglin: jesse | 2006-11-12 20:25:46 -0500
* Mergedown from Trunk
r44707 at pinglin: jesse | 2006-11-09 12:45:57 -0500
r29738 at pinglin (orig r2106): yves | 2006-11-02 02:22:15 -0500
Add yves in authors, for localisation, debian packaging
r29852 at pinglin (orig r2110): schwern | 2006-11-03 18:17:33 -0500
r25223 at windhund: schwern | 2006-11-03 14:21:22 -0500
Typo in POD link.
r29853 at pinglin (orig r2111): schwern | 2006-11-03 18:17:52 -0500
r25224 at windhund: schwern | 2006-11-03 14:22:30 -0500
Add Jifty::Test->web to allow using Jifty->web in tests without a bunch of scaffolding.
r29854 at pinglin (orig r2112): schwern | 2006-11-03 18:18:31 -0500
r25225 at windhund: schwern | 2006-11-03 14:24:41 -0500
Convert to using Jifty::Test->web
r29855 at pinglin (orig r2113): wolfgang | 2006-11-04 14:23:19 -0500
added explanations about Login Plugin to AccessControl.pod
r29856 at pinglin (orig r2114): yves | 2006-11-04 16:39:23 -0500
plugins localization and french po files
r29858 at pinglin (orig r2116): gaal | 2006-11-06 02:05:40 -0500
minor English tweak
r29859 at pinglin (orig r2117): yves | 2006-11-06 06:18:46 -0500
Files for debian packaging, now rather for actual cpan release than for svn.
r44605 at pinglin (orig r2119): clkao | 2006-11-07 02:50:56 -0500
Extract messages from TemplateRoot, not share.
r44606 at pinglin (orig r2120): audreyt | 2006-11-07 17:04:57 -0500
* Jifty::Script::FastCGI doc - it's share/web/ not web/ nowadays.
r44705 at pinglin (orig r2122): yves | 2006-11-09 08:53:35 -0500
Add missing mail confirm address localization
Fix typo
r44706 at pinglin (orig r2123): schwern | 2006-11-09 12:32:45 -0500
r25452 at windhund: schwern | 2006-11-09 12:32:15 -0500
Change the accessor generation for overriden accessors to use _foo_accessor()
rather than declare _foo and wrap it with foo(). This is the preferred
way to override Class::Accessor accessors and avoids having to special case
each overriden accessor.
Take the list of properties in the Jifty::Web::Form::Field POD and make them
real accessors. I'm not 100% sure they should all be declared, but some
are documented yet undeclared. constructor is declared and documented in
Jifty::Param so maybe it should be removed from Field. Anyhow, better to
have a maintained list of accessors than an unmaintained comment.
r44746 at pinglin: jesse | 2006-11-10 17:36:44 -0500
r44742 at pinglin (orig r2124): schwern | 2006-11-09 13:46:35 -0500
r25455 at windhund: schwern | 2006-11-09 13:45:49 -0500
Revert merging the properties list in the Jifty::Web::Form::Field POD into
the list of generated accessors.
r44743 at pinglin (orig r2125): audreyt | 2006-11-09 14:15:26 -0500
* Jifty::Param - It's no longer a Jifty::Web::Form::Field subclass.
r44744 at pinglin (orig r2126): yves | 2006-11-10 05:04:30 -0500
Add action change password in login plugin
r44745 at pinglin (orig r2127): yves | 2006-11-10 17:13:45 -0500
Login plugin : Add missing Notification::ConfirmLostPassword,
dispatcher for passwordreminder,
let to reset lost password
Modified: jifty/branches/template-declare/debian/README
==============================================================================
--- jifty/branches/template-declare/debian/README (original)
+++ jifty/branches/template-declare/debian/README Sun Nov 12 20:25:58 2006
@@ -14,4 +14,13 @@
Please let me know if they do and I'll try and fix them.
Bart Bunting
-
+
+And others packages from cpan 0.60912 here :
+ deb http://ftp.univ-metz.fr/debian sarge jifty
+
+with some plugins packages, update for sarge and ubuntu 6.06 LTS
+
+Yves Agostini
+
+We work on harmonizing and cleaning this ...
+
Modified: jifty/branches/template-declare/debian/changelog
==============================================================================
--- jifty/branches/template-declare/debian/changelog (original)
+++ jifty/branches/template-declare/debian/changelog Sun Nov 12 20:25:58 2006
@@ -1,3 +1,17 @@
+jifty (0.60912-2) unstable; urgency=low
+
+ * Add missing dependencies,
+ * Add fr.po
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Wed, 25 Oct 2006 09:46:26 +0200
+
+jifty (0.60912-1) unstable; urgency=low
+
+ * Change version and clean dependencies on module-refresh-perl and
+ locale-maketext-lexicon for sarge
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Mon, 23 Oct 2006 10:55:17 +0200
+
jifty (0.60728-3) unstable; urgency=low
* Missed some date dependencies
Modified: jifty/branches/template-declare/debian/control
==============================================================================
--- jifty/branches/template-declare/debian/control (original)
+++ jifty/branches/template-declare/debian/control Sun Nov 12 20:25:58 2006
@@ -53,20 +53,21 @@
libcompress-zlib-perl, libcss-squish-perl (>> 0.05),
libcrypt-cbc-perl, libdatetime-format-builder-perl,
libdatetime-format-iso8601-perl, libdate-manip-perl,
- libextutils-command-perl (>> 1.11), libfile-find-rule-perl,
- libfile-mmagic-perl, libfile-sharedir-perl, libhash-merge-perl,
- libhtml-lint-perl, libhtml-mason-perl (>> 1.31),
+ libfile-find-rule-perl, libfile-mmagic-perl, libfile-sharedir-perl,
+ libhash-merge-perl, libhtml-lint-perl, libhtml-mason-perl (>> 1.31),
libhttp-server-simple-perl (>> 0.20),
libhttp-server-simple-recorder-perl, liblog-log4perl-perl,
liblocale-maketext-lexicon-perl (>> 0.60),
- liblocale-maketext-simple-perl, libemail-folder-perl,
+ liblocale-maketext-simple-perl (>> 0.18), libemail-folder-perl,
libemail-localdelivery-perl, libemail-mime-perl,
libemail-mime-creator-perl, libemail-send-perl, libmime-types-perl,
libmodule-pluggable-perl (>> 2.95), libmodule-refresh-perl (>> 0.09),
libobject-declare-perl, libscalar-defer-perl,
libstring-koremutake-perl, libspiffy-perl, libwww-mechanize-perl (>>
1.12), libversion-perl, libxml-simple-perl, libxml-writer-perl,
- libxml-xpath-perl, libyaml-perl, libyaml-syck-perl (>> 0.67),
+ libxml-xpath-perl, libyaml-perl, libyaml-syck-perl (>> 0.67),
+ libhook-lexwrap-perl, libparams-util-perl, libclass-inspector-perl,
+ libemail-mime-contenttype-perl,
Description: Jifty perl libraries
Yet another web framework.
.
Modified: jifty/branches/template-declare/debian/rules
==============================================================================
--- jifty/branches/template-declare/debian/rules (original)
+++ jifty/branches/template-declare/debian/rules Sun Nov 12 20:25:58 2006
@@ -38,7 +38,7 @@
dh_testroot
# Add commands to clean up after the build process here
- $(MAKE) clean
+ -$(MAKE) clean
dh_clean build-stamp install-stamp
install: build install-stamp
Added: jifty/branches/template-declare/examples/Chat/t/00compile.t
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/examples/Chat/t/00compile.t Sun Nov 12 20:25:58 2006
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+use Test::More;
+
+use File::Find;
+
+my @modules;
+find sub {
+ return unless /\.pm$/;
+ push @modules, $File::Find::name;
+}, "lib";
+
+ at modules = map { s[^lib/][]; $_ =~ s[.pm$][]; $_ =~ s[/][::]g; $_ } @modules;
+
+plan tests => scalar @modules;
+
+for my $module (@modules) {
+ require_ok $module;
+}
Added: jifty/branches/template-declare/examples/Chat/t/01startup.t
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/examples/Chat/t/01startup.t Sun Nov 12 20:25:58 2006
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+
+use Jifty::Test 'no_plan';
+use Jifty::Test::WWW::Mechanize;
+
+# Startup the server.
+my $server = Jifty::Test->make_server;
+isa_ok($server, 'Jifty::Server');
+
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new;
+
+$mech->get_ok("$URL", "got the front page");
Modified: jifty/branches/template-declare/lib/Jifty.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty.pm (original)
+++ jifty/branches/template-declare/lib/Jifty.pm Sun Nov 12 20:25:58 2006
@@ -115,7 +115,6 @@
# Load the configuration. stash it in ->config
Jifty->config( Jifty::Config->new() );
- Jifty::I18N->refresh(); # can't do this before we have the config set up
# Now that we've loaded the configuration, we can remove the temporary
# Jifty::DBI::Record baseclass for records and insert our "real" baseclass,
@@ -145,6 +144,9 @@
$class_loader->require;
Jifty->plugins(@plugins);
+
+ Jifty::I18N->refresh(); # can't do this before we have the config set up and load plugins
+
Jifty->handler(Jifty::Handler->new());
Jifty->api(Jifty::API->new());
Modified: jifty/branches/template-declare/lib/Jifty/Action.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Action.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Action.pm Sun Nov 12 20:25:58 2006
@@ -76,7 +76,7 @@
=item arguments
A hash reference of default values for the
-L<arguments|Jifty::Manual::Glossary/arguments> of the action. Defaults to
+L<arguments|Jifty::Manual::Glossary/argument> of the action. Defaults to
none.
=item sticky_on_failure
@@ -148,13 +148,13 @@
=head2 _generate_moniker
-Construct an moniker for a new (or soon-to-be-constructed) action that did not have
+Construct a moniker for a new (or soon-to-be-constructed) action that did not have
an explicit moniker specified. The algorithm is simple: We snapshot the call stack,
prefix it with the action class, and then append it with an per-request autoincrement
counter in case the same class/stack is encountered twice, which can happen if the
programmer placed a C<new_action> call inside a loop.
-The monikers generated this way is guaranteed to work across requests.
+Monikers generated this way are guaranteed to work across requests.
=cut
Modified: jifty/branches/template-declare/lib/Jifty/I18N.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/I18N.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/I18N.pm Sun Nov 12 20:25:58 2006
@@ -6,6 +6,7 @@
use Locale::Maketext::Lexicon ();
use Email::MIME::ContentType;
use Encode::Guess qw(iso-8859-1);
+use File::ShareDir ':ALL';
=head1 NAME
@@ -35,13 +36,18 @@
my $self = {};
bless $self, $class;
+ my @import = (
+ 'Gettext',Jifty->config->framework('L10N')->{'PoDir'}. '/*.po',
+ 'Gettext',Jifty->config->framework('L10N')->{'DefaultPoDir'}. '/*.po'
+ );
+
+ foreach my $plugin (Jifty->plugins) {
+ push @import, 'Gettext';
+ push @import, module_dir(ref($plugin)).'/po/*.po';
+ };
+
Locale::Maketext::Lexicon->import(
- { '*' => [
- Gettext => Jifty->config->framework('L10N')->{'PoDir'}
- . '/*.po',
- Gettext => Jifty->config->framework('L10N')->{'DefaultPoDir'}
- . '/*.po',
- ],
+ { '*' => \@import,
_decode => 1,
_auto => 1,
_style => 'gettext',
Modified: jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod (original)
+++ jifty/branches/template-declare/lib/Jifty/Manual/AccessControl.pod Sun Nov 12 20:25:58 2006
@@ -2,7 +2,7 @@
Jifty::Manual::AccessControl
-=head2 DESCRIPTION
+=head1 DESCRIPTION
Out of the box Jifty-based applications have an ACL system. The system
@@ -28,5 +28,104 @@
administrators update the C<paid_account> field. In that case, you'd override
C<check_update_rights()> to look for the C<admin> right rather than the C<update> right, if the C<FIELD> is C<paid_account>.
+=head1 ENABLING ACCESS CONTROL USING THE LOGIN PLUGIN
+
+To painlessly enable the AccessControl subsystem, the
+C<Login> plugin may get enabled. This is done in the
+F<etc/config.yml> configuration file.
+
+ Plugins:
+ - Login: {}
+
+Then, create an C<App::Model::User> class that derives from
+C<Jifty::Plugin::Login::Model::User>, for example like that:
+
+ use strict;
+ use warnings;
+
+ package App::Model::User;
+ use base 'Jifty::Plugin::Login::Model::User';
+
+ # Your model-specific methods go here.
+
+ 1;
+
+Next, create the table in your database using the F<jifty> executable
+like C<./bin/jifty schema --setup>.
+
+=head2 Expanding the Model
+
+The model that manages C<User> Records is not limited to the plugin's
+definition. It can be expanded by providing an additional schema
+definition. Every column here will be added to the plugin's
+columns. Simply add a schema definition block like the following:
+
+ use Jifty::DBI::Schema;
+ use App::Record schema {
+ column 'extra_column_name';
+
+ # more columns if necessary
+ };
+
+The full syntax for defining a schema can be found in
+L<Jifty::Manual::Models> or in L<Jifty::DBI::Schema>.
+
+Defining a method C<_init> in your C<App::CurrentUser> class gives you
+a chance to add more data to the C<CurrentUser> object. This method
+will automatically get called after the Plugin's C<_init> is done.
+
+=head2 Templates defined by the Login plugin
+
+To avoid the need for repetitive work, the Login plugin already
+defines a couple of usable templates:
+
+=over 4
+
+=item F</login>
+
+provides a login screen with a signup option. After
+successful login, the current Continuation is called. If no
+Continuation exists, the template sitting at the base URL (F</>) is called.
+
+=item F</logout>
+
+logs out the current user.
+
+=item F</signup>
+
+allows a user to sign up himself. As a default
+behavior a confirmation mail is sent out that has to get followed by
+the user.
+
+=item F</confirm_email>
+
+is called in the mail and results in accepting
+the user.
+
+=back
+
+=head2 Doing checks at other places in your code
+
+If you need to check more than Model-based record operations you will
+have to do some coding on your
+own. C<Jifty-E<gt>web-E<gt>current_user> provides a
+C<App::CurrentUser> object that can get queried about the current
+user. This object provides some convenience methods:
+
+=over 4
+
+=item C<username>
+
+returns the name of the current user or C<undef> if not logged in.
+
+=item C<id>
+
+returns the id of the current user or C<undef> if not logged in.
+
+=back
+
+=head1 SEE ALSO
+
+L<Jifty::CurrentUser>, L<Jifty::Record>, L<Jifty::RightsFrom>
=cut
Modified: jifty/branches/template-declare/lib/Jifty/Param.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Param.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Param.pm Sun Nov 12 20:25:58 2006
@@ -15,9 +15,11 @@
=head2 accessors
-See L<Jifty::Web::Form::Field> for the list of possible keys that each
-parameter can have. In addition to the list there, you may use these
-additional keys:
+Although this class is not derived from B<Jifty::Web::Form::Field>,
+it does share the accessors from it; see L<Jifty::Web::Form::Field>,
+for the list of possible keys that each parameter can have.
+
+In addition to the list there, you may use these additional keys:
=over
@@ -67,12 +69,19 @@
=cut
-use base qw/Jifty::Web::Form::Field Class::Accessor::Fast/;
-use constant ACCESSORS => qw(constructor valid_values available_values sort_order);
+# We share accessors with Jifty::Web::Form::Field, but not its methods,
+# so it's not an inheritance relationsip.
+use Jifty::Web::Form::Field ();
+
+use base qw/Class::Accessor::Fast/;
+use constant ACCESSORS => (
+ Jifty::Web::Form::Field->accessors,
+ qw(constructor valid_values available_values sort_order),
+);
__PACKAGE__->mk_accessors(ACCESSORS);
-sub accessors { (shift->SUPER::accessors(), ACCESSORS) }
+sub accessors { ACCESSORS }
=head2 new
@@ -82,7 +91,6 @@
=cut
-# Inhibit the reblessing inherent in Jifty::Web::Form::Field->new
sub new {
my $class = shift;
$class->Class::Accessor::Fast::new({
Modified: jifty/branches/template-declare/lib/Jifty/Request.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Request.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Request.pm Sun Nov 12 20:25:58 2006
@@ -4,7 +4,7 @@
package Jifty::Request;
use base qw/Jifty::Object Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw(_top_request arguments just_validating path continuation_id continuation_type continuation_path));
+__PACKAGE__->mk_accessors(qw(top_request arguments just_validating path continuation_id continuation_type continuation_path));
use Jifty::JSON;
use Jifty::YAML;
@@ -837,7 +837,7 @@
sub is_subrequest {
my $self = shift;
- return $self->_top_request ? 1 : undef;
+ return $self->_top_request_accessor ? 1 : undef;
}
=head2 top_request
@@ -850,8 +850,8 @@
sub top_request {
my $self = shift;
- $self->_top_request(@_) if @_;
- return $self->_top_request || $self;
+ $self->_top_request_accessor(@_) if @_;
+ return $self->_top_request_accessor || $self;
}
package Jifty::Request::Action;
Modified: jifty/branches/template-declare/lib/Jifty/Result.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Result.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Result.pm Sun Nov 12 20:25:58 2006
@@ -19,7 +19,7 @@
use base qw/Jifty::Object Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw(failure action_class message _content));
+__PACKAGE__->mk_accessors(qw(failure action_class message content));
=head2 new
@@ -35,7 +35,7 @@
my $self = bless {}, $class;
$self->failure(0);
- $self->_content({});
+ $self->_content_accessor({});
return $self;
}
@@ -146,11 +146,11 @@
sub content {
my $self = shift;
- return $self->_content unless @_;
+ return $self->_content_accessor unless @_;
my $key = shift;
- $self->_content->{$key} = shift if @_;
- return $self->_content->{$key};
+ $self->_content_accessor->{$key} = shift if @_;
+ return $self->_content_accessor->{$key};
}
1;
Modified: jifty/branches/template-declare/lib/Jifty/Script/FastCGI.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Script/FastCGI.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Script/FastCGI.pm Sun Nov 12 20:25:58 2006
@@ -23,14 +23,14 @@
to call jifty a bit differently:
AddHandler fastcgi-script fcgi
- DocumentRoot /path/to/your/jifty/app/web/templates
+ DocumentRoot /path/to/your/jifty/app/share/web/templates
FastCgiServer /path/to/your/jifty/app/bin/jifty -initial-env JIFTY_COMMAND=fastcgi
ScriptAlias / /path/to/your/jifty/app/bin/jifty/
For B<lighttpd> (L<http://www.lighttpd.net/>), use this setting:
server.modules = ( "mod_fastcgi" )
- server.document-root = "/path/to/your/jifty/app/web/templates"
+ server.document-root = "/path/to/your/jifty/app/share/web/templates"
fastcgi.server = (
"" => (
"your_jifty_app" => (
Modified: jifty/branches/template-declare/lib/Jifty/Script/Po.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Script/Po.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Script/Po.pm Sun Nov 12 20:25:58 2006
@@ -122,7 +122,7 @@
sub extract_messages {
my $self = shift;
# find all the .pm files in @INC
- my @files = File::Find::Rule->file->in( 'share', 'lib', 'bin' );
+ my @files = File::Find::Rule->file->in( Jifty->config->framework('Web')->{'TemplateRoot'}, 'lib', 'bin' );
my $logger =Log::Log4perl->get_logger("main");
foreach my $file (@files) {
Modified: jifty/branches/template-declare/lib/Jifty/Test.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Test.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Test.pm Sun Nov 12 20:25:58 2006
@@ -227,6 +227,26 @@
return $server;
}
+
+=head2 web
+
+Like calling C<<Jifty->web>>.
+
+C<<Jifty::Test->web>> does the necessary Jifty->web initialization for
+it to be usable in a test.
+
+=cut
+
+sub web {
+ my $class = shift;
+
+ Jifty->web->request(Jifty::Request->new) unless Jifty->web->request;
+ Jifty->web->response(Jifty::Response->new) unless Jifty->web->response;
+
+ return Jifty->web;
+}
+
+
=head2 mailbox
A mailbox used for testing mail sending.
Modified: jifty/branches/template-declare/lib/Jifty/Web/Form/Element.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Web/Form/Element.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Web/Form/Element.pm Sun Nov 12 20:25:58 2006
@@ -145,7 +145,7 @@
=cut
sub accessors { shift->handlers, qw(class key_binding id label tooltip) }
-__PACKAGE__->mk_accessors(qw(_onclick class key_binding id label tooltip));
+__PACKAGE__->mk_accessors(qw(onclick class key_binding id label tooltip));
=head2 new PARAMHASH OVERRIDE
@@ -179,7 +179,7 @@
sub onclick {
my $self = shift;
- return $self->_onclick unless @_;
+ return $self->_onclick_accessor unless @_;
my ($arg) = @_;
@@ -213,7 +213,7 @@
}
- $self->_onclick($arg);
+ $self->_onclick_accessor($arg);
}
=head2 javascript
Modified: jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm Sun Nov 12 20:25:58 2006
@@ -104,8 +104,30 @@
=cut
-sub accessors { shift->SUPER::accessors(), qw(name label input_name type sticky sticky_value default_value action mandatory ajax_validates ajax_canonicalizes autocompleter preamble hints placeholder focus render_mode length _element_id); }
-__PACKAGE__->mk_accessors(qw(name _label _input_name type sticky sticky_value default_value _action mandatory ajax_validates ajax_canonicalizes autocompleter preamble hints placeholder focus render_mode length _element_id));
+use constant ACCESSORS => qw(
+ name
+ label
+ input_name
+ type
+ sticky
+ sticky_value
+ default_value
+ action
+ mandatory
+ ajax_validates
+ ajax_canonicalizes
+ autocompleter
+ preamble
+ hints
+ placeholder
+ focus
+ render_mode
+ length
+ element_id
+);
+
+sub accessors { shift->SUPER::accessors(), ACCESSORS }
+__PACKAGE__->mk_accessors(ACCESSORS);
=head2 name [VALUE]
@@ -191,7 +213,7 @@
# Otherwise, we should ask our action, how to turn our "name"
# into a form input name.
- my $ret = $self->_input_name(@_);
+ my $ret = $self->_input_name_accessor(@_);
return $ret if $ret;
my $action = $self->action;
@@ -235,7 +257,7 @@
sub label {
my $self = shift;
- my $val = $self->_label(@_);
+ my $val = $self->_label_accessor(@_);
defined $val ? $val : $self->name;
}
@@ -251,7 +273,7 @@
sub element_id {
my $self = shift;
- return $self->_element_id || $self->_element_id( $self->input_name ."-".Jifty->web->serial);
+ return $self->_element_id_accessor || $self->_element_id_accessor( $self->input_name ."-".Jifty->web->serial);
}
=head2 action [VALUE]
@@ -265,11 +287,11 @@
sub action {
my $self = shift;
- my $action = $self->_action(@_);
+ my $action = $self->_action_accessor(@_);
# If we're setting the action, we need to weaken
# the reference to not get caught in a loop
- Scalar::Util::weaken( $self->{_action} ) if @_;
+ Scalar::Util::weaken( $self->{action} ) if @_;
return $action;
}
Modified: jifty/branches/template-declare/lib/Jifty/Web/Form/Field/Combobox.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Web/Form/Field/Combobox.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Web/Form/Field/Combobox.pm Sun Nov 12 20:25:58 2006
@@ -27,7 +27,7 @@
@{[ $self->_widget_class('combo-button')]}
></span></span><span style="display: none"></span><select
name="@{[ $self->input_name ]}"
- id="@{[ $self->_element_id ]}_List"
+ id="@{[ $self->_element_id_accessor ]}_List"
@{[ $self->_widget_class('combo-list')]}
onchange="ComboBox_SimpleAttach(this, this.form['@{[ $self->element_id ]}']); "
>
Added: jifty/branches/template-declare/plugins/EditInPlace/debian/changelog
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/EditInPlace/debian/changelog Sun Nov 12 20:25:58 2006
@@ -0,0 +1,6 @@
+libjifty-plugin-editinplace-perl (0-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Mon, 23 Oct 2006 11:26:37 +0200
+
Added: jifty/branches/template-declare/plugins/EditInPlace/debian/compat
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/EditInPlace/debian/compat Sun Nov 12 20:25:58 2006
@@ -0,0 +1 @@
+4
Added: jifty/branches/template-declare/plugins/EditInPlace/debian/control
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/EditInPlace/debian/control Sun Nov 12 20:25:58 2006
@@ -0,0 +1,15 @@
+Source: libjifty-plugin-editinplace-perl
+Section: perl
+Priority: optional
+Build-Depends: debhelper (>= 4.0.2)
+Build-Depends-Indep: perl (>= 5.8.0-7)
+Maintainer: AGOSTINI Yves <agostini at univ-metz.fr>
+Standards-Version: 3.6.1
+
+Package: libjifty-plugin-editinplace-perl
+Architecture: all
+Depends: ${perl:Depends}, ${misc:Depends},
+Description: Jifty::Plugin::EditInPlace
+ .
+ Jifty Plugin, file editor for devel mode.
+ .
Added: jifty/branches/template-declare/plugins/EditInPlace/debian/rules
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/EditInPlace/debian/rules Sun Nov 12 20:25:58 2006
@@ -0,0 +1,83 @@
+#!/usr/bin/make -f
+# This debian/rules file is provided as a template for normal perl
+# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
+# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
+# be used freely wherever it is useful.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+export PERL_MM_USE_DEFAULT=1
+
+PACKAGE=$(shell dh_listpackages)
+
+ifndef PERL
+PERL = /usr/bin/perl
+endif
+
+TMP =$(CURDIR)/debian/$(PACKAGE)
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+
+ # Add commands to compile the package here
+ $(PERL) Makefile.PL INSTALLDIRS=vendor
+ $(MAKE) OPTIMIZE="-Wall -O2 -g"
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+
+ # Add commands to clean up after the build process here
+ -$(MAKE) distclean
+
+ dh_clean build-stamp install-stamp
+
+install: build install-stamp
+install-stamp:
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+
+ # Add commands to install the package into debian/$PACKAGE_NAME here
+ $(MAKE) test
+ $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+
+ # As this is a architecture independent package, we are not
+ # supposed to install stuff to /usr/lib. MakeMaker creates
+ # the dirs, we delete them from the deb:
+ rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
+
+ touch install-stamp
+
+binary-arch:
+# We have nothing to do by default.
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+# dh_installcron
+# dh_installmenu
+# dh_installexamples
+ dh_installdocs
+ dh_installchangelogs
+ dh_perl
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
Added: jifty/branches/template-declare/plugins/Login/debian/changelog
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/debian/changelog Sun Nov 12 20:25:58 2006
@@ -0,0 +1,18 @@
+libjifty-plugin-login-perl (0.01-3) unstable; urgency=low
+
+ * Add dependencies, update fr po
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Wed, 25 Oct 2006 10:46:46 +0200
+
+libjifty-plugin-login-perl (0.01-2) unstable; urgency=low
+
+ * add fr po
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Mon, 23 Oct 2006 15:59:14 +0200
+
+libjifty-plugin-login-perl (0.01-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Mon, 23 Oct 2006 11:21:36 +0200
+
Added: jifty/branches/template-declare/plugins/Login/debian/compat
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/debian/compat Sun Nov 12 20:25:58 2006
@@ -0,0 +1 @@
+4
Added: jifty/branches/template-declare/plugins/Login/debian/control
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/debian/control Sun Nov 12 20:25:58 2006
@@ -0,0 +1,20 @@
+Source: libjifty-plugin-login-perl
+Section: perl
+Priority: optional
+Build-Depends: debhelper (>= 4.0.2)
+Build-Depends-Indep: perl (>= 5.8.0-7)
+Maintainer: AGOSTINI Yves <agostini at univ-metz.fr>
+Standards-Version: 3.6.1
+
+Package: libjifty-plugin-login-perl
+Architecture: all
+Depends: ${perl:Depends}, ${misc:Depends}, libemail-address-perl,
+ libemail-messageid-perl, libemail-mime-modifier-perl,
+ libemail-mime-encodings-perl, libemail-mime-perl, libemail-simple-perl,
+ libemail-simple-creator-perl, libreturn-value-perl, libtime-piece-perl,
+ libemail-date-perl
+Recommends: libio-all-perl, libnet-perl
+Description: Jifty::Plugin::Login
+ .
+ .
+ Localized Login plugin for Jifty Framework.
Added: jifty/branches/template-declare/plugins/Login/debian/rules
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/debian/rules Sun Nov 12 20:25:58 2006
@@ -0,0 +1,83 @@
+#!/usr/bin/make -f
+# This debian/rules file is provided as a template for normal perl
+# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
+# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
+# be used freely wherever it is useful.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+export PERL_MM_USE_DEFAULT=1
+
+PACKAGE=$(shell dh_listpackages)
+
+ifndef PERL
+PERL = /usr/bin/perl
+endif
+
+TMP =$(CURDIR)/debian/$(PACKAGE)
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+
+ # Add commands to compile the package here
+ $(PERL) Makefile.PL INSTALLDIRS=vendor
+ $(MAKE) OPTIMIZE="-Wall -O2 -g"
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+
+ # Add commands to clean up after the build process here
+ -$(MAKE) distclean
+
+ dh_clean build-stamp install-stamp
+
+install: build install-stamp
+install-stamp:
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+
+ # Add commands to install the package into debian/$PACKAGE_NAME here
+ $(MAKE) test
+ $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+
+ # As this is a architecture independent package, we are not
+ # supposed to install stuff to /usr/lib. MakeMaker creates
+ # the dirs, we delete them from the deb:
+ rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
+
+ touch install-stamp
+
+binary-arch:
+# We have nothing to do by default.
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+# dh_installcron
+# dh_installmenu
+# dh_installexamples
+ dh_installdocs
+ dh_installchangelogs
+ dh_perl
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
Added: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ChangePassword.pm
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ChangePassword.pm Sun Nov 12 20:25:58 2006
@@ -0,0 +1,87 @@
+use warnings;
+use strict;
+
+=head1 NAME
+
+Jifty::Plugin::Login::Action::ChangePassword - Change a password
+
+=head1 DESCRIPTION
+
+This is the action run by /chgpasswd where logged user can change is password.
+
+
+=cut
+
+package Jifty::Plugin::Login::Action::ChangePassword;
+use base qw/Jifty::Action Jifty::Plugin::Login/;
+
+=head2 arguments
+
+ChangePassword has the following fields: password, and password_confirm.
+
+=cut
+
+sub arguments {
+ return (
+ {
+ password => {
+ type => 'password',
+ sticky => 0,
+ label => _('Password')
+ },
+ password_confirm => {
+ type => 'password',
+ sticky => 0,
+ label => _('type your password again')
+ },
+ }
+ );
+}
+
+=head2 take_action
+
+Change the password.
+
+=cut
+
+sub take_action {
+ my $self = shift;
+ my $LoginUser = $self->LoginUserClass();
+ my $CurrentUser = $self->CurrentUserClass();
+ my $u = $LoginUser->new( current_user => $CurrentUser->superuser );
+ $u->load_by_cols( email => Jifty->web->current_user->user_object->email );
+
+ unless ($u) {
+ $self->result->error(
+_("You don't exist. I'm not sure how this happened. Really, really sorry. Please email us!")
+ );
+ }
+
+ my $pass = $self->argument_value('password');
+ my $pass_c = $self->argument_value('password_confirm');
+
+ # Trying to set a password (ie, submitted the form)
+ unless (defined $pass
+ and defined $pass_c
+ and length $pass
+ and $pass eq $pass_c )
+ {
+ $self->result->error(
+_("It looks like you didn't enter the same password into both boxes. Give it another shot?")
+ );
+ return;
+ }
+
+ unless ( $u->set_password($pass) ) {
+ $self->result->error(_("There was an error setting your password."));
+ return;
+ }
+
+ # ok!
+ $self->result->message(_("Your password has been changed. Welcome back."));
+ return 1;
+
+}
+
+1;
+
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm Sun Nov 12 20:25:58 2006
@@ -39,7 +39,7 @@
if ( $u->email_confirmed ) {
$self->result->error(
- email => "You have already confirmed your account." );
+ email => _("You have already confirmed your account.") );
$self->result->success(1); # but the action is still a success
}
@@ -49,7 +49,7 @@
$self->result->message( "Welcome to "
. Jifty->config->framework('ApplicationName') . ", "
. $u->name
- . ". Your email address has now been confirmed." );
+ . _(". Your email address has now been confirmed.") );
# Actually do the login thing.
Jifty->web->current_user( $CurrentUser->new( id => $u->id ) );
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Login.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Login.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Login.pm Sun Nov 12 20:25:58 2006
@@ -20,21 +20,21 @@
return (
{
email => {
- label => 'Email address',
+ label => _('Email address'),
mandatory => 1,
ajax_validates => 1,
},
password => {
type => 'password',
- label => 'Password',
+ label => _('Password'),
mandatory => 1
},
remember => {
type => 'checkbox',
- label => 'Remember me?',
+ label => _('Remember me?'),
hints =>
- 'If you want, your browser can remember your login for you',
+ _('If you want, your browser can remember your login for you'),
default => 0,
}
}
@@ -57,13 +57,13 @@
unless ( $email =~ /\S\@\S/ ) {
return $self->validation_error(
- email => "That doesn't look like an email address." );
+ email => _("That doesn't look like an email address.") );
}
my $u = $LoginUser->new( current_user => $CurrentUser->superuser );
$u->load_by_cols( email => $email );
return $self->validation_error(
- email => 'No account has that email address.' )
+ email => _('No account has that email address.') )
unless ( $u->id );
return $self->validation_ok('email');
@@ -87,18 +87,18 @@
&& $user->password_is( $self->argument_value('password') ) )
{
$self->result->error(
- q{You may have mistyped your email address or password. Give it another shot?}
+ _('You may have mistyped your email address or password. Give it another shot?')
);
return;
}
unless ( $user->user_object->email_confirmed ) {
- $self->result->error(q{You haven't confirmed your account yet.});
+ $self->result->error(_("You haven't confirmed your account yet."));
return;
}
# Set up our login message
- $self->result->message( "Welcome back, " . $user->user_object->name . "." );
+ $self->result->message( _("Welcome back, ") . $user->user_object->name . "." );
# Actually do the signin thing.
Jifty->web->current_user($user);
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm Sun Nov 12 20:25:58 2006
@@ -26,11 +26,15 @@
sub arguments {
return (
{
- password => { type => 'password', sticky => 0 },
+ password => {
+ type => 'password',
+ sticky => 0,
+ label => _('Password')
+ },
password_confirm => {
type => 'password',
sticky => 0,
- label => 'type your password again'
+ label => _('type your password again')
},
}
);
@@ -51,7 +55,7 @@
unless ($u) {
$self->result->error(
-"You don't exist. I'm not sure how this happened. Really, really sorry. Please email us!"
+_("You don't exist. I'm not sure how this happened. Really, really sorry. Please email us!")
);
}
@@ -65,18 +69,18 @@
and $pass eq $pass_c )
{
$self->result->error(
-"It looks like you didn't enter the same password into both boxes. Give it another shot?"
+_("It looks like you didn't enter the same password into both boxes. Give it another shot?")
);
return;
}
unless ( $u->set_password($pass) ) {
- $self->result->error("There was an error setting your password.");
+ $self->result->error(_("There was an error setting your password."));
return;
}
# Log in!
- $self->result->message("Your password has been reset. Welcome back.");
+ $self->result->message(_("Your password has been reset. Welcome back."));
Jifty->web->current_user( $CurrentUser->new( id => $u->id ) );
return 1;
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm Sun Nov 12 20:25:58 2006
@@ -28,7 +28,7 @@
return (
{
address => {
- label => 'email address',
+ label => _('email address'),
mandatory => 1,
default_value => "",
},
@@ -64,18 +64,18 @@
my $CurrentUser = $self->CurrentUserClass();
return $self->validation_error(
- address => "That doesn't look like an email address." )
+ address => _("That doesn't look like an email address.") )
unless ( $email =~ /\S\@\S/ );
$self->user_object(
$LoginUser->new( current_user => $CurrentUser->superuser ) );
$self->user_object->load_by_cols( email => $email );
return $self->validation_error(
- address => "It doesn't look like there's an account by that name." )
+ address => _("It doesn't look like there's an account by that name.") )
unless ( $self->user_object->id );
return $self->validation_error(
- address => "It looks like you're already confirmed." )
+ address => _("It looks like you're already confirmed.") )
if ( $self->user_object->email_confirmed );
return $self->validation_ok('address');
@@ -91,7 +91,7 @@
my $self = shift;
Jifty::Plugin::Login::Notification::ConfirmAddress->new(
to => $self->user_object )->send;
- return $self->result->message("Confirmation resent.");
+ return $self->result->message(_("Confirmation resent."));
}
1;
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm Sun Nov 12 20:25:58 2006
@@ -10,6 +10,7 @@
package Jifty::Plugin::Login::Action::SendPasswordReminder;
use base qw/Jifty::Action Jifty::Plugin::Login/;
+
__PACKAGE__->mk_accessors(qw(user_object));
use Jifty::Plugin::Login::Model::User;
@@ -30,7 +31,7 @@
return (
{
address => {
- label => 'email address',
+ label => _('email address'),
mandatory => 1,
},
}
@@ -67,14 +68,14 @@
my $CurrentUser = $self->CurrentUserClass();
return $self->validation_error(
- address => "That doesn't look like an email address." )
+ address => _("That doesn't look like an email address.") )
unless ( $email =~ /\S\@\S/ );
$self->user_object(
$LoginUser->new( current_user => $CurrentUser->superuser ) );
$self->user_object->load_by_cols( email => $email );
return $self->validation_error(
- address => "It doesn't look like there's an account by that name." )
+ address => _("It doesn't look like there's an account by that name.") )
unless ( $self->user_object->id );
return $self->validation_ok('address');
@@ -91,7 +92,7 @@
Jifty::Plugin::Login::Notification::ConfirmLostPassword->new(
to => $self->user_object )->send;
return $self->result->message(
- "A link to reset your password has been sent to your email account.");
+ _("A link to reset your password has been sent to your email account."));
}
1;
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm Sun Nov 12 20:25:58 2006
@@ -41,7 +41,8 @@
for ( keys %$args ) { delete $args->{$_} unless ( $fields{$_} ); }
$args->{'email'}{'ajax_validates'} = 1;
- $args->{'password_confirm'}{'label'} = "Type that again?";
+ $args->{'password_confirm'}{'label'} = _("Type that again?");
+ $args->{'name'}{'label'} = _("Name");
return $args;
}
@@ -58,14 +59,14 @@
my $CurrentUser = $self->CurrentUserClass();
return $self->validation_error(
- email => "That doesn't look like an email address." )
+ email => _("That doesn't look like an email address.") )
unless ( $email =~ /\S\@\S/ );
my $u = $LoginUser->new( current_user => $CurrentUser->superuser );
$u->load_by_cols( email => $email );
if ( $u->id ) {
return $self->validation_error( email =>
-'It looks like you already have an account. Perhaps you want to <a href="/login">sign in</a> instead?'
+_('It looks like you already have an account. Perhaps you want to <a href="/login">sign in</a> instead?')
);
}
@@ -98,15 +99,15 @@
# Handle errors?
unless ( $record->id ) {
$self->result->error(
-"Something bad happened and we couldn't create your account. Try again later. We're really, really sorry."
+_("Something bad happened and we couldn't create your account. Try again later. We're really, really sorry.")
);
return;
}
- $self->result->message( "Welcome to "
+ $self->result->message( _("Welcome to ")
. Jifty->config->framework('ApplicationName') . ", "
. $record->name
- . ". We've sent a confirmation message to your email box." );
+ . _(". We've sent a confirmation message to your email box.") );
return 1;
}
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Dispatcher.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Dispatcher.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Dispatcher.pm Sun Nov 12 20:25:58 2006
@@ -6,6 +6,37 @@
# Put any plugin-specific dispatcher rules here.
+# Send a password reminder for a lost password
+on 'passwordreminder' => run {
+ redirect('/') if ( Jifty->web->current_user->id );
+ set 'action' =>
+ Jifty->web->new_action(
+ class => 'SendPasswordReminder',
+ moniker => 'password_reminder'
+ );
+
+ set 'next' => Jifty->web->request->continuation
+ || Jifty::Continuation->new(
+ request => Jifty::Request->new( path => "/" ) );
+
+};
+
+# Change a password
+on 'chgpasswd' => run {
+ redirect('/login') if (! Jifty->web->current_user->id );
+ set 'action' =>
+ Jifty->web->new_action(
+ class => 'ChangePassword',
+ moniker => 'chgpasswdbox'
+ );
+
+ set 'next' => Jifty->web->request->continuation
+ || Jifty::Continuation->new(
+ request => Jifty::Request->new( path => "/" ) );
+
+};
+
+
# Sign up for an account
on 'signup' => run {
redirect('/') if ( Jifty->web->current_user->id );
Modified: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm
==============================================================================
--- jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm (original)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm Sun Nov 12 20:25:58 2006
@@ -36,20 +36,19 @@
my $confirm_url = $letme->as_url;
my $appname = Jifty->config->framework('ApplicationName');
- $self->subject( "Welcome to $appname!" );
+ $self->subject( _("Welcome to ")."$appname!" );
$self->from( Jifty->config->framework('AdminEmail') );
- $self->body(<<"END_BODY");
-
+ $self->body(_("
You're getting this message because you (or somebody claiming to be you)
-signed up for $appname.
+signed up for %1.
-Before you can use $appname, we need to make sure that we got your email
+Before you can use %1, we need to make sure that we got your email
address right. Click on the link below to get started:
-$confirm_url
+%2
+",$appname,$confirm_url));
-END_BODY
}
1;
Added: jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm Sun Nov 12 20:25:58 2006
@@ -0,0 +1,55 @@
+use warnings;
+use strict;
+
+package Jifty::Plugin::Login::Notification::ConfirmLostPassword;
+use base qw/Jifty::Notification Jifty::Plugin::Login/;
+
+=head1 NAME
+
+Jifty::Plugin::Login::Notification::ConfirmLostPassword
+
+=head1 ARGUMENTS
+
+C<to>, a L<Jifty::Plugin::Login::Model::User> whose address we are confirming.
+
+=cut
+
+=head2 setup
+
+Sets up the fields of the message.
+
+=cut
+
+sub setup {
+ my $self = shift;
+ my $LoginUser = $self->LoginUserClass;
+
+ unless ( UNIVERSAL::isa($self->to, $LoginUser) ){
+ $self->log->error((ref $self) . " called with invalid user argument");
+ return;
+ }
+
+ my $letme = Jifty::LetMe->new();
+ $letme->email($self->to->email);
+ $letme->path('reset_lost_password');
+ my $confirm_url = $letme->as_url;
+ my $appname = Jifty->config->framework('ApplicationName');
+
+ $self->subject( _("Message from ")."$appname!" );
+ $self->from( Jifty->config->framework('AdminEmail') );
+
+ $self->body(_("
+You're getting this message because you (or somebody claiming to be you)
+request to reset your password for %1.
+
+If you don't want to reset your password just ignore this message.
+
+To reset your password, click on the link below:
+
+%2
+",$appname,$confirm_url));
+
+}
+
+1;
+
Added: jifty/branches/template-declare/plugins/Login/share/po/en.po
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/share/po/en.po Sun Nov 12 20:25:58 2006
@@ -0,0 +1,207 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm:41
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"request to reset your password for %1.\n"
+"\n"
+"If you don't want to reset your password just ignore this message.\n"
+"\n"
+"To reset your password, click on the link below:\n"
+"\n"
+"%2\n"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm:42
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"signed up for %1.\n"
+"\n"
+"Before you can use %1, we need to make sure that we got your email\n"
+"address right. Click on the link below to get started:\n"
+"\n"
+"%2\n"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:110
+msgid ". We've sent a confirmation message to your email box."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm:52
+msgid ". Your email address has now been confirmed."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:95
+msgid "A link to reset your password has been sent to your email account."
+msgstr ""
+
+#: share/web/templates/chgpasswd:11
+msgid "Change"
+msgstr ""
+
+#: share/web/templates/chgpasswd:6
+msgid "Change your password"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:94
+msgid "Confirmation resent."
+msgstr ""
+
+#: share/web/templates/login:15
+msgid "Don't have an account?"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:23
+msgid "Email address"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:37
+msgid "If you want, your browser can remember your login for you"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:74 lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:78
+msgid "It doesn't look like there's an account by that name."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:69
+msgid "It looks like you already have an account. Perhaps you want to <a href=\"/login\">sign in</a> instead?"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:70 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:72
+msgid "It looks like you didn't enter the same password into both boxes. Give it another shot?"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:78
+msgid "It looks like you're already confirmed."
+msgstr ""
+
+#: share/web/templates/login:13 share/web/templates/login:8
+msgid "Login"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm:38
+msgid "Message from "
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:45
+msgid "Name"
+msgstr ""
+
+#: share/web/templates/let/reset_lost_password:16
+msgid "New password"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:66
+msgid "No account has that email address."
+msgstr ""
+
+#: share/web/templates/logout:2
+msgid "Ok, you're now logged out. Have a good day."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:30 lib/Jifty/Plugin/Login/Action/Login.pm:30 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:32
+msgid "Password"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:35
+msgid "Remember me?"
+msgstr ""
+
+#: share/web/templates/let/reset_lost_password:9
+msgid "Reset lost password"
+msgstr ""
+
+#: share/web/templates/passwordreminder:18
+msgid "Send"
+msgstr ""
+
+#: share/web/templates/passwordreminder:9
+msgid "Send a password reminder"
+msgstr ""
+
+#: share/web/templates/signup:11 share/web/templates/signup:6
+msgid "Signup"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:102
+msgid "Something bad happened and we couldn't create your account. Try again later. We're really, really sorry."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:60 lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:67 lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:71 lib/Jifty/Plugin/Login/Action/Signup.pm:62
+msgid "That doesn't look like an email address."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:76 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:78
+msgid "There was an error setting your password."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:44
+msgid "Type that again?"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:101
+msgid "Welcome back, "
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:107 lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm:39
+msgid "Welcome to "
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:56 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:58
+msgid "You don't exist. I'm not sure how this happened. Really, really sorry. Please email us!"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm:42
+msgid "You have already confirmed your account."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:96
+msgid "You haven't confirmed your account yet."
+msgstr ""
+
+#: share/web/templates/passwordreminder:10
+msgid "You lost your password. A reminder will be send to the following mail:"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:90
+msgid "You may have mistyped your email address or password. Give it another shot?"
+msgstr ""
+
+#: share/web/templates/login:18
+msgid "You're already logged in."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:81
+msgid "Your password has been changed. Welcome back."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:83
+msgid "Your password has been reset. Welcome back."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:31 lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:34
+msgid "email address"
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:35 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:37
+msgid "type your password again"
+msgstr ""
Added: jifty/branches/template-declare/plugins/Login/share/po/fr.po
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/share/po/fr.po Sun Nov 12 20:25:58 2006
@@ -0,0 +1,223 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# AGOSTINI Yves <agostini at univ-metz.fr>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2006-10-24 15:00+ZONE\n"
+"PO-Revision-Date: 2006-11-10 22:42+ZONE\n"
+"Last-Translator: AGOSTINI Yves <agostini at univ-metz.fr>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm:41
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"request to reset your password for %1.\n"
+"\n"
+"If you don't want to reset your password just ignore this message.\n"
+"\n"
+"To reset your password, click on the link below:\n"
+"\n"
+"%2\n"
+msgstr ""
+"\n"
+"Vous recevez ce message, parce que quelqu'un demande un nouveau mot de\n"
+"passe pour l'application %1.\n"
+"\n"
+"Si cela ne vous convient pas, ignorez tout simplement ce message.\n"
+"\n"
+"Pour changer votre mot de passe cliquez sur le lien ci-dessous :\n"
+"\n"
+"%2\n"
+
+#: lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm:42
+#. ($appname,$confirm_url)
+msgid ""
+"\n"
+"You're getting this message because you (or somebody claiming to be you)\n"
+"signed up for %1.\n"
+"\n"
+"Before you can use %1, we need to make sure that we got your email\n"
+"address right. Click on the link below to get started:\n"
+"\n"
+"%2\n"
+msgstr ""
+"\n"
+"Vous demandez une inscription sur l'application %1.\n"
+"\n"
+"Avant de pouvoir vous connecter, vous devez confirmer votre adresse mail\n"
+"en cliquant sur le lien ci-dessous :\n"
+"\n"
+"%2\n"
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:110
+msgid ". We've sent a confirmation message to your email box."
+msgstr ". Une demande de confirmation vous a été envoyée par mail."
+
+#: lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm:52
+msgid ". Your email address has now been confirmed."
+msgstr ". Votre adresse mail a été vérifiée."
+
+#: lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:95
+msgid "A link to reset your password has been sent to your email account."
+msgstr "Un lien web pour ré-initialiser votre mot de passe vous a été envoyé par mail."
+
+#: share/web/templates/chgpasswd:11
+msgid "Change"
+msgstr "Valider"
+
+#: share/web/templates/chgpasswd:6
+msgid "Change your password"
+msgstr "Changer votre mot de passe"
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:94
+msgid "Confirmation resent."
+msgstr "Demande de confirmation transmise."
+
+#: share/web/templates/login:15
+msgid "Don't have an account?"
+msgstr "Vous n'avez pas de compte ?"
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:23
+msgid "Email address"
+msgstr "Adresse mail"
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:37
+msgid "If you want, your browser can remember your login for you"
+msgstr "Si vous le désirez, votre navigateur peut mémoriser votre identification"
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:74 lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:78
+msgid "It doesn't look like there's an account by that name."
+msgstr "Ce compte ne semble pas exister."
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:69
+msgid "It looks like you already have an account. Perhaps you want to <a href=\"/login\">sign in</a> instead?"
+msgstr "Vous semblez avoir déjà un compte. Vous désirez peut-être plutôt vous <a href=\"/login\">identifier</a> ?"
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:70 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:72
+msgid "It looks like you didn't enter the same password into both boxes. Give it another shot?"
+msgstr "Les mots de passe semblent différents. Ré-essayer ?"
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:78
+msgid "It looks like you're already confirmed."
+msgstr "Votre identifiant a déjà été vérifié."
+
+#: share/web/templates/login:13 share/web/templates/login:8
+msgid "Login"
+msgstr "Identification"
+
+#: lib/Jifty/Plugin/Login/Notification/ConfirmLostPassword.pm:38
+msgid "Message from "
+msgstr "Message de "
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:45
+msgid "Name"
+msgstr "Nom"
+
+#: share/web/templates/let/reset_lost_password:16
+msgid "New password"
+msgstr "Enregistrer"
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:66
+msgid "No account has that email address."
+msgstr "Aucun compte n'a cette adresse mail."
+
+#: share/web/templates/logout:2
+msgid "Ok, you're now logged out. Have a good day."
+msgstr "Vous êtes déconnecté. Au revoir."
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:30 lib/Jifty/Plugin/Login/Action/Login.pm:30 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:32
+msgid "Password"
+msgstr "Mot de passe"
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:35
+msgid "Remember me?"
+msgstr "S'en rappeller ?"
+
+#: share/web/templates/let/reset_lost_password:9
+msgid "Reset lost password"
+msgstr "Nouveau mot de passe"
+
+#: share/web/templates/passwordreminder:18
+msgid "Send"
+msgstr "Envoyer"
+
+#: share/web/templates/passwordreminder:9
+msgid "Send a password reminder"
+msgstr "Recevoir un nouveau mot de passe"
+
+#: share/web/templates/signup:11 share/web/templates/signup:6
+msgid "Signup"
+msgstr "S'enregistrer"
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:102
+msgid "Something bad happened and we couldn't create your account. Try again later. We're really, really sorry."
+msgstr "Votre compte ne peut pas actuellement être créé. Merci de ré-essayer ultérieurement."
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:60 lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:67 lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:71 lib/Jifty/Plugin/Login/Action/Signup.pm:62
+msgid "That doesn't look like an email address."
+msgstr "Cela ne ressemble pas à une adresse mail."
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:76 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:78
+msgid "There was an error setting your password."
+msgstr "Erreur lors de la création de votre mot de passe."
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:44
+msgid "Type that again?"
+msgstr "Confirmer"
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:101
+msgid "Welcome back, "
+msgstr "Bienvenue, "
+
+#: lib/Jifty/Plugin/Login/Action/Signup.pm:107 lib/Jifty/Plugin/Login/Notification/ConfirmAddress.pm:39
+msgid "Welcome to "
+msgstr "Bienvenue sur "
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:56 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:58
+msgid "You don't exist. I'm not sure how this happened. Really, really sorry. Please email us!"
+msgstr "Vous n'existez pas !!!"
+
+#: lib/Jifty/Plugin/Login/Action/ConfirmEmail.pm:42
+msgid "You have already confirmed your account."
+msgstr "Vous avez déjà confirmé votre compte."
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:96
+msgid "You haven't confirmed your account yet."
+msgstr "Vous n'avez pas encore confirmé votre compte."
+
+#: share/web/templates/passwordreminder:10
+msgid "You lost your password. A reminder will be send to the following mail:"
+msgstr "Vous avez perdu votre mot de passe. Un message d'assistance peut vous être re-transmis à votre mail d'origine :"
+
+#: lib/Jifty/Plugin/Login/Action/Login.pm:90
+msgid "You may have mistyped your email address or password. Give it another shot?"
+msgstr "Erreur dans votre mail ou votre mot de passe. Ré-essayer ?"
+
+#: share/web/templates/login:18
+msgid "You're already logged in."
+msgstr "Vous êtes déjà connecté."
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:81
+msgid "Your password has been changed. Welcome back."
+msgstr ""
+
+#: lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:83
+msgid "Your password has been reset. Welcome back."
+msgstr "Votre mot de passe a été ré-initialisé. Bon retour."
+
+#: lib/Jifty/Plugin/Login/Action/SendAccountConfirmation.pm:31 lib/Jifty/Plugin/Login/Action/SendPasswordReminder.pm:34
+msgid "email address"
+msgstr "adresse mail"
+
+#: lib/Jifty/Plugin/Login/Action/ChangePassword.pm:35 lib/Jifty/Plugin/Login/Action/ResetLostPassword.pm:37
+msgid "type your password again"
+msgstr "confirmez votre mot de passe"
Added: jifty/branches/template-declare/plugins/Login/share/web/templates/chgpasswd
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/share/web/templates/chgpasswd Sun Nov 12 20:25:58 2006
@@ -0,0 +1,13 @@
+<%args>
+$action
+$next
+</%args>
+<&|/_elements/wrapper, title => 'Change your password' &>
+<h2><% _("Change your password") %></h2>
+<% Jifty->web->form->start(call => $next, name => "chgpasswdbox") %>
+% foreach my $key ($action->argument_names) {
+<% $action->form_field($key) %>
+% }
+<% Jifty->web->form->submit(label => _('Change'), submit => $action) %>
+<% Jifty->web->form->end %>
+</&>
Added: jifty/branches/template-declare/plugins/Login/share/web/templates/let/reset_lost_password
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/share/web/templates/let/reset_lost_password Sun Nov 12 20:25:58 2006
@@ -0,0 +1,21 @@
+<%init>
+my $action = Jifty->web->new_action(
+ moniker => 'reset_lost_password',
+ class => 'ResetLostPassword',
+);
+</%init>
+<&|/_elements/wrapper, title => 'Reset lost password' &>
+
+<H2><% _('Reset lost password') %></H2>
+<% Jifty->web->form->start %>
+
+% for ($action->argument_names) {
+<% $action->form_field($_) %>
+% }
+
+<% Jifty->web->form->submit( label => _("New password") ) %>
+
+<% Jifty->web->form->end %>
+
+</&>
+
Modified: jifty/branches/template-declare/plugins/Login/share/web/templates/login
==============================================================================
--- jifty/branches/template-declare/plugins/Login/share/web/templates/login (original)
+++ jifty/branches/template-declare/plugins/Login/share/web/templates/login Sun Nov 12 20:25:58 2006
@@ -5,16 +5,16 @@
<&|/_elements/wrapper, title => 'Login' &>
% if (not Jifty->web->current_user->id) {
-<h2>Login</h2>
+<h2><% _('Login') %></h2>
<% Jifty->web->form->start(call => $next, name => "loginbox") %>
<% $action->form_field('email') %>
<% $action->form_field('password') %>
<% $action->form_field('remember') %>
-<% Jifty->web->form->submit(label => 'Login', submit => $action) %>
+<% Jifty->web->form->submit(label => _('Login'), submit => $action) %>
<% Jifty->web->form->end %>
-<% Jifty->web->tangent( label => q{Don't have an account?}, url => '/signup' )%>
+<% Jifty->web->tangent( label => _("Don't have an account?"), url => '/signup' )%>
% }
% else {
-You're already logged in.
+<% _("You're already logged in.") %>
% }
</&>
Modified: jifty/branches/template-declare/plugins/Login/share/web/templates/logout
==============================================================================
--- jifty/branches/template-declare/plugins/Login/share/web/templates/logout (original)
+++ jifty/branches/template-declare/plugins/Login/share/web/templates/logout Sun Nov 12 20:25:58 2006
@@ -1,3 +1,3 @@
<&| /_elements/wrapper, title => "Logged out" &>
-<p>Ok, you're now logged out. Have a good day.</p>
+<p><% _("Ok, you're now logged out. Have a good day.") %></p>
</&>
Added: jifty/branches/template-declare/plugins/Login/share/web/templates/passwordreminder
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/plugins/Login/share/web/templates/passwordreminder Sun Nov 12 20:25:58 2006
@@ -0,0 +1,23 @@
+<%init>
+my $action = Jifty->web->new_action(
+ moniker => 'password_reminder',
+ class => 'SendPasswordReminder',
+);
+</%init>
+<&|/_elements/wrapper, title => 'Send Password Reminder' &>
+
+<H2><% _('Send a password reminder') %></H2>
+<% _("You lost your password. A reminder will be send to the following mail:") %>
+
+<% Jifty->web->form->start %>
+
+% for ($action->argument_names) {
+<% $action->form_field($_) %>
+% }
+
+<% Jifty->web->form->submit( label => _("Send") ) %>
+
+<% Jifty->web->form->end %>
+
+</&>
+
Modified: jifty/branches/template-declare/plugins/Login/share/web/templates/signup
==============================================================================
--- jifty/branches/template-declare/plugins/Login/share/web/templates/signup (original)
+++ jifty/branches/template-declare/plugins/Login/share/web/templates/signup Sun Nov 12 20:25:58 2006
@@ -3,11 +3,11 @@
$next
</%args>
<&|/_elements/wrapper, title => 'Signup' &>
-<h2>Signup</h2>
+<h2><% _("Signup") %></h2>
<% Jifty->web->form->start(call => $next, name => "signupbox") %>
% foreach my $key ($action->argument_names) {
<% $action->form_field($key) %>
% }
-<% Jifty->web->form->submit(label => 'Signup', submit => $action) %>
+<% Jifty->web->form->submit(label => _('Signup'), submit => $action) %>
<% Jifty->web->form->end %>
</&>
Added: jifty/branches/template-declare/share/po/fr.po
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/share/po/fr.po Sun Nov 12 20:25:58 2006
@@ -0,0 +1,166 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# AGOSTINI Yves <agostini at univ-metz.fr>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2006-10-24 18:00+ZONE\n"
+"PO-Revision-Date: 2006-11-02 09:34+ZONE\n"
+"Last-Translator: AGOSTINI Yves <agostini at univ-metz.fr>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/Jifty/Web.pm:583
+msgid " $self->response->results "
+msgstr ""
+
+#: share/web/templates/__jifty/halo:119
+#. ($_->[3])
+msgid "%1 seconds"
+msgstr "%1 secondes"
+
+#: share/web/templates/__jifty/admin/index.html:19
+msgid "Actions"
+msgstr ""
+
+#: share/web/templates/_elements/wrapper:11
+msgid "Administration mode is enabled."
+msgstr "Mode d'administration activé."
+
+#: share/web/templates/_elements/wrapper:11
+msgid "Alert"
+msgstr "Alerte"
+
+#: lib/Jifty/Action/Record/Create.pm:82
+msgid "An error occurred. Try again later"
+msgstr "Erreur. Ré-essayez plus tard"
+
+#: share/web/templates/helpers/calendar.html:4
+msgid "Close window"
+msgstr "Fermer la fenêtre"
+
+#: lib/Jifty/Action/Record/Create.pm:81
+#. (ref($record)
+msgid "Create of %1 failed: %2"
+msgstr "La création de %1 a échoué: %2"
+
+#: lib/Jifty/Action/Record/Create.pm:105
+msgid "Created"
+msgstr "Créé"
+
+#: share/web/templates/__jifty/admin/index.html:3
+msgid "Database Administration"
+msgstr "Administration de la Base de Données"
+
+#: lib/Jifty/Action/Record/Delete.pm:76
+msgid "Deleted"
+msgstr "Effacé"
+
+#: lib/Jifty/Mason/Halo.pm:104
+#. ($comp_name)
+msgid "Edit %1"
+msgstr "Editer %1"
+
+#: share/web/templates/dhandler:7
+msgid "Go back home..."
+msgstr "Retour..."
+
+#: share/web/templates/_elements/sidebar:5
+#. ($u->$method()
+msgid "Hiya, %1."
+msgstr "Bonjour, %1"
+
+#: share/web/templates/__jifty/online_docs/toc.html:6
+msgid "Jifty Developer Documentation Online"
+msgstr ""
+
+#: share/web/templates/__jifty/online_docs/content.html:6
+msgid "Jifty Pod Online"
+msgstr ""
+
+#: share/web/templates/_elements/wrapper:18
+msgid "Loading..."
+msgstr "Chargement..."
+
+#: share/web/templates/__jifty/admin/index.html:9
+msgid "Models"
+msgstr "Modèles"
+
+#: lib/Jifty/Web.pm:276
+msgid "No request to handle"
+msgstr "Aucune requête à traiter"
+
+#: share/web/templates/__jifty/online_docs/index.html:5
+msgid "Online Documentation"
+msgstr "Documentation en ligne"
+
+#: lib/Jifty/Record.pm:240 lib/Jifty/Record.pm:316 lib/Jifty/Record.pm:60
+msgid "Permission denied"
+msgstr "Autorisation refusée"
+
+#:
+msgid "Record created"
+msgstr "Enregistrement créé"
+
+#: share/web/templates/__jifty/halo:111
+msgid "SQL Statements"
+msgstr ""
+
+#: share/web/templates/__jifty/online_docs/content.html:50
+msgid "Schema"
+msgstr "Schéma"
+
+#: share/web/templates/dhandler:1
+msgid "Something's not quite right"
+msgstr "Problème"
+
+#: share/web/templates/__jifty/online_docs/index.html:16 share/web/templates/__jifty/online_docs/index.html:18
+msgid "Table of Contents"
+msgstr "Table des matières"
+
+#: lib/Jifty/Action.pm:854
+msgid "That doesn't look like a correct value"
+msgstr "Valeur incorecte"
+
+#: lib/Jifty/Action/Record.pm:249
+msgid "That doesn't look right, but I don't know why"
+msgstr "Problème"
+
+#: lib/Jifty/Action/Record.pm:181
+msgid "The passwords you typed didn't match each other"
+msgstr "Les mots de passe tapés ne sont pas identiques"
+
+#: lib/Jifty/Web.pm:339
+msgid "There was an error completing the request. Please try again later."
+msgstr "Problème lors de l'exécution de cette requête. Ré-essayez plus tard."
+
+#: share/web/templates/__jifty/admin/index.html:5
+msgid "This console lets you manage the records in your Jifty database. Below, you should see a list of all your database tables. Feel free to go through and add, delete or modify records."
+msgstr "Cette page vous permet de gérer vos enregistrements dans la base. Vous trouverez ci-dessous la listes des tables. Vous pouvez ajouter, effacer ou modifier les enregistements."
+
+#: lib/Jifty/Action/Record/Update.pm:156
+msgid "Updated"
+msgstr "Modification"
+
+#: share/web/templates/index.html:1
+msgid "Welcome to your new Jifty application"
+msgstr "Bienvenue sur votre nouvelle application Jifty"
+
+#: share/web/templates/dhandler:5
+msgid "You got to a page that we don't think exists. Anyway, the software has logged this error. Sorry about this."
+msgstr "Cette page n'existe pas."
+
+#: lib/Jifty/Action.pm:841
+msgid "You need to fill in this field"
+msgstr "Information obligatoire"
+
+#: share/web/templates/index.html:3
+#. ('http://hdl.loc.gov/loc.pnp/cph.3c13461')
+msgid "You said you wanted a pony. (Source %1)"
+msgstr ""
+
Added: jifty/branches/template-declare/t/01-test-web.t
==============================================================================
--- (empty file)
+++ jifty/branches/template-declare/t/01-test-web.t Sun Nov 12 20:25:58 2006
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+
+use Jifty::Test tests => 5;
+
+my $web = Jifty::Test->web;
+isa_ok( $web->request, "Jifty::Request" );
+isa_ok( $web->response, "Jifty::Response" );
+
+{
+ {
+ package JiftyApp::Action::Foo;
+ use base 'Jifty::Action';
+ }
+
+ # Fool Jifty into thinking this is already loaded.
+ local $INC{"JiftyApp/Action/Foo.pm"} = 1;
+
+ my $action = $web->new_action( class => "Foo" );
+ isa_ok( $action, "JiftyApp::Action::Foo" );
+}
+
+
+{
+ package Jifty::Request::Subclass;
+ use base qw(Jifty::Request);
+
+ package Jifty::Response::Subclass;
+ use base qw(Jifty::Response);
+}
+
+
+# Make sure Jifty::Test->web doesn't blow over existing requests and reponses.
+Jifty->web->request (Jifty::Request::Subclass->new );
+Jifty->web->response(Jifty::Response::Subclass->new);
+
+$web = Jifty::Test->web;
+isa_ok( $web->request, "Jifty::Request::Subclass" );
+isa_ok( $web->response, "Jifty::Response::Subclass" );
Modified: jifty/branches/template-declare/t/TestApp/t/12-search.t
==============================================================================
--- jifty/branches/template-declare/t/TestApp/t/12-search.t (original)
+++ jifty/branches/template-declare/t/TestApp/t/12-search.t Sun Nov 12 20:25:58 2006
@@ -52,12 +52,7 @@
);
-# Set up Jifty so we can call J->w->new_action
-Jifty->new;
-Jifty->web->request(Jifty::Request->new);
-Jifty->web->response(Jifty::Response->new);
-
-my $search = Jifty->web->new_action(
+my $search = Jifty::Test->web->new_action(
class => 'SearchUser',
moniker => 'search',
current_user => TestApp::CurrentUser->superuser,
More information about the Jifty-commit
mailing list