[Jifty-commit] r5845 - in jifty/trunk: . lib lib/Jifty/Manual lib/Jifty/Plugin lib/Jifty/Plugin/Authentication lib/Jifty/Plugin/Authentication/Ldap lib/Jifty/Plugin/Authentication/Ldap/Action lib/Jifty/Plugin/Authentication/Ldap/Mixin lib/Jifty/Plugin/Authentication/Ldap/Mixin/Model lib/Jifty/Plugin/Authentication/Ldap/doc lib/Jifty/Plugin/Authentication/Password/Action lib/Jifty/Plugin/Chart lib/Jifty/Plugin/Chart/Renderer lib/Jifty/Plugin/Comment lib/Jifty/Plugin/Comment/Action lib/Jifty/Plugin/Comment/Mixin lib/Jifty/Plugin/Comment/Mixin/Model lib/Jifty/Plugin/Comment/Model lib/Jifty/Plugin/Comment/Notification lib/Jifty/Script lib/Jifty/Subs plugins/Authentication-CAS plugins/Authentication-Ldap plugins/Comment share/po share/web/static/js t/TestApp-Plugin-Comments t/TestApp-Plugin-Comments/bin t/TestApp-Plugin-Comments/etc t/TestApp-Plugin-Comments/lib t/TestApp-Plugin-Comments/lib/TestApp t/TestApp-Plugin-Comments/lib/TestApp/Plugin t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Action t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Model t/TestApp-Plugin-Comments/t

Jifty commits jifty-commit at lists.jifty.org
Tue Sep 16 03:33:21 EDT 2008


Author: sartak
Date: Tue Sep 16 03:33:21 2008
New Revision: 5845

Added:
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Action/
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogout.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Dispatcher.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Mixin/
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Mixin/Model/
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Mixin/Model/User.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/View.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/doc/
   jifty/trunk/lib/Jifty/Plugin/Comment/
   jifty/trunk/lib/Jifty/Plugin/Comment.pm
   jifty/trunk/lib/Jifty/Plugin/Comment/Action/
   jifty/trunk/lib/Jifty/Plugin/Comment/Action/CreateComment.pm
   jifty/trunk/lib/Jifty/Plugin/Comment/Dispatcher.pm
   jifty/trunk/lib/Jifty/Plugin/Comment/Mixin/
   jifty/trunk/lib/Jifty/Plugin/Comment/Mixin/Model/
   jifty/trunk/lib/Jifty/Plugin/Comment/Mixin/Model/Commented.pm
   jifty/trunk/lib/Jifty/Plugin/Comment/Model/
   jifty/trunk/lib/Jifty/Plugin/Comment/Model/Comment.pm
   jifty/trunk/lib/Jifty/Plugin/Comment/Notification/
   jifty/trunk/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm
   jifty/trunk/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm
   jifty/trunk/lib/Jifty/Plugin/Comment/View.pm
   jifty/trunk/t/TestApp-Plugin-Comments/   (props changed)
   jifty/trunk/t/TestApp-Plugin-Comments/Makefile.PL
   jifty/trunk/t/TestApp-Plugin-Comments/bin/
   jifty/trunk/t/TestApp-Plugin-Comments/bin/jifty   (contents, props changed)
   jifty/trunk/t/TestApp-Plugin-Comments/etc/
   jifty/trunk/t/TestApp-Plugin-Comments/etc/config.yml
   jifty/trunk/t/TestApp-Plugin-Comments/lib/
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Action/
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Dispatcher.pm
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Model/
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Model/BlogPost.pm
   jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm
   jifty/trunk/t/TestApp-Plugin-Comments/t/
   jifty/trunk/t/TestApp-Plugin-Comments/t/00-model-BlogPost.t
Removed:
   jifty/trunk/plugins/Authentication-Ldap/
   jifty/trunk/plugins/AuthzLDAP/
   jifty/trunk/plugins/Comment/
Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/Makefile.PL
   jifty/trunk/lib/Jifty.pm
   jifty/trunk/lib/Jifty/Manual/UsingCSSandJS.pod
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
   jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/Google.pm
   jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/XMLSWF.pm
   jifty/trunk/lib/Jifty/Plugin/Chart/View.pm
   jifty/trunk/lib/Jifty/Plugin/I18N.pm
   jifty/trunk/lib/Jifty/Script/Help.pm
   jifty/trunk/lib/Jifty/Subs/Render.pm
   jifty/trunk/plugins/Authentication-CAS/Makefile.PL
   jifty/trunk/share/po/en.po
   jifty/trunk/share/po/fr.po
   jifty/trunk/share/po/ja.po
   jifty/trunk/share/po/ro.po
   jifty/trunk/share/po/ru.po
   jifty/trunk/share/po/zh_cn.po
   jifty/trunk/share/po/zh_tw.po
   jifty/trunk/share/web/static/js/jifty.js

Log:


Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL	(original)
+++ jifty/trunk/Makefile.PL	Tue Sep 16 03:33:21 2008
@@ -52,7 +52,6 @@
 requires('IPC::PubSub' => '0.23' );
 requires('IPC::Run3');
 requires('Jifty::DBI' => '0.49' );            # Jifty::DBI::Collection Jifty::DBI::Handle Jifty::DBI::Record::Cachable Jifty::DBI::SchemaGenerator
-requires('List::MoreUtils');
 requires('Locale::Maketext::Extract' => '0.20');
 requires('Locale::Maketext::Lexicon' => '0.60');
 requires('Log::Log4perl' => '1.04'); # Log::Log4perl::Appender
@@ -174,11 +173,27 @@
         recommends('Devel::Gladiator'),
         recommends('Proc::ProcessTable'),
     ],
+    'Ldap Plugin' => [
+        -default => 0,
+        recommends('Net::LDAP')
+    ],
+#    'CAS Plugin' => [
+#        -default => 0,
+#        recommends('Authen::CAS::Client')
+#    ],
     'Improved halos' => [
         -default => 0,
         recommends('Template::Declare' => '0.28'),
         recommends('Data::Dump::Streamer'),
     ],
+    'Comment Plugin' => [
+        -default => 0,
+        recommends('HTML::Scrubber'),
+        recommends('MIME::Base64::URLSafe'),
+        recommends('Net::Akismet'),
+        recommends('Regexp::Common'),
+        recommends('Regexp::Common::Email::Address'),
+    ],
 );
 
 
@@ -193,6 +208,7 @@
 install_script('bin/jifty');
 install_share;
 
+# ls plugins -> Authentication-CAS  Multipage  TabView
 my @plugins = defined $ENV{JIFTY_PLUGINS} ? split(/ /, $ENV{JIFTY_PLUGINS}) : qw(TabView);
 
 # Test all of our sub-dist tests too
@@ -203,7 +219,7 @@
     die unless -d "plugins/$_";
 #    install_share("plugins/$_/share");
     chdir("plugins/$_");
-    system("$^X -I../../lib Makefile.PL");
+    system("$^X -I../../lib Makefile.PL INSTALLDIRS=".$ENV{INSTALLDIRS});
     chdir('../..');
 
 }
@@ -211,8 +227,13 @@
 postamble(<<"END");
 
 install ::
-@{[ join("\n", map { "\tcd plugins/$_; make install" } @plugins)   ]}
+@{[ join("\n", map { "\tcd plugins/$_;".' $(MAKE) install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX)' } @plugins)   ]}
+
+distclean :: realclean
+@{[ "\t".'$(NOECHO) $(NOOP)']}
 
+realclean :: 
+@{[ join("\n", map { "\tcd plugins/$_;".' $(MAKE) realclean' } @plugins)   ]}
 
 END
 

Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm	(original)
+++ jifty/trunk/lib/Jifty.pm	Tue Sep 16 03:33:21 2008
@@ -13,7 +13,7 @@
     require Time::Local;
 
     # Declare early to make sure Jifty::Record::schema_version works
-    $Jifty::VERSION = '0.80913';
+    $Jifty::VERSION = '0.80408';
 }
 
 =head1 NAME

Modified: jifty/trunk/lib/Jifty/Manual/UsingCSSandJS.pod
==============================================================================
--- jifty/trunk/lib/Jifty/Manual/UsingCSSandJS.pod	(original)
+++ jifty/trunk/lib/Jifty/Manual/UsingCSSandJS.pod	Tue Sep 16 03:33:21 2008
@@ -37,9 +37,9 @@
 =head2 Assembly of CSS definitions
 
 When Jifty assembles all CSS definitions (which is internally done
-inside L<Jifty::Web> by the method C<include_css>), a single file,
+inside L<Jifty::Web> by the method C<include_css>, a single file,
 C<main.css> is included into the generated HTML code of the current
-page. This file consists of a series of C<@import> directives that
+page. This file consists of a series of C<@include> directives that
 reference every single CSS file to get used.
 
 =head2 Expansion of CSS definitions

Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,119 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Authentication::Ldap;
+use base qw/Jifty::Plugin/;
+
+=head1 NAME
+
+Jifty::Plugin::Authentication::Ldap - ldap authentication plugin
+
+=head1 DESCRIPTION
+
+B<CAUTION:> This plugin is experimental.
+
+This may be combined with the L<Jifty::Plugin::User> plugin to provide user accounts and ldap password authentication to your application.
+
+in etc/config.yml
+
+  Plugins: 
+    - Login: {}
+    - Authentication::Ldap: 
+       LDAPhost: ldap.univ.fr           # ldap server
+       LDAPbase: ou=people,dc=.....     # base ldap
+       LDAPName: displayname            # name to be displayed (cn givenname)
+       LDAPMail: mailLocalAddress       # email used optionnal
+       LDAPuid: uid                     # optional
+
+
+
+=head2 METHODS
+
+=head2 prereq_plugins
+
+This plugin depends on the L<User|Jifty::Plugin::User> plugin.
+
+=cut
+
+
+sub prereq_plugins {
+    return ('User');
+}
+
+use Net::LDAP;
+
+
+my ($LDAP, %params);
+
+=head2 init
+
+read etc/config.yml
+
+=cut
+
+sub init {
+    my $self = shift;
+    my %args = @_;
+
+    $params{'Hostname'} = $args{LDAPhost};
+    $params{'base'} = $args{LDAPbase} or die "Need LDAPbase in plugin config";
+    $params{'uid'} = $args{LDAPuid} || "uid";
+    $params{'email'} = $args{LDAPMail} || "";
+    $params{'name'} = $args{LDAPName} || "cn";
+    $LDAP = Net::LDAP->new($params{Hostname},async=>1,onerror => 'undef', debug => 0)
+        or die "Can't connect to LDAP server ",$params{Hostname};
+}
+
+sub LDAP {
+    return $LDAP;
+}
+
+sub base {
+    return $params{'base'};
+}
+
+sub uid {
+    return $params{'uid'};
+}
+
+sub email {
+    return $params{'email'};
+};
+
+sub name {
+    return $params{'name'};
+};
+
+
+
+sub get_infos {
+    my ($self,$user) = @_;
+
+    my $result = $self->LDAP()->search (
+            base   => $self->base(),
+            filter => '(uid= '.$user.')',
+            attrs  =>  [$self->name(),$self->email()],
+            sizelimit => 1
+             );
+    $result->code && Jifty->log->error( 'LDAP uid=' . $user . ' ' . $result->error );
+    my ($ret) = $result->entries;
+    my $name = $ret->get_value($self->name());
+    my $email = $ret->get_value($self->email());
+
+    return ({ name => $name, email => $email });
+};
+
+
+
+=head1 SEE ALSO
+
+L<Jifty::Manual::AccessControl>, L<Jifty::Plugin::User>, L<Net::LDAP>
+
+=head1 LICENSE
+
+Jifty is Copyright 2005-2007 Best Practical Solutions, LLC.
+Jifty is distributed under the same terms as Perl itself.
+
+=cut
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,141 @@
+use warnings;
+use strict;
+
+=head1 NAME
+
+Jifty::Plugin::Authentication::Ldap::Action::LDAPLogin - process LDAP login plugin
+
+=cut
+
+package Jifty::Plugin::Authentication::Ldap::Action::LDAPLogin;
+use base qw/Jifty::Action/;
+
+
+=head1 ARGUMENTS
+
+Return the login form field
+
+=cut
+
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+    param ldap_id => 
+        label is _('Login'),
+        is mandatory;
+#        is ajax_validates;
+    param password =>
+        type is 'password',
+        label is _('Password'),
+        is mandatory;
+};
+
+=head2 validate_name NAME
+
+For ajax_validates.
+Makes sure that the name submitted is a legal login.
+
+
+=cut
+
+sub validate_ldap_id {
+    my $self  = shift;
+    my $name = shift;
+
+    unless ( $name =~ /^[A-Za-z0-9-]+$/ ) {
+        return $self->validation_error(
+            name => _("That doesn't look like a valid login.") );
+    }
+
+
+    return $self->validation_ok('name');
+}
+
+
+=head2 take_action
+
+Bind on ldap to check the user's password. If it's right, log them in.
+Otherwise, throw an error.
+
+
+=cut
+
+sub take_action {
+    my $self = shift;
+    my $username = $self->argument_value('ldap_id');
+    my ($plugin)  = Jifty->find_plugin('Jifty::Plugin::Authentication::Ldap');
+    my $dn = $plugin->uid().'='.$username.','.
+        $plugin->base();
+
+    Jifty->log->debug( "dn = $dn" );
+
+    # Bind on ldap
+    my $msg = $plugin->LDAP()->bind($dn ,'password' =>$self->argument_value('password'));
+
+
+    if ($msg->code) {
+        $self->result->error(
+     _('You may have mistyped your login or password. Give it another shot?')
+        );
+        Jifty->log->error( "LDAP bind $dn " . $msg->error . "" );
+        return;
+    }
+
+    # Load up the user
+    my $infos =  $plugin->get_infos($username);
+    my $name = $infos->{name};
+    my $email = $infos->{email};
+ 
+    my $current_user = Jifty->app_class('CurrentUser');
+    my $user = ($email) 
+        ? $current_user->new( email => $email)    # load by email to mix authentication
+        : $current_user->new( ldap_id => $username );  # else load by ldap_id
+
+
+    # Autocreate the user if necessary
+    if ( not $user->id ) {
+        my $action = Jifty->web->new_action(
+            class           => 'CreateUser',
+            current_user    => $current_user->superuser,
+            arguments       => {
+                ldap_id => $username
+            }
+        );
+        $action->run;
+
+        if ( not $action->result->success ) {
+            # Should this be less "friendly"?
+            $self->result->error(_("Sorry, something weird happened (we couldn't create a user for you).  Try again later."));
+            return;
+        }
+
+        $user = $current_user->new( ldap_id => $username );
+    }
+
+    my $u = $user->user_object;
+
+    # Update, just in case
+    $u->__set( column => 'name', value => $name );
+    $u->__set( column => 'email', value => $email );
+
+
+    # Login!
+    Jifty->web->current_user( $user );
+    Jifty->web->session->set_cookie;
+
+    # Success!
+    $self->report_success;
+
+    return 1;
+};
+
+=head2 report_success
+
+=cut
+
+sub report_success {
+    my $self = shift;
+    $self->result->message(_("Hi %1!", Jifty->web->current_user->user_object->name ));
+};
+
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogout.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogout.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,35 @@
+use warnings;
+use strict;
+
+=head1 NAME
+
+Jifty::Plugin::Authentication::Ldap::Action::LDAPLogout - process LDAP logout plugin
+
+=cut
+
+package Jifty::Plugin::Authentication::Ldap::Action::LDAPLogout;
+use base qw/Jifty::Action/;
+
+=head2 arguments
+
+Return the email and password form fields
+
+=cut
+
+sub arguments {
+    return ( {} );
+}
+
+=head2 take_action
+
+Nuke the current user object
+
+=cut
+
+sub take_action {
+    my $self = shift;
+    Jifty->web->current_user(undef);
+    return 1;
+}
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Dispatcher.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,32 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Authentication::Ldap::Dispatcher;
+use Jifty::Dispatcher -base;
+
+# Put any plugin-specific dispatcher rules here.
+
+# Log out
+before 'ldaplogout' => run {
+    Jifty->web->request->add_action(
+        class   => 'LDAPLogout',
+        moniker => 'ldaplogout',
+    );
+};
+
+
+# Login
+on 'ldaplogin' => run {
+    set 'action' =>
+        Jifty->web->new_action(
+        class => 'LDAPLogin',
+        moniker => 'ldaploginbox'
+    );
+    set 'next' => Jifty->web->request->continuation
+        || Jifty::Continuation->new(
+        request => Jifty::Request->new( path => "/" ) );
+};
+
+
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Mixin/Model/User.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/Mixin/Model/User.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,36 @@
+package Jifty::Plugin::Authentication::Ldap::Mixin::Model::User;
+use strict;
+use warnings;
+use Jifty::DBI::Schema;
+use base 'Jifty::DBI::Record::Plugin';
+use URI;
+
+=head1 NAME
+
+Jifty::Plugin::Authentication::Ldap::Mixin::Model::User - Ldap mixin with User model
+
+=head1 DESCRIPTION
+
+L<Jifty::Plugin::Authentication::Ldap> mixin for the User model.  Provides an 'ldap_id' column.
+
+=cut
+
+our @EXPORT = qw(has_alternative_auth);
+
+use Jifty::Plugin::Authentication::Ldap::Record schema {
+
+column ldap_id =>
+  type is 'text',
+  label is 'Ldap ID',
+  is distinct,
+  is immutable;
+
+};
+
+=head2 has_alternative_auth
+
+=cut
+
+sub has_alternative_auth { 1 }
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/View.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Ldap/View.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,50 @@
+use utf8;
+use warnings;
+use strict;
+
+=head1 NAME
+
+Jifty::Plugin::Authentication::Ldap::View - provides templates for the pages and forms used by the ldap authentication plugin.
+
+=cut
+
+package Jifty::Plugin::Authentication::Ldap::View;
+use Jifty::View::Declare -base;
+
+{ no warnings 'redefine';
+sub page (&;$) {
+    no strict 'refs';
+    BEGIN {Jifty::Util->require(Jifty->app_class('View'))};
+    Jifty->app_class('View')->can('page')->(@_);
+}
+}
+
+template ldaplogin => page { title => _('Login!') } content {
+    show('/ldaplogin_widget');
+};
+
+
+template ldaplogin_widget => sub {
+#    title is _("Login with your Ldap account") 
+
+    my ( $action, $next ) = get( 'action', 'next' );
+    $action ||= new_action( class => 'LDAPLogin' );
+    $next ||= Jifty::Continuation->new(
+        request => Jifty::Request->new( path => "/" ) );
+    unless ( Jifty->web->current_user->id ) {
+        h3  { _('Login with your ldap account') };
+        div {
+            attr { id => 'jifty-login' };
+            Jifty->web->form->start( call => $next );
+            render_param( $action, 'ldap_id', focus => 1 );
+            render_param( $action, 'password' );
+            form_return( label => _(q{Login}), submit => $action );
+            Jifty->web->form->end();
+        };
+    } else {
+        outs( _("You're already logged in.") );
+    }
+};
+
+
+1;

Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password.pm	Tue Sep 16 03:33:21 2008
@@ -8,18 +8,6 @@
 
 Jifty::Plugin::Authentication::Password - password authentication plugin
 
-=head1 SYNOPSIS
-
-# In your jifty config.yml under the framework section:
-
-  Plugins:
-    - LetMe: {}
-    - User: {}
-    - Authentication::Password:
-        login_by: email
-
-# we now support two login_by: email or username
-
 =head1 DESCRIPTION
 
 B<CAUTION:> This plugin is experimental.

Modified: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm	Tue Sep 16 03:33:21 2008
@@ -13,21 +13,6 @@
 
 use constant TOKEN_EXPIRE_TIME => 30;
 
-__PACKAGE__->mk_accessors( 'login_by' );
-
-=head2 new
-
-=cut
-
-sub new {
-    my $class = shift;
-    my $self = $class->SUPER::new(@_);
-    my $plugin =
-        Jifty->find_plugin('Jifty::Plugin::Authentication::Password');
-    $self->login_by( $plugin->{login_by} || 'email' );
-    return $self;
-}
-
 =head2 arguments
 
 Return the email and password form fields
@@ -35,30 +20,10 @@
 =cut
 
 sub arguments { 
-    my $self = shift;
-
-    my $login_para;
-    if ( $self->login_by eq 'username' ) {
-        $login_para = {
-            username => {
-                label          => _( 'Username' ),
-                mandatory      => 1,
-                ajax_validates => 1,
-            }
-        };
-    }
-    else {
-        $login_para = {
-            email => {
-                label          => _( 'Email' ),
-                mandatory      => 1,
-                ajax_validates => 1,
-            }
-        };
-    }
-
-    return( { 
-              %$login_para,
+    return( { email => { label => _('Email'),
+                           mandatory => 1,
+                           ajax_validates => 1,
+                            }  ,
 
               password => { type => 'password',
                             label => _('Password'),
@@ -93,38 +58,12 @@
     my $self  = shift;
     my $email = shift;
 
-    return $self->_validate_email_or_username(email => $email);
-}
+    my $u = $self->load_user($email);
+    return $self->validation_error(email => _("It doesn't look like there's an account by that name.")) unless ($u->id);
 
-=head2 validate_username ADDRESS
-
-there's a user in the database with it.
-
-Overridden from Jifty::Action::Record.
-
-=cut
-
-sub validate_username {
-    my $self     = shift;
-    my $username = shift;
-
-    return $self->_validate_email_or_username(username => $username);
+    return $self->validation_ok('email');
 }
 
-sub _validate_email_or_username {
-    my $self  = shift;
-    my $name  = shift;
-    my $value = shift;
-
-    if ($value) {
-        my $u = $self->load_user( $value);
-        return $self->validation_error(
-            $name => _("It doesn't look like there's an account by that name.")
-        ) unless ( $u->id );
-        return $self->validation_ok($name);
-    }
-    return;
-}
 
 =head2 validate_password PASSWORD
 
@@ -191,7 +130,7 @@
 
 sub take_action {
     my $self = shift;
-    my $user = $self->load_user( $self->argument_value( $self->login_by ) );
+    my $user = $self->load_user( $self->argument_value('email') );
     my $password = $self->argument_value('password');
     my $token    = $self->argument_value('token') || '';
     my $hashedpw = $self->argument_value('hashed_password');
@@ -235,13 +174,10 @@
 
 sub load_user {
     my $self = shift;
-    my $value = shift;
+    my $username = shift;
     my $user = Jifty->app_class('Model', 'User')->new(current_user => Jifty->app_class('CurrentUser')->superuser);
-
-    # normally we use name as column name instead of usernmae
-    my $column = $self->login_by eq 'username' ? 'name' : $self->login_by;
-    $user->load_by_cols( $column => $value );
-    return $user;
+    $user->load_by_cols( email => $username);
+    return $user
 
 }
 

Modified: jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/Google.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/Google.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/Google.pm	Tue Sep 16 03:33:21 2008
@@ -6,7 +6,6 @@
 
 use URI::Escape qw(uri_escape);
 use List::Util qw(max min sum);
-use List::MoreUtils qw(mesh);
 use Scalar::Util qw(looks_like_number);
 
 =head1 NAME
@@ -74,10 +73,6 @@
     $args{'width'} =~ s/px$//;
     $args{'height'} =~ s/px$//;
 
-    # a bit of dwim
-    $args{'min_value'} ||= delete $args{'min_values'};
-    $args{'max_value'} ||= delete $args{'max_values'};
-
     # Check size and die if wrong
     for ( qw(width height) ) {
         if ( $type eq 't' ) {
@@ -192,43 +187,28 @@
             }
         }
 
-        for ('min_value', 'max_value') {
-            $args{$_} = [ $args{$_} ] if !ref($args{$_});
-        }
-
-        my @min = map { $_ - $args{'min_minus'} } @{ $args{'min_value'} };
-        my @max = map { $_ - $args{'max_plus'}  } @{ $args{'max_value'} };
-
-        # repeat if necessary
-        push @min, ($min[-1]) x (@{ $args{'data'} } - @min);
-        push @max, ($max[-1]) x (@{ $args{'data'} } - @max);
-
-        $args{'calculated_min'} = \@min;
-        $args{'calculated_max'} = \@max;
+        my $min = $args{'min_value'} - $args{'min_minus'};
+        my $max = $args{'max_value'} + $args{'max_plus'};
+        
+        $args{'calculated_min'} = $min;
+        $args{'calculated_max'} = $max;
 
         # Format the min and max for use a few lines down
         unless ( not defined $args{'format'} ) {
-            @min = map { sprintf $args{'format'}, $_ } @min;
-            @max = map { sprintf $args{'format'}, $_ } @max;
+            $min = sprintf $args{'format'}, $min;
+            $max = sprintf $args{'format'}, $max;
         }
 
         # If it's a number, pass it through, otherwise replace it with a
         # number out of range to mark it as undefined
         my @data;
-        for my $data_idx ( 0 .. @{$args{'data'}}-1 ) {
-            push @data, [
-                map {
-                    looks_like_number($_)
-                    ? $_
-                    : $min[$data_idx] - 42
-                } @{ $args{'data'}[$data_idx] }
-            ];
+        for my $data ( @{$args{'data'}} ) {
+            push @data, [map { looks_like_number($_) ? $_ : $min-42 } @$data];
         }
 
         # Let's do text encoding with data scaling
         $url .= "&chd=t:" . join '|', map { join ',', @$_ } @data;
-
-        $url .= "&chds=" . join(',', mesh @min, @max);
+        $url .= "&chds=$min,$max";
     }
 
     # Add a title
@@ -260,9 +240,7 @@
                 }
                 elsif ( not ref $labelset and $labelset eq 'RANGE' ) {
                     push @ranges, sprintf "%d,$args{'format'},$args{'format'}",
-                                           $index,
-                                           $args{'calculated_min'}[$index],
-                                           $args{'calculated_max'}[$index];
+                                           $index, $args{'calculated_min'}, $args{'calculated_max'};
                 }
                 $index++;
             }
@@ -298,7 +276,6 @@
     # Add shape/range markers
     if ( @{ $args{'markers'} } ) {
         my @markers;
-        my $index = 0;
         for my $data ( @{$args{'markers'}} ) {
             my %marker = (
                 type     => 'x',
@@ -313,18 +290,18 @@
             # Calculate where the position should be for horizontal lines
             if ( $marker{'type'} eq 'h' ) {
                 $marker{'position'} = $self->_position_in_range( $marker{'position'},
-                                                                 $args{'calculated_min'}[$index],
-                                                                 $args{'calculated_max'}[$index] );
+                                                                 $args{'calculated_min'},
+                                                                 $args{'calculated_max'} );
             }
             # Calculate where the position should be for ranges
             elsif ( lc($marker{'type'}) eq 'r' ) {
                 for (qw( start end )) {
-                    $marker{$_} = $args{'calculated_min'}[$index] if $marker{$_} eq 'MIN';
-                    $marker{$_} = $args{'calculated_max'}[$index] if $marker{$_} eq 'MAX';
+                    $marker{$_} = $args{'calculated_min'} if $marker{$_} eq 'MIN';
+                    $marker{$_} = $args{'calculated_max'} if $marker{$_} eq 'MAX';
 
                     $marker{$_} = $self->_position_in_range( $marker{$_},
-                                                             $args{'calculated_min'}[$index],
-                                                             $args{'calculated_max'}[$index] );
+                                                             $args{'calculated_min'},
+                                                             $args{'calculated_max'} );
                 }
             }
             # Fix text type
@@ -344,7 +321,6 @@
             push @markers, join(',', @marker{qw( type color dataset position size priority )});
         }
         $url .= "&chm=" . join '|', @markers if @markers;
-        ++$index;
     }
 
     Jifty->web->out( qq{<img src="$url" />} );
@@ -367,23 +343,21 @@
 
 # Borrowed with slight modifications from Google::Chart::Data::SimpleEncoding
 sub _simple_encode_data {
-    my $self  = shift;
-    my $maxes = shift;
-    my $data  = shift;
+    my $self = shift;
+    my $max  = shift;
+    my $data = shift;
 
-    my $i = 0;
     my $result = '';
     my @map = ('A'..'Z', 'a'..'z', 0..9);
     for my $value ( @$data ) {
         if ( looks_like_number($value) ) {
-            my $index = int($value / $maxes->[$i] * (@map - 1));
+            my $index = int($value / $max * (@map - 1));
             $index = 0 if $index < 0;
             $index = @map if $index > @map;
             $result .= $map[$index];
         } else {
             $result .= '_';
         }
-        ++$i;
     }
     return $result;
 }

Modified: jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/XMLSWF.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/XMLSWF.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/XMLSWF.pm	Tue Sep 16 03:33:21 2008
@@ -61,26 +61,10 @@
         'lines'          => 'line',
         'pie'            => '3d pie',
         'points'         => 'scatter',
-        'area'           => 'area',
     );
 
     # Make sure the type is ready to be used
-
-    if ($args{type} eq 'composite') {
-        for (@{ $args{types} }) {
-            if (!$types{$_}) {
-                Jifty->log->warn("Unsupported chart type: $_!");
-                return;
-            }
-            $_ = $types{$_};
-        }
-    }
-    else {
-        $args{type} = $types{ $args{type} } or do {
-            Jifty->log->warn("Unsupported chart type: $args{type}!");
-            return;
-        };
-    }
+    $args{type} = $types{ $args{type} } || undef;
 
     # Kill the "px" unit
     $args{width} =~ s/px$//;

Modified: jifty/trunk/lib/Jifty/Plugin/Chart/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Chart/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Chart/View.pm	Tue Sep 16 03:33:21 2008
@@ -112,10 +112,6 @@
         },
     );
 
-    if ($args->{type} eq 'composite') {
-        $chart{chart_type} = { string => $args->{types} };
-    }
-
     for my $i ( 0 .. $#{ $args->{data} } ) {
         push @{$chart{'chart_data'}{'row'}}, {
             string => [ $args->{legend}[$i] || {} ],

Added: jifty/trunk/lib/Jifty/Plugin/Comment.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,214 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment;
+use base qw/ Jifty::Plugin /;
+
+__PACKAGE__->mk_accessors( qw/ akismet scrubber scrub_message / );
+
+use HTML::Scrubber;
+
+=head1 NAME
+
+Jifty::Plugin::Comment - Add comments to any record
+
+=head1 SYNOPSIS
+
+Setup the F<config.yml>
+
+  Plugins:
+    - Comment:
+      
+      # Set this if you want spam checking by Net::Akismet
+      Akismet:
+        Key: 1234567890a
+        Url: http://example.com
+
+      # Set this if you want to customize the HTML scrubbing of comments
+      Scrubber:
+        message: "Comments may only contain <strong>, <em>, and <a> tags."
+        allow:
+          - strong
+          - em
+          - a
+        default:
+          - 0
+          - 
+            '*': 0
+            href: !!perl/regexp:
+              REGEXP: '^(?!(?:java)?script)'
+              MODIFIERS: i
+
+Setup a model that has comments:
+
+  package App::Model::Fooble;
+  
+  use Jifty::DBI::Schema;
+  use App::Record schema {
+      column scribble => type is 'text';
+      column wobble => type is 'int';
+  };
+
+  use Jifty::Plugin::Comment::Mixin::Model::Commented;
+
+  sub allow_owner_update_delete {
+      my $self = shift;
+      my ($right, %args) = @_;
+
+      if ($right eq 'create') {
+          return 'allow' ;#if $self->current_user->id;
+      }
+
+      if ($right eq 'update' || $right eq 'delete') {
+          return 'allow' if $self->current_user->id;
+      }
+
+      if ($right eq 'read') {
+          return 'allow';
+      }
+
+      return 'deny';
+  };
+
+  App::Model::FoobleComment->add_trigger( name => 'before_access', callback => \&allow_owner_update_delete);
+  App::Model::Comment->add_trigger( name => 'before_access', callback => \&allow_owner_update_delete);
+
+Setup a view for creating, viewing, and managing the comments:
+
+  # assuming $fooble here isa App::Action::UpdateFooble object
+  template 'fooble/view' => page {
+      my $fooble = get 'fooble';
+
+      render_action $fooble, undef, { render_mode => 'read' };
+
+      render_region
+          name     => 'fooble-comments',
+          path     => '__comment/list_and_add',
+          defaults => { 
+              comment_upon  => $fooble->record->for_commenting,
+              initial_title => 'Re: '.substr($fooble->scribble, 0, 20).'...',
+          },
+          ;
+  };
+
+=head1 DESCRIPTION
+
+This plugin allows you to attach comments to any model. You do this using the three steps listed in the synopsis. For variations on these steps, see the other classes that handle the individual parts.
+
+=head1 COMMENTED RECORDS
+
+To set up a commented model, you will need to do the following:
+
+=over
+
+=item 1 Add ths plugin to your project by modifying your F<config.yml>.
+
+=item 1 Add the L<Jifty::Plugin::Comment::Mixin::Model::Commented> mixin to the model or models that you want to have comments attached to. See that class for details on how it works. You may also want to examine L<Jifty::Plugin::Comment::Model::Comment> on how to customize that class for your application.
+
+=item 1 Create a view that appends a comment editor to your edit form (or on a separate page or wherever you feel like comments work best in your application). You should be able to use these views from either L<Template::Declare> or L<HTML::Mason> templates. See L<Jifty::Plugin::Comment::View> for additional details on what views are available.
+
+=back
+
+=head1 METHODS
+
+=head2 init
+
+Called during initialization. This will setup the L<Net::Akismet> object if it is configured and available.
+
+=cut
+
+sub init {
+    my $self = shift;
+
+    $self->_init_akismet(@_);
+    $self->_init_scrubber(@_);
+}
+
+sub _init_akismet {
+    my $self = shift;
+    my %args = @_;
+
+    # Stop now if we don't have the Akismet thing
+    return unless defined $args{Akismet};
+
+    # Check for the Akismet options
+    my $key = $args{Akismet}{Key};
+    my $url = $args{Akismet}{Url};
+
+    # Don't go forward unless we have a key and a URL configured
+    return unless $key and $url;
+
+    # Try to load Akismet first...
+    eval "use Net::Akismet";
+    if ($@) {
+        Jifty->log->error("Failed to load Net::Akismet. Your comments will not be checked for link spam and the like. $@");
+        return;
+    }
+
+    # Now get our object
+    my $akismet = Net::Akismet->new( KEY => $key, URL => $url );
+
+    unless ($akismet) {
+        Jifty->log->error("Failed to verify your Akismet key. Your comments will not be checked for link spam and the like.");
+        return;
+    }
+
+    $self->akismet($akismet);
+}
+
+sub _init_scrubber {
+    my $self = shift;
+    my %args = @_;
+
+    my $scrubber_args = $args{Scrubber};
+    if (not defined $scrubber_args) {
+        $scrubber_args = {
+            message => 'Comments may only contain <strong>, <em>, and <a> tags.'
+                      .' Anything else will be removed.',
+            allow   => [ qw/ strong em a / ],
+            default => [ 0, { '*' => 0, 'href' => qr{^(?!(?:java)?script)}i } ],
+        };
+    }
+
+    my $scrub_message = delete $scrubber_args->{message};
+    $scrub_message = 'The text you have given will be cleaned up.'
+        unless $scrub_message;
+
+    $self->scrub_message($scrub_message);
+
+    my $scrubber = HTML::Scrubber->new( %$scrubber_args );
+
+    $self->scrubber($scrubber);
+}
+
+=head2 akismet
+
+This returns an instance of L<Net::Akismet> that is used to check to see if a new comment posted contains spam. No such checking is performed if this returns C<undef>, which indicates that C<Net::Akismet> is unavailable, wasn't configured, or there was an error configuring it (e.g., the Akismet server was unavailable during Jifty startup).
+
+=head2 scrubber
+
+This returns an instance of L<HTML::Scrubber> that is used to clean up HTML submitted in comments.
+
+=head1 TO DO
+
+Right now the module depends directly upon L<HTML::Scrubber> to do the work of cleaning up the text. You might want to use something else to do this. It also provides no mechanism for customizing any other aspect of the formatting. For example, your application might want to use Markdown, or BBCode, or just turn line breaks in the BR-tags, or anything else to format the comment text.
+
+In the future, I'd like to consider something like L<Text::Pipe> or a similar API to allow these formats to be customized more easily.
+
+=head1 SEE ALSO
+
+L<Net::Akismet>, L<HTML::Scrubber>
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp, C<< <hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2007 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Comment/Action/CreateComment.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/Action/CreateComment.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,435 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment::Action::CreateComment;
+use base qw/ Jifty::Action::Record::Create /;
+
+=head1 NAME
+
+Jifty::Plugin::Comment::Action::CreateComment - custom CreateComment that attaches the comment to the parent
+
+=head1 DESCRIPTION
+
+This is a specialized create action that attaches the comment to the parent object.
+
+=head1 SCHEMA
+
+=head2 parent_class
+
+This is the parent model class. This class must use the L<Jifty::Plugin::Comment::Mixin::Model::Commented> mixin.
+
+=head2 parent_id
+
+This is the ID of the object to attach the comment to.
+
+=head2 title
+
+This is the title the author of the comment has given it.
+
+=head2 your_name
+
+This is the name of the author of the comment.
+
+=head2 web_site
+
+This is the (optional) web site of the author of the comment.
+
+=head2 email
+
+This is the (optional) email address of the author of the comment.
+
+=head2 body
+
+This is the comment message.
+
+=head2 published
+
+This is true if the comment should be published or false if it is only visible to moderators.
+
+=head2 created_on
+
+This is the timestamp of the comment's creation.
+
+=head2 status
+
+This is string with either the value "spam" for a message that has been flagged as spam or "ham" for a message that is not spam.
+
+=head2 http_referer
+
+The referer claimed by the client.
+
+=head2 http_user_agent
+
+The user agent claimed by the client.
+
+=head2 ip_addr
+
+The IP address of the client.
+
+=cut
+
+use Jifty::Param::Schema;
+use Jifty::Action::Record::Create schema {
+    param parent_class =>
+        type is 'hidden',
+        is mandatory,
+        order is 1,
+        ;
+
+    param parent_id =>
+        type is 'hidden',
+        is mandatory,
+        order is 2,
+        ;
+
+    param title =>
+        label is 'Title',
+        is mandatory,
+        ajax validates,
+        is focus,
+        order is 3,
+        ;
+
+    param your_name =>
+        label is 'Your name',
+        default is defer { from_cookie(0) },
+        # TODO This is canonicalizing at the wrong time, I need another way.
+#        ajax canonicalizes,
+        order is 4,
+        ;
+
+    param web_site =>
+        label is 'Web site',
+        default is defer { from_cookie(1) },
+        ajax validates,
+        order is 5,
+        ;
+
+    param email =>
+        label is 'Email address',
+        default is defer { from_cookie(2) },
+        ajax validates,
+        order is 6,
+        ;
+
+#    param remember_me =>
+#        type is 'checkbox',
+#        label is 'Remember me',
+#        hints is 'Check this box for this site to store a cookie on your browser that is used to automatically fill in your name, email address, and web site the next time you make a comment.',
+#        ;
+
+    param body =>
+        type is 'textarea',
+        label is 'Comment',
+        is mandatory,
+        ajax validates,
+        order is 7,
+        ;
+
+    param published =>
+        type is 'unrendered',
+        render as 'unrendered',
+        mandatory is 0,
+        ;
+
+    param created_on =>
+        type is 'unrendered',
+        render as 'unrendered',
+        ;
+
+    param status =>
+        type is 'unrendered',
+        render as 'unrendered',
+        ;
+
+    param http_referer =>
+        type is 'unrendered',
+        render as 'unrendered',
+        ;
+
+    param http_user_agent =>
+        type is 'unrendered',
+        render as 'unrendered',
+        ;
+
+    param ip_addr =>
+        type is 'unrendered',
+        render as 'unrendered',
+        ;
+};
+
+use CGI::Cookie;
+use MIME::Base64::URLSafe;
+#use Contentment::Notification::CommentPublished;
+#use Contentment::Notification::CommentNeedsModeration;
+#use Contentment::Util;
+use Regexp::Common qw/ Email::Address URI /;
+
+=head1 METHODS
+
+=head2 record_class
+
+Returns the application's comment class.
+
+=cut
+
+sub record_class { Jifty->app_class('Model', 'Comment') }
+
+=head2 parent
+
+This converts the "parent_id" and "parent_class" arguments into an object.
+
+=cut
+
+sub parent {
+    my $self = shift;
+
+    my $parent_class = $self->argument_value('parent_class');
+    my $parent_id    = $self->argument_value('parent_id');
+
+    my $parent = $parent_class->new;
+    $parent->load($parent_id);
+
+    return $parent;
+}
+
+=head2 take_action
+
+Performs the work of attaching the comment to the parent object.
+
+=cut
+
+sub take_action {
+    my $self = shift;
+
+    if ($self->argument_value('submit')) {
+        my $your_name     = urlsafe_b64encode($self->argument_value('your_name'));
+        my $web_site      = urlsafe_b64encode($self->argument_value('web_site'));
+        my $email = urlsafe_b64encode(
+            $self->argument_value('email'));
+
+        my $cookie = CGI::Cookie->new(
+            -path    => '/',
+            -name    => 'COMMENT_REMEMBORY',
+            -value   => join('.', $your_name, $web_site, $email),
+            -expires => '+3M',
+        );
+
+        Jifty->web->response->add_header( 'Set-Cookie' => $cookie->as_string );
+
+        $self->SUPER::take_action(@_);
+
+        # On success, create the extra link record
+        if ($self->result->success) {
+            my $parent_class = $self->argument_value('parent_class');
+            my $link = $parent_class->comment_record_class->new;
+            $link->create(
+                commented_upon => $self->parent,
+                the_comment    => $self->record,
+            );
+
+            # Link failed?
+            unless ($link->id) {
+                $self->log->error("Failed to create the comment and linking record required for comment #@{[$self->record->id]} and parent record class @{[$self->argument_value('parent_class')]} #@{[$self->argument_value('parent_id')]}");
+                $self->result->message(undef);
+                $self->result->error("Failed to create the comment and linking record required. This error has been logged.");
+            }
+
+            # Link succeeded! This comment's training is complete!
+            else {
+                # Send notification by email to the site owners
+                my $notification_class 
+                    = $self->record->published ? 'CommentPublished'
+                    :                            'CommentNeedsModeration';
+                $notification_class 
+                    = Jifty->app_class('Notification', $notification_class);
+                my $notification = $notification_class->new( 
+                    comment => $self->record, 
+                    parent  => $self->parent,
+                );
+                $notification->send;
+            }
+        }
+    }
+    else {
+        $self->result->message(qq{Previewing your comment titled "@{[$self->argument_value('title') || 'Untitled']}"});
+        $self->result->failure(1);
+    }
+}
+
+=head2 report_success
+
+Reports success or the need for moderation of the message.
+
+=cut
+
+sub report_success {
+    my $self = shift;
+    $self->result->message(_("Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."));
+}
+
+=head2 fetch_comment_cookie
+
+Creating a comment this way causes a cookie named "COMMENT_REMEMBORY" to be stored on the client to remember the client's name, email, and web site choice for the next comment.
+
+=cut
+
+my $comment_cookie;
+sub fetch_comment_cookie {
+    return $comment_cookie if defined $comment_cookie;
+
+    my %cookies = CGI::Cookie->fetch;
+    $comment_cookie 
+        = $cookies{'COMMENT_REMEMBORY'} ? $cookies{'COMMENT_REMEMBORY'} : '';
+
+    return $comment_cookie;
+}
+
+=head2 from_cookie
+
+Loads the name, email, and web site from the stored cookie.
+
+=cut
+
+sub from_cookie {
+    my $pos = shift;
+
+    if (Jifty->web->current_user->id) {
+        return Jifty->web->escape(
+               $pos == 0 ? Jifty->web->current_user->user_object->name
+             : $pos == 1 ? Jifty->config->framework('Web')->{'BaseURL'}
+             : $pos == 2 ? Jifty->web->current_user->user_object->email
+             :             ''
+        );
+    }
+
+    elsif (my $value = eval { fetch_comment_cookie()->value }) {
+        my @fields = split /\./, $value;
+
+        if (defined $fields[ $pos ]) {
+            return Jifty->web->escape(urlsafe_b64decode($fields[ $pos ]));
+        }
+        else {
+            return '';
+        }
+    }
+
+    else {
+        return '';
+    }
+}
+
+=head2 validate_title
+
+Make sure a title is set.
+
+=cut
+
+sub validate_title {
+    my $self = shift;
+    my $title = shift;
+
+    if (!$title || $title =~ /^\s*$/) {
+        return $self->validation_error(title => 'You must give a title.');
+    }
+
+    return $self->validation_ok('title');
+}
+
+#sub canonicalize_your_name {
+#    my $self = shift;
+#    my $your_name = shift;
+#
+#    if (!$your_name || $your_name =~ /^\s*$/ || $your_name =~ /\banonymous\b/i) {
+#        $self->canonicalization_note( your_name => 'Afraid to stand behind your words? Any malicious or evil comments by an Anonymous Coward (or anyone) will be unpublished.' );
+#        return 'Anonymous Coward';
+#    }
+#
+#    return $your_name;
+#}
+
+=head2 validate_web_site
+
+Make sure the web site given is valid.
+
+=cut
+
+sub validate_web_site {
+    my $self = shift;
+    my $web_site = shift;
+
+    if (!$web_site || $web_site =~ /^\s*$/) {
+        return $self->validation_ok('web_site');
+    }
+
+    unless ($web_site =~ /^$RE{URI}{HTTP}$/) {
+        return $self->validation_error(
+            web_site => 'This does not look like a proper URL. Make sure it starts with http:// or https://'
+        );
+    }
+
+    return $self->validation_ok('web_site');
+}
+
+=head2 validate_email
+
+Make sure the email given is valid.
+
+=cut
+
+sub validate_email {
+    my $self = shift;
+    my $email = shift;
+
+    if (!$email || $email =~ /^\s*$/) {
+        return $self->validation_ok('email');
+    }
+
+    unless ($email =~ /^$RE{Email}{Address}$/) {
+        return $self->validation_error(
+            email => 'This does not look like a proper e-mail address.',
+        );
+    }
+
+    return $self->validation_ok('email');
+}
+
+=head2 validate_body
+
+Checks to see if the scrubbed HTML is the same as the given HTML to see if it will be changed on save and reports that to the client.
+
+=cut
+
+sub validate_body {
+    my $self = shift;
+    my $body = shift;
+
+    if (!$body || $body =~ /^\s*$/) {
+        return $self->validation_error(body => 'You must type a comment.');
+    }
+
+    my $plugin = Jifty->find_plugin('Jifty::Plugin::Comment');
+    my $scrubber = $plugin->scrubber;
+    my $message  = $plugin->scrub_message;
+
+    my $clean_body = $scrubber->scrub($body);
+    if ($clean_body ne $body) {
+        return $self->validation_warning(body => Jifty->web->escape($message));
+    }
+
+    return $self->validation_ok('body');
+}
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp, C<< <hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2008 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Comment/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/Dispatcher.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,144 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment::Dispatcher;
+use Jifty::Dispatcher -base;
+
+use Scalar::Util qw/ blessed looks_like_number /;
+
+=head1 NAME
+
+Jifty::Plugin::Comment::Dispatcher - dispatcher for the comment plugin
+
+=head1 DESCRIPTION
+
+Handles the dispatch of the C<__comment> paths used by this plugin.
+
+=head1 METHODS
+
+=head2 setup_parent_object
+
+Called internally by the dispatcher rules to create the "parent" dispatcher argument from "comment_upon" or "parent_class" and "parent_id".
+
+=cut
+
+sub setup_parent_object() {
+    my $parent;
+    unless (get 'parent') {
+        my ($parent_class, $parent_id) = @_;
+        if (get 'comment_upon') {
+            my $comment_upon = get 'comment_upon';
+            ($parent_class, $parent_id) = $comment_upon =~ /^([\w:]+)-(\d)$/;
+        }
+        else {
+            $parent_class = get 'parent_class';
+            $parent_id    = get 'parent_id';
+        }
+
+        abort 404 unless $parent_class and $parent_id;
+        abort 500 unless $parent_class =~ /^[\w:]+$/;
+        abort 500 unless eval { $parent_class->isa('Jifty::Record') };
+        abort 500 unless looks_like_number($parent_id);
+
+        $parent = $parent_class->new;
+        $parent->load($parent_id);
+
+        set parent => $parent;
+    }
+
+    else {
+        $parent = get 'parent';
+    }
+
+    abort 500 unless eval { $parent->isa('Jifty::Record') };
+    abort 500 unless eval { $parent->can('comments') };
+    abort 404 unless eval { $parent->id };
+
+}
+
+=head1 RULES
+
+=head2 __comment/list
+
+Sets up the "parent" argument for the list template.
+
+=cut
+
+on '__comment/list' => run {
+    setup_parent_object();
+};
+
+=head2 __comment/add
+
+Set up the "parent" argument for the add template and set the "CreateComment" action into the "action" argument.
+
+=cut
+
+on '__comment/add' => run {
+    setup_parent_object();
+
+    my $parent = get 'parent';
+
+    my $action = Jifty->web->new_action( 
+        class => 'CreateComment',
+        moniker => 'add-comment-'.$parent->id,
+        arguments => {
+            parent_class => blessed $parent,
+            parent_id    => $parent->id,
+        },
+    );
+    $action->argument_value( title => get('title') || '')
+        unless $action->argument_value('title');
+    set action => $action;
+
+    show '/__comment/add';
+};
+
+=head2 __comment/display
+
+Sets up the "comment" argument and will update the status and published values of the comment if "update_status" or "update_published" are set, respectively.
+
+=cut
+
+on '__comment/display' => run {
+    my $id = get 'id';
+
+    my $comment = Jifty->app_class('Model', 'Comment')->new;
+    $comment->load($id);
+
+    if (get 'update_status') {
+        my $action = $comment->as_update_action;
+        $action->argument_value( status => get 'update_status' );
+        $action->run;
+
+        Jifty->web->response->result( $action->moniker => $action->result );
+    }
+
+    if (defined get 'update_published') {
+        my $action = $comment->as_update_action;
+        $action->argument_value( published => get 'update_published' );
+        $action->run;
+
+        Jifty->web->response->result( $action->moniker => $action->result );
+    }
+
+    set comment => $comment;
+};
+
+=head1 SEE ALSO
+
+L<Jifty::Dispatcher>
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp, C<< <hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2008 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Comment/Mixin/Model/Commented.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/Mixin/Model/Commented.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,187 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment::Mixin::Model::Commented;
+use base qw/ Jifty::DBI::Record::Plugin /;
+
+our @EXPORT = qw( comments comment_record_class for_commenting );
+
+use Scalar::Util qw/ blessed /;
+
+use Jifty::DBI::Schema;
+use Jifty::Record schema {
+};
+
+=head1 NAME
+
+Jifty::Plugin::Comment::Mixin::Model::Commented - add comments to a model
+
+=head1 SYNOPSIS
+
+  package App::Model::Fooble;
+
+  use Jifty::DBI::Schema;
+  use App::Record schema {
+      column scribble => type is 'text';
+      column wobble => type is 'int';
+  };
+
+  use Jifty::Plugin::Comment::Mixin::Model::Commented;
+
+=head1 DESCRIPTION
+
+Add this mixin to a model if you'd like to attach comments to it. Comments can be used to allow users of your system to comment upon and discuss the record to which they are attached.
+
+=head1 METHODS
+
+=head2 import
+
+This method performs some rather devious magic to make everything work easily. It automatically generates an additional model for your application. This model will look something like this:
+
+  use strict;
+  use warnings;
+  
+  package App::Model::FoobleComment;
+  use Jifty::DBI::Schema;
+  
+  use Jifty::Record schema {
+      column commented_upon =>
+          references App::Model::Fooble,
+          label is 'Commented upon',
+          is mandatory,
+          is immutable,
+          ;
+  
+      column the_comment =>
+          references App::Model::Comment,
+          label is 'Comment',
+          is mandatory,
+          is immutable,
+          is distinct,
+          ;
+  };
+
+  App::Model::FoobleComment->add_trigger( before_access => sub {
+      my $self = shift;
+      my ($right, %args) = @_;
+
+      if ($right eq 'create') {
+          return 'allow' if $self->current_user->id;
+      }
+
+      if ($right eq 'read') {
+          return 'allow';
+      }
+
+      return $self->App::Model::FoobleComment::current_user_can(@_);
+  });
+  
+You will need to define an C<before_access> trigger for this class if you want it to be useful.
+
+=cut
+
+sub import {
+    my $my_class      = caller;
+    my $comment_class = $my_class.'Comment';
+    my $app_class     = Jifty->app_class;
+
+    eval "
+use strict;
+use warnings;
+
+package ${comment_class};
+use Jifty::DBI::Schema;
+
+use Jifty::Record schema {
+    column commented_upon =>
+        references ${my_class},
+        label is 'Commented upon',
+        is mandatory,
+        is immutable,
+        ;
+
+    column the_comment =>
+        references ${app_class}::Model::Comment,
+        label is 'Comment',
+        is mandatory,
+        is immutable,
+        is distinct,
+        ;
+};
+
+1;
+";
+
+    die "Failed to create comment link model ${comment_class}: $@" if $@;
+
+    Jifty->class_loader->_require_model_related_classes($comment_class);
+
+    my $comment_filename = $comment_class;
+    $comment_filename =~ s{::}{/}g;
+    $comment_filename .= '.pm';
+    $INC{ $comment_filename } = 'autogenerated';
+
+    goto &Jifty::DBI::Record::Plugin::import;
+}
+
+=head2 for_commenting
+
+Returns a value to be used with the comment views. It's basically just a string identifying the class name and ID of the record.
+
+=cut
+
+sub for_commenting {
+    my $self = shift;
+    return blessed($self) . '-' . $self->id;
+}
+
+=head2 comments
+
+Returns a collection of L<Jifty::Plugin::Comment::Model::Comment> objects that have been attached to the current record. (Actually, it returns the a collection of the local application class, e.g. C<App::Model::CommentCollection>.)
+
+=cut
+
+sub comments {
+    my $self = shift;
+
+    my $comments = Jifty->app_class('Model', 'CommentCollection')->new;
+    my $link_alias = $comments->join(
+        column1 => 'id',
+        table2  => $self->comment_record_class->table,
+        column2 => 'the_comment',
+    );
+
+    $comments->limit(
+        alias  => $link_alias,
+        column => 'commented_upon',
+        value  => $self->id,
+    );
+
+    return $comments;
+}
+
+=head2 comment_record_class
+
+This is the name of the linking class that was created during L</import>.
+
+=cut
+
+sub comment_record_class {
+    my $self = shift;
+    return (ref $self || $self).'Comment';
+}
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp C<< <hanenkamp at cpan.com> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2007 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;
+

Added: jifty/trunk/lib/Jifty/Plugin/Comment/Model/Comment.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/Model/Comment.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,321 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment::Model::Comment;
+use Jifty::DBI::Schema;
+
+use constant CLASS_UUID => '7B703CCA-544E-11DC-9227-2E96D84604BE';
+
+=head1 NAME
+
+Jifty::Plugin::Comment::Model::Comment - comments attached to anything
+
+=head1 SYNOPSIS
+
+  # to customize...
+  package App::Model::Comment;
+  use base qw/ Jifty::Plugin::Comment::Model::Comment /;
+
+  use Jifty::DBI::Schema;
+  use App::Record schema {
+      # Add a reference to the current user that creates this comment
+      column by_user =>
+          references App::Model::User,
+          ;
+  };
+
+  # make it so that any logged user can comment, but anyone can view, except
+  # that we don't really want everyone seeing all those personal bits...
+  sub current_user_can {
+      my $self = shift;
+      my ($right, %args) = @_;
+
+      if ($right eq 'create') {
+          return 1 if $self->current_user->id;
+      }
+
+      if ($right eq 'read') {
+          return $self->published
+              unless $args{column} =~ /^ 
+                  (?: email
+                    | status
+                    | ip_addr
+                    | http_refer
+                    | http_user_agent ) $/x;
+      }
+
+      # otherwise only superuser gets in
+      return $self->SUPER::current_user_can(@_);
+  }
+
+=head1 DESCRIPTION
+
+This model is the repository for all comments in your application, if you use the L<Jifty::Plugin::Comment> plugin.
+
+=head1 SCHEMA
+
+=head2 title
+
+This is the title of the comment.
+
+=head2 body
+
+This is the body of the comment.
+
+=head2 created_on
+
+This is the timestamp of when the comment was created.
+
+=head2 your_name
+
+This is the name the author of the comment has claimed.
+
+=head2 web_site
+
+This is the name of the web site the author claims as her own.
+
+=head2 email
+
+This is the email address the author is claiming.
+
+=head2 published
+
+This is a boolean flag indicating whether the comment should be shown or not when viewed.
+
+=head2 status
+
+This is a flag containing one of two values: "spam" or "ham". It indicates whether the comment has been evaluated as spam or not by L<Net::Akismet>.
+
+=head2 ip_addr
+
+This is the IP address of the remote client of the author that made the comment.
+
+=head2 http_referer
+
+This is the HTTP referer that was sent by the browser when the author made the comment.
+
+=head2 http_user_agent
+
+This is the HTTP user agent that was sent by the browser when the author made the comment.
+
+=cut
+
+use Jifty::Record schema {
+    column title =>
+        type is 'text',
+        label is 'Title',
+        is mandatory,
+        ;
+
+    column body =>
+        type is 'text',
+        label is 'Body',
+        is mandatory,
+        render as 'Textarea',
+        ;
+
+    column created_on =>
+        type is 'timestamp',
+        label is 'Created on',
+        filters are qw/ Jifty::DBI::Filter::DateTime /,
+        ;
+
+    column your_name =>
+        type is 'text',
+        label is 'Your name',
+        is mandatory,
+        ;
+
+    column web_site =>
+        type is 'text',
+        label is 'Web site',
+        ;
+
+    column email =>
+        type is 'text',
+        label is 'Email address',
+        ;
+
+    column published =>
+        type is 'boolean',
+        label is 'Published?',
+        is mandatory,
+        default is 1,
+        ;
+
+    column status =>
+        type is 'varchar(4)',
+        label is 'Status',
+        valid_values are qw/ spam ham /,
+        default is 'ham',
+        ;
+
+    column ip_addr =>
+        type is 'text',
+        label is 'IP Address',
+        ;
+
+    column http_referer =>
+        type is 'text',
+        label is 'HTTP Referer',
+        ;
+
+    column http_user_agent =>
+        type is 'text',
+        label is 'HTTP User Agent',
+        ;
+};
+
+use DateTime;
+use HTML::Scrubber;
+
+=head1 METHODS
+
+=head2 table
+
+Returns the database table name for the comments table.
+
+=cut
+
+sub table { 'comment_comments' }
+
+=head2 before_create
+
+It is assumed that your comments will be made available for create with very little restriction. This trigger is used to perform aggressive cleanup on the data stored and will attempt to check to see if the comment is spam by using L<Net::Akismet>.
+
+=cut
+
+sub before_create {
+    my $self = shift;
+    my $args = shift;
+
+    # Clean up stuff added by Jifty::Plugin::Comment::Action::CreateComment
+    delete $args->{parent_class};
+    delete $args->{parent_id};
+
+    my $plugin   = Jifty->find_plugin('Jifty::Plugin::Comment');
+    my $scrubber = $plugin->scrubber;
+
+    # Store safe fields
+    $args->{'title'}           = Jifty->web->escape($args->{'title'});
+    $args->{'your_name'}       = Jifty->web->escape($args->{'your_name'});
+    $args->{'web_site'}        = Jifty->web->escape($args->{'web_site'});
+    $args->{'email'}           = Jifty->web->escape($args->{'email'});
+    $args->{'body'}            = $scrubber->scrub($args->{'body'});
+
+    $args->{'created_on'}      = DateTime->now;
+
+    $args->{'ip_addr'}         = $ENV{'REMOTE_ADDR'};
+    $args->{'http_user_agent'} = $ENV{'HTTP_USER_AGENT'};
+    $args->{'http_referer'}    = $ENV{'HTTP_REFERER'};
+
+    # Prep for Akismet check or stop
+    my $akismet = $plugin->akismet or return 1;
+
+    # Check to see if it's classified as spam
+    my $verdict = $akismet->check(
+        USER_IP              => $args->{'ip_addr'},
+        USER_AGENT           => $args->{'http_user_agent'},
+        REFERER              => $args->{'http_referer'},
+        COMMENT_CONTENT      => $args->{'title'}."\n\n".$args->{'body'},
+        COMMENT_AUTHOR       => $args->{'your_name'},
+        COMMENT_AUTHOR_EMAIL => $args->{'email'},
+        COMMENT_AUTHOR_URL   => $args->{'web_site'},
+    );
+
+    # I have no idea what it is... mark it spam just in case...
+    # TODO the default no verdict action should configurable
+    if (!$verdict) {
+        $args->{published} = 0;
+        $args->{status}    = 'spam';
+
+        warn "Failed to determine whether new comment is spam or not.";
+        return 1;
+    }
+
+    # Naughty, naughty... mark as spam
+    if ($verdict eq 'true') {
+        warn "A new comment is detected as spam.";
+
+        $args->{published} = 0;
+        $args->{status}    = 'spam';
+
+        return 1;
+    }
+
+    # Excellent, post that ham
+    else {
+        $args->{published} = 1;
+        $args->{status}    = 'ham';
+
+        return 1;
+    }
+}
+
+=head2 before_set_status
+
+This trigger is called when changing the status of the message. If L<Net::Akismet> is in use, this trigger will notify Akismet that this message is being marked as spam or as ham, depending upon the new value.
+
+=cut
+
+sub before_set_status {
+    my $self = shift;
+    my $args = shift;
+
+    my $plugin  = Jifty->find_plugin('Jifty::Plugin::Comment');
+    my $akismet = $plugin->akismet or return 1;
+
+    my %akismet_report = (
+        USER_IP              => $self->ip_addr,
+        USER_AGENT           => $self->http_user_agent,
+        REFERER              => $self->http_referer,
+        COMMENT_CONTENT      => $self->title."\n\n".$self->body,
+        COMMENT_AUTHOR       => $self->your_name,
+        COMMENT_AUTHOR_EMAIL => $self->email,
+        COMMENT_AUTHOR_URL   => $self->web_site,
+    );
+
+    if ($self->status eq 'spam' && $args->{value} eq 'ham') {
+        if ($akismet->ham( %akismet_report )) {
+            Jifty->log->info("Reported that comment ".$self->id." is HAM to Akismet.");
+        }
+        else {
+            # Not the end of the world, just that Akismet doesn't know...
+            Jifty->log->info("FAILED to report that comment ".$self->id." is HAM to Akismet.");
+        }
+    }
+
+    elsif ($self->status eq 'ham' && $args->{value} eq 'spam') {
+        if ($akismet->spam( %akismet_report )) {
+            Jifty->log->info("Reported that comment ".$self->id." is SPAM to Akismet.");
+        }
+        else {
+            # Not the end of the world, just that Akismet doesn't know...
+            Jifty->log->info("FAILED to report that comment ".$self->id." is SPAM to Akismet.");
+        }
+    }
+
+    return 1;
+}
+
+=head2 current_user_can
+
+This method is not actually implemented by this class, but you will either want to implementt this method in your application or add a C<before_access> trigger that grants access. Otherwise, your comments won't be very interesting to anyone but a superuser.
+
+See the L</SYNOPSIS> for a recommended implementation.
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp C<< <hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2007 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;
+
+

Added: jifty/trunk/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,124 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment::Notification::CommentNeedsModeration;
+use base qw/ Jifty::Notification /;
+
+__PACKAGE__->mk_accessors(qw/ comment parent /);
+
+=head1 NAME
+
+Jifty::Plugin::Comment::Notification::CommentNeedsModeration - new comments made, but not published
+
+=head1 SYNOPSIS
+
+To activate this notification, you must override the notification in your application.
+
+  use strict;
+  use warnings;
+
+  package MyApp::Notification::CommentNeedsModeration;
+  use base qw/ Jifty::Plugin::Comment::Notification::CommentNeedsModeration /;
+
+  sub setup {
+      my $self = shift;
+
+      # Limit to users that have a "moderator" column set to 1
+      my $users = MyApp::Model::UserCollection->new;
+      $users->limit( column => 'moderator', value => 1 );
+      $self->to_list(@{ $users->items_array_ref });
+
+      $self->SUPER::setup(@_);
+  }
+
+  sub url {
+      my $self = shift;
+      return Jifty->config->framework('Web')->{'BaseURL'}
+          . $self->parent->permalink
+          . '#comment-'.$self->comment->id;
+  }
+
+  1;
+
+=head1 DESCRIPTION
+
+This notificaiton (when properly configured) is sent out to any who need to know when a comment has been created, but not published because L<Net::Akismet> has marked it as spam.
+
+=head1 METHODS
+
+=head2 setup
+
+This method sets up the notification. This method should be overridden to setup L<Jifty::Notification/to_list> to select who will receive this message. See the L</SYNOPSIS>.
+
+=cut
+
+sub setup {
+    my $self = shift;
+
+    my $appname = Jifty->config->framework('ApplicationName');
+    my $comment = $self->comment;
+
+    my $from = $comment->your_name || 'Anonymous Coward';
+    $from .= ' <'.$comment->email.'>' if $comment->email;
+    $from .= ' ('.$comment->web_site.')'      if $comment->web_site;
+
+    my $url = $self->url;
+
+    $self->subject(_("[%1] Moderate comment: %2", $appname, $comment->title));
+    $self->body(_(q{
+The following comment has not been published. If you would like to publish it, please visit the link below and click on the "publish" link. If it has been marked as spam and should not have been you should also click on the "mark as ham" link.
+
+View Comment: %1
+
+On Post: %2
+Subject: %3
+From: %4
+Date: %5
+
+%6
+}, 
+        $url, 
+        $self->parent->title,
+        $comment->title, 
+        $from, 
+        $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P'), 
+        $comment->body
+    ));
+}
+
+=head2 comment
+
+This will contain the L<Jifty::Plugin::Comment::Model::Comment> that has been published.
+
+=head2 parent
+
+This will contain the object that the comment has been attached to.
+
+=head2 url
+
+THis returns the URL that the message will link to. This should be overridden to provide application-specific URLs. The default implementation returns the BaseURL setting for the application.
+
+=cut
+
+sub url {
+    my $self = shift;
+    return Jifty->config->framework('Web')->{'BaseURL'};
+}
+
+=head1 SEE ALSO
+
+L<Jifty::Notification>, L<Jifty::Plugin::Comment::Notification::CommentPublished>
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp, C<< <hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2008 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,120 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment::Notification::CommentPublished;
+use base qw/ Jifty::Notification /;
+
+__PACKAGE__->mk_accessors(qw/ comment parent /);
+
+=head1 NAME
+
+Jifty::Plugin::Comment::Notification::CommentPublished - new comments made
+
+=head1 SYNOPSIS
+
+To activate this notification, you must override the notification in your application.
+
+  use strict;
+  use warnings;
+
+  package MyApp::Notification::CommentPublished;
+  use base qw/ Jifty::Plugin::Comment::Notification::CommentPublished /;
+
+  sub setup {
+      my $self = shift;
+
+      # Send to the author of the post
+      $self->to_list($self->parent->author);
+
+      $self->SUPER::setup(@_);
+  }
+
+  sub url {
+      my $self = shift;
+      return Jifty->config->framework('Web')->{'BaseURL'}
+          . $self->parent->permalink
+          . '#comment-'.$self->comment->id;
+  }
+
+  1;
+
+=head1 DESCRIPTION
+
+This notification (when properly configured) is sent out to any who need to know when a comment has been published.
+
+=head1 METHODS
+
+=head2 setup
+
+This method sets up the notification. This method should be overridden to setup L<Jifty::Notification/to_list> to select who will receive this message. See the L</SYNOPSIS>.
+
+=cut
+
+sub setup {
+    my $self = shift;
+
+    my $appname = Jifty->config->framework('ApplicationName');
+    my $comment = $self->comment;
+
+    my $from = $comment->your_name || 'Anonymous Coward';
+    $from .= ' <'.$comment->email.'>' if $comment->email;
+    $from .= ' ('.$comment->web_site.')'      if $comment->web_site;
+
+    my $url = $self->url;
+
+    $self->subject(_("[%1] New comment: %2", $appname, $comment->title));
+    $self->body(_("
+View Comment: %1
+
+On Post: %2
+Subject: %3
+From: %4
+Date: %5
+
+%6
+", 
+        $url,
+        $self->parent->title,
+        $comment->title, 
+        $from, 
+        $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P'), 
+        $comment->body
+    ));
+}
+
+=head2 comment
+
+This will contain the L<Jifty::Plugin::Comment::Model::Comment> that has been published.
+
+=head2 parent
+
+This will contain the object that the comment has been attached to.
+
+=head2 url
+
+This returns the URL that the message will link to. This should be overridden to provide application-specific URLs. The default implementation returns the BaseURL setting for the application.
+
+=cut
+
+sub url {
+    my $self = shift;
+    return Jifty->config->framework('Web')->{'BaseURL'};
+}
+
+=head1 SEE ALSO
+
+L<Jifty::Notification>, L<Jifty::Plugin::Comment::Notification::CommentNeedsModeration>
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp, C<< <hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2008 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Comment/View.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/View.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,339 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Comment::View;
+use Jifty::View::Declare -base;
+
+use Jifty::DateTime;
+
+=head1 NAME
+
+Jifty::Plugin::Comment::View - the templates for the comment plugin
+
+=head1 DESCRIPTION
+
+=head1 METHODS
+
+=head2 scrub_html
+
+This is a utility used internally for cleaning up the input which might come from a malicious source.
+
+=cut
+
+sub scrub_html($) {
+    my $text = shift;
+
+    my $plugin = Jifty->find_plugin('Jifty::Plugin::Comment');
+    return $plugin->scrubber->scrub($text);
+}
+
+=head1 TEMPLATES
+
+=head2 __comment/view
+
+This displays a single comment in a page.
+
+=cut
+
+template '__comment/view' => page {
+    my $comment = get 'comment';
+
+    { title is _( $comment->title ); }
+
+    div {
+        { class is 'column span-21 first' }
+
+        render_region
+            name => 'comment-'.$comment->id,
+            path => '/__comment/display',
+            defaults => {
+                id  => $comment->id,
+                top => 1,
+            },
+            ;
+    };
+
+    show '/advertisement';
+};
+
+=head2 __comment/display
+
+Display a comment in a page region.
+
+=cut
+
+template '__comment/display' => sub {
+    my $comment = get 'comment';
+    my $top     = get 'top';
+
+    my $plugin = Jifty->find_plugin('Jifty::Plugin::Comment');
+
+    div {
+        my $class = 'comment';
+        $class .= $comment->status eq 'ham' ? ' ham' : ' spam'
+            if Jifty->web->current_user->id;
+        $class .= $comment->published ? ' published' : ' unpublished';
+
+        { class is $class }
+
+        div {
+            { class is 'actions' }
+
+            if (Jifty->web->current_user->id) {
+
+                for my $status (qw( ham spam )) {
+                    if ($comment->status ne $status && $plugin->akismet) {
+                        hyperlink
+                            label => _('mark as %1', $status),
+                            onclick => {
+                                args  => {
+                                    update_status => $status,
+                                },
+                            },
+                            ;
+                    }
+                }
+
+                for my $published (0, 1) {
+                    if ($comment->published ne $published) {
+                        hyperlink
+                            label => $published ? _('publish') : _('unpublish'),
+                            onclick => {
+                                args  => {
+                                    update_published => $published,
+                                },
+                            },
+                            ;
+                    }
+                }
+            }
+
+            '';
+        };
+
+        unless ($top) {
+            if ($comment->status eq 'ham' && $comment->published) {
+                h5 { 
+                    a {
+                        attr { name => 'comment-'.$comment->id };
+                        $comment->title 
+                    };
+                };
+            };
+        };
+
+        div {
+            { class is 'comment-info' }
+
+            my $poster = $comment->your_name || 'Anonymous Coward';
+            $poster = Jifty->web->escape($poster);
+            $poster = qq{<a href="@{[$comment->web_site]}">$poster</a>}
+                if $comment->web_site;
+
+            my $created_on = $comment->created_on;
+
+            p { 
+                outs_raw _('By %1 %2', 
+                    $poster, 
+                    $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
+                ) 
+            };
+        };
+
+        if ($comment->status eq 'ham' && $comment->published) {
+            div {
+                outs_raw scrub_html($comment->body);
+            };
+        };
+
+    };
+};
+
+=head2 __comment/add
+
+This presents the form for adding a new comment.
+
+=cut
+
+template '__comment/add' => sub {
+    my $collapsed = get 'collapsed';
+    my $region    = get 'region';
+
+    if ($collapsed) {
+        p {
+            hyperlink
+                label => _('Add a comment'),
+                onclick => {
+                    refresh_self => 1,
+                    args => { collapsed => 0 },
+                },
+                ;
+        };
+    }
+
+    else {
+        my $action = get 'action';
+
+        if (get 'preview') {
+            div {
+                { class is 'preview comment' }
+
+                h5 { $action->argument_value('title') || 'No Title' };
+
+                div {
+                    { class is 'comment-info' }
+
+                    my $poster = $action->argument_value('your_name') 
+                              || 'Anonymous Coward';
+                    $poster = Jifty->web->escape($poster);
+                    $poster = qq{<a href="@{[$action->argument_value('web_site')]}">$poster</a>}
+                        if $action->argument_value('web_site');
+
+                    my $created_on = Jifty::DateTime->now;
+
+                    p { 
+                        outs_raw _('By %1 %2', 
+                            $poster, 
+                            $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
+                        ) 
+                    };
+                };
+
+                div {
+                    my $body = $action->argument_value('body')
+                            || 'No Body';
+
+                    outs_raw scrub_html($body);
+                };
+            };
+        };
+
+        div {
+            { class is 'edit comment' }
+
+            form {
+                render_action $action;
+
+                div {
+                    { class is 'submit-buttons' }
+
+                    form_submit
+                        label => _('Preview'),
+                        name => 'op',
+                        class => 'first',
+                        onclick => {
+                            refresh_self => 1,
+                            submit => { 
+                                action => $action, 
+                                arguments => { submit => 0 },
+                            },
+                            args => { preview => 1 },
+                        },
+                        ;
+
+                    if (get 'preview') {
+                        form_submit
+                            label => _('Submit'),
+                            onclick => [ 
+                                {
+                                    refresh_self => 1,
+                                    submit => {
+                                        action => $action,
+                                        arguments => { submit => 1 },
+                                    },
+                                    args => {
+                                        preview => 0,
+                                        collapsed => 1,
+                                    },
+                                },
+                                {
+                                    element => $region->parent->get_element('div.list'),
+                                    append  => '/__comment/display',
+                                    args    => {
+                                        id  => { result => $action, name => 'id' },
+                                        top => 0,
+                                    },
+                                },
+                            ],
+                            ;
+                    }
+                };
+            };
+        };
+    }
+};
+
+=head2 __comment/list
+
+This presents a list of comments attached to a particular comment and the form for adding one more.
+
+=cut
+
+template '__comment/list' => sub {
+    my $parent   = get 'parent';
+    my $title    = get 'initial_title';
+    my $comments = $parent->comments;
+
+    if (!Jifty->web->current_user->id) {
+        $comments->limit(
+            column => 'status',
+            value  => 'ham',
+        );
+    }
+
+    div {
+        { class is 'list' }
+
+        if ($comments->count) {
+            while (my $comment = $comments->next) {
+                render_region
+                    name => 'comment-'.$comment->id,
+                    path => '/__comment/display',
+                    defaults => {
+                        id  => $comment->id,
+                        top => 0,
+                    },
+                    ;
+            }
+        }
+
+        else {
+            p {
+                { class is 'none' }
+
+                _('No one has made a comment yet.');
+            };
+        }
+    };
+
+    unless (get 'no_add') {
+        render_region
+            name     => 'comment-add-'.$parent->id,
+            path     => '/__comment/add',
+            defaults => {
+                parent_class => ref $parent,
+                parent_id    => $parent->id,
+                collapsed    => 1,
+                title        => $title,
+            },
+            ;
+    }
+};
+
+=head1 SEE ALSO
+
+L<Jifty::View::Declare>
+
+=head1 AUTHOR
+
+Andrew Sterling Hanenkamp, C<< <hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2008 Boomer Consulting, Inc. All Rights Reserved.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
+1;

Modified: jifty/trunk/lib/Jifty/Plugin/I18N.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/I18N.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/I18N.pm	Tue Sep 16 03:33:21 2008
@@ -88,33 +88,20 @@
         }
     }
 
-    if (
-        open my $fh,
-        '<:encoding(utf-8)',
+    open my $fh, '<:encoding(utf-8)',
         Jifty::Util->absolute_path(
-            File::Spec->catdir(
-                Jifty->config->framework('Web')->{StaticRoot},
-                "js/dict/$current_lang.json"
-            )
-        )
-      )
-    {
-        local $/;
-        my $inline_dict = <$fh> || '{}';
+        File::Spec->catdir(
+            Jifty->config->framework('Web')->{StaticRoot},
+            "js/dict/$current_lang.json" ))
+        or Jifty->log->error("Can't find dictionary file $current_lang.json: $!");
 
-        # js l10n init
-        Jifty->web->out(
-            qq{<script type="text/javascript">
+    local $/;
+    my $inline_dict = <$fh> || '{}';
+    # js l10n init
+    Jifty->web->out(qq{<script type="text/javascript">
 Localization.dict_path = '/static/js/dict';
 Localization.dict = $inline_dict;
-</script>}
-        );
-
-    }
-    else {
-        Jifty->log->error("Can't find dictionary file $current_lang.json: $!");
-    }
-
+</script>});
 }
 
 1;

Modified: jifty/trunk/lib/Jifty/Script/Help.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Help.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/Help.pm	Tue Sep 16 03:33:21 2008
@@ -1,6 +1,6 @@
 package Jifty::Script::Help;
 use strict;
-use base qw( App::CLI::Command::Help Jifty::Script );
+use base qw( Jifty::Script::Help );
 use File::Find qw(find);
 
 sub help_base {

Modified: jifty/trunk/lib/Jifty/Subs/Render.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Subs/Render.pm	(original)
+++ jifty/trunk/lib/Jifty/Subs/Render.pm	Tue Sep 16 03:33:21 2008
@@ -56,6 +56,27 @@
             # XXX - We don't yet use $timestamp here.
             my ( $timestamp, $msg ) = @$rv;
 
+            for my $render_info (values %{$render->{$channel}}) {
+                if ($render_info->{coalesce} and $render_info->{mode} eq "Replace") {
+                    my $hash = Digest::MD5::md5_hex( YAML::Dump([$render_info->{region}, $render_info->{render_with}] ) );
+                    Jifty->log->debug("Coalesced duplicate region @{[$render_info->{region}]} with @{[$render_info->{render_with}]} from $channel event $msg") if exists $coalesce{$hash};
+                    $coalesce{$hash} = [ $timestamp, $event_class, $msg, $render_info ] unless $coalesce{$hash} and $coalesce{$hash}[0] > $timestamp;
+                } else {
+                    Jifty->log->debug("Rendering $channel event $msg in @{[$render_info->{region}]} with @{[$render_info->{render_with}]}");
+                    render_single( $event_class, $msg, $render_info, $callback );
+                    $sent++;
+                }
+            }
+        }
+    }
+
+    for my $c (values %coalesce) {
+        my (undef, $event_class, $msg, $render_info) = @{$c};
+        Jifty->log->debug("Rendering @{[$render_info->{region}]} with @{[$render_info->{render_with}]} for $event_class");
+        render_single( $event_class, $msg, $render_info, $callback );
+        $sent++;
+    }
+
     return ($sent);
 }
 
@@ -63,30 +84,33 @@
 
 Renders a single region, based on the region information in C<INFO>.
 
-            for my $render_info (values %{$render->{$channel}}) {
-                my $region      = Jifty::Web::PageRegion->new(
-                    name => $render_info->{region},
-                    path => $render_info->{render_with},
-                );
-                delete Jifty->web->{'regions'}{ $region->qualified_name };
-
-                # Finally render the region.  In addition to the user-supplied arguments
-                # in $render_info, we always pass the target $region and the event object
-                # into its %ARGS.
-                my $region_content = '';
-                my $event_object   = $event_class->new($msg);
-                $region->render_as_subrequest( \$region_content,
-                    {   %{ $render_info->{arguments} || {} },
-                        event => $event_object,
-                        $event_object->render_arguments,
-                    }
-                );
-                $callback->( $render_info->{mode}, $region->qualified_name, $region_content);
-                $sent++;
-            }
-        }
-    }
-    return ($sent);
+=cut
+
+sub render_single {
+    my ($class, $msg, $render_info, $callback) = @_;
+
+    my $region = Jifty::Web::PageRegion->new(
+        name => $render_info->{region},
+        path => $render_info->{render_with},
+    );
+    # So we don't warn about "duplicate region"s
+    delete Jifty->web->{'regions'}{ $region->qualified_name };
+
+    my $event_object   = $class->new($msg);
+    # Region's arguments come from explicit arguments only
+    $region->arguments( $render_info->{arguments} );
+
+    my $region_content = '';
+    $region->enter;
+    # Also provide an 'event' argument, and fill in the render
+    # arguments.  These don't show up in the region's arguments if
+    # inspected, but do show up in the request.
+    $region->render_as_subrequest(
+        \$region_content,
+        { %{$region->arguments}, event => $event_object, $event_object->render_arguments },
+    );
+    $callback->( $render_info->{mode}, $region->qualified_name, $region_content, $render_info->{attrs} );
+    $region->exit;
 }
 
 1;

Modified: jifty/trunk/plugins/Authentication-CAS/Makefile.PL
==============================================================================
--- jifty/trunk/plugins/Authentication-CAS/Makefile.PL	(original)
+++ jifty/trunk/plugins/Authentication-CAS/Makefile.PL	Tue Sep 16 03:33:21 2008
@@ -1,5 +1,5 @@
 use inc::Module::Install 0.46;
-name('Jifty-Plugin-Authentication-CAS');
+name('Authentication-CAS');
 #version_from('lib/Jifty/Plugin/Authentication/CAS.pm');
 version_from('../../lib/Jifty.pm');
 

Modified: jifty/trunk/share/po/en.po
==============================================================================
--- jifty/trunk/share/po/en.po	(original)
+++ jifty/trunk/share/po/en.po	Tue Sep 16 03:33:21 2008
@@ -15,7 +15,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
 #. ($url,        $self->parent->title,        $comment->title,         $from,         $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid ""
 "\n"
@@ -167,11 +167,7 @@
 msgid "A notification from %1!"
 msgstr ""
 
-#: plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm:61 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:1 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:2
-msgid "Access denied."
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:165
+#: lib/Jifty/Plugin/Comment/View.pm:165
 msgid "Add a comment"
 msgstr ""
 
@@ -207,12 +203,7 @@
 msgid "Bindings"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:22
-#. ($blog->author)
-msgid "By %1"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:138 plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:197
+#: lib/Jifty/Plugin/Comment/View.pm:138 lib/Jifty/Plugin/Comment/View.pm:197
 #. ($poster,                     $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 #. ($poster,                             $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid "By %1 %2"
@@ -272,7 +263,7 @@
 msgid "Edit"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:53 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
 msgid "Email"
 msgstr ""
 
@@ -308,7 +299,7 @@
 msgid "Go for it!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:69
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
 msgid "Hashed Password"
 msgstr ""
 
@@ -321,7 +312,7 @@
 msgid "Hello, %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147
 #. (Jifty->web->current_user->user_object->facebook_name)
 #. (Jifty->web->current_user->user_object->name)
 msgid "Hi %1!"
@@ -366,7 +357,7 @@
 msgid "Invalid OpenID URL.  Please check to make sure it is correct.  (@{[$csr->err]})"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:122 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:62 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
 msgid "It doesn't look like there's an account by that name."
 msgstr ""
 
@@ -398,7 +389,7 @@
 msgid "Loading..."
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132
 msgid "Login"
 msgstr ""
 
@@ -414,7 +405,7 @@
 msgid "Login with a password"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
 msgid "Login with your Ldap account"
 msgstr ""
 
@@ -422,11 +413,11 @@
 msgid "Login with your OpenID"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
 msgid "Login with your ldap account"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:57 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:22
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:22 lib/Jifty/Plugin/Authentication/Password/View.pm:57
 msgid "Login!"
 msgstr ""
 
@@ -466,7 +457,7 @@
 msgid "No items found."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:304
+#: lib/Jifty/Plugin/Comment/View.pm:304
 msgid "No one has made a comment yet."
 msgstr ""
 
@@ -507,7 +498,7 @@
 msgid "Parent"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:64 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60
 msgid "Password"
 msgstr ""
 
@@ -523,11 +514,7 @@
 msgid "Please email us!"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:13
-msgid "Post"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:221
+#: lib/Jifty/Plugin/Comment/View.pm:221
 msgid "Preview"
 msgstr ""
 
@@ -543,7 +530,7 @@
 msgid "Really, really sorry."
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:72
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
 msgid "Remember me?"
 msgstr ""
 
@@ -601,7 +588,7 @@
 msgid "Sorry about this."
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115
 msgid "Sorry, something weird happened (we couldn't create a user for you).  Try again later."
 msgstr ""
 
@@ -609,7 +596,7 @@
 msgid "Start"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:236
+#: lib/Jifty/Plugin/Comment/View.pm:236
 msgid "Submit"
 msgstr ""
 
@@ -627,7 +614,7 @@
 msgid "That doesn't look like a correct value"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
 msgid "That doesn't look like a valid login."
 msgstr ""
 
@@ -683,10 +670,6 @@
 msgid "Updated"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:44
-msgid "Username"
-msgstr ""
-
 #: share/web/templates/__jifty/halo:96
 msgid "Variables"
 msgstr ""
@@ -712,7 +695,7 @@
 msgid "Welcome back, "
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:258
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:194
 #. ($user->name)
 msgid "Welcome back, %1."
 msgstr ""
@@ -759,11 +742,11 @@
 msgid "You lost your password. A link to reset it will be sent to the following email address:"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:199
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:138
 msgid "You may have mistyped your email or password. Give it another shot."
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
 msgid "You may have mistyped your login or password. Give it another shot?"
 msgstr ""
 
@@ -780,7 +763,7 @@
 msgid "You said you wanted a pony. (Source %1)"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:96 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:45
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:45 lib/Jifty/Plugin/Authentication/Password/View.pm:96
 msgid "You're already logged in."
 msgstr ""
 
@@ -793,11 +776,11 @@
 msgid "Your account has been successfully linked to your Facebook user %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:73
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
 msgid "Your browser can remember your login for you"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
+#: lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
 msgid "Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."
 msgstr ""
 
@@ -809,12 +792,12 @@
 msgid "Your password should be at least six characters"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
+#: lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
 #. ($appname, $comment->title)
 msgid "[%1] Moderate comment: %2"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
 #. ($appname, $comment->title)
 msgid "[%1] New comment: %2"
 msgstr ""
@@ -827,7 +810,7 @@
 msgid "for now, and try to forget that we let you down."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:87
+#: lib/Jifty/Plugin/Comment/View.pm:87
 #. ($status)
 msgid "mark as %1"
 msgstr ""
@@ -836,7 +819,7 @@
 msgid "no value"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "publish"
 msgstr ""
 
@@ -852,7 +835,7 @@
 msgid "type your password again"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "unpublish"
 msgstr ""
 

Modified: jifty/trunk/share/po/fr.po
==============================================================================
--- jifty/trunk/share/po/fr.po	(original)
+++ jifty/trunk/share/po/fr.po	Tue Sep 16 03:33:21 2008
@@ -15,7 +15,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
 #. ($url,        $self->parent->title,        $comment->title,         $from,         $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid ""
 "\n"
@@ -195,11 +195,7 @@
 msgid "A notification from %1!"
 msgstr "Message de %1 !"
 
-#: plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm:61 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:1 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:2
-msgid "Access denied."
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:165
+#: lib/Jifty/Plugin/Comment/View.pm:165
 msgid "Add a comment"
 msgstr "Ajouter un commentaire"
 
@@ -243,12 +239,7 @@
 msgid "Bindings"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:22
-#. ($blog->author)
-msgid "By %1"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:138 plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:197
+#: lib/Jifty/Plugin/Comment/View.pm:138 lib/Jifty/Plugin/Comment/View.pm:197
 #. ($poster,                     $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 #. ($poster,                             $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid "By %1 %2"
@@ -324,7 +315,7 @@
 msgid "Edit %1"
 msgstr "Editer %1"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:53 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
 msgid "Email"
 msgstr "Mail"
 
@@ -360,7 +351,7 @@
 msgid "Go for it!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:69
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
 msgid "Hashed Password"
 msgstr "Mot de passe crypté"
 
@@ -373,7 +364,7 @@
 msgid "Hello, %1!"
 msgstr "Bonjour, %1"
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147
 #. (Jifty->web->current_user->user_object->facebook_name)
 #. (Jifty->web->current_user->user_object->name)
 msgid "Hi %1!"
@@ -418,7 +409,7 @@
 msgid "Invalid OpenID URL.  Please check to make sure it is correct.  (@{[$csr->err]})"
 msgstr "URL OpenID incorrecte. Vérifiez la. (@{[$csr->err]}) "
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:122 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:62 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
 msgid "It doesn't look like there's an account by that name."
 msgstr "Il ne semble pas y avoir de compte sous ce nom."
 
@@ -450,7 +441,7 @@
 msgid "Loading..."
 msgstr "Chargement..."
 
-#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132
 msgid "Login"
 msgstr "Identification"
 
@@ -466,7 +457,7 @@
 msgid "Login with a password"
 msgstr "S'identifier avec un mot de passe"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
 msgid "Login with your Ldap account"
 msgstr "S'identifier avec votre compte Ldap"
 
@@ -474,11 +465,11 @@
 msgid "Login with your OpenID"
 msgstr "S'identifier avec votre OpenID"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
 msgid "Login with your ldap account"
 msgstr "S'identifier avec votre compte Ldap"
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:57 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:22
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:22 lib/Jifty/Plugin/Authentication/Password/View.pm:57
 msgid "Login!"
 msgstr "Identification"
 
@@ -526,7 +517,7 @@
 msgid "No items found."
 msgstr "Aucun enregistrement."
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:304
+#: lib/Jifty/Plugin/Comment/View.pm:304
 msgid "No one has made a comment yet."
 msgstr "Aucun commentaire pour l'instant."
 
@@ -571,7 +562,7 @@
 msgid "Parent"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:64 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60
 msgid "Password"
 msgstr "Mot de passe"
 
@@ -587,11 +578,7 @@
 msgid "Please email us!"
 msgstr "Envoyez nous un mail !"
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:13
-msgid "Post"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:221
+#: lib/Jifty/Plugin/Comment/View.pm:221
 msgid "Preview"
 msgstr "Aperçu"
 
@@ -611,7 +598,7 @@
 msgid "Record created"
 msgstr "Enregistrement créé"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:72
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
 msgid "Remember me?"
 msgstr "S'en rappeler"
 
@@ -685,7 +672,7 @@
 msgid "Sorry about this."
 msgstr "Désolé."
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115
 msgid "Sorry, something weird happened (we couldn't create a user for you).  Try again later."
 msgstr "Désolé, un problème nous empêche de créer cet utilisateur. Ré-essayer plus tard."
 
@@ -693,7 +680,7 @@
 msgid "Start"
 msgstr "Démarrer"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:236
+#: lib/Jifty/Plugin/Comment/View.pm:236
 msgid "Submit"
 msgstr "Soumettre"
 
@@ -715,7 +702,7 @@
 msgid "That doesn't look like a correct value"
 msgstr "Valeur incorrecte"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
 msgid "That doesn't look like a valid login."
 msgstr "Ce compte ne semble pas valide."
 
@@ -779,10 +766,6 @@
 msgid "Updated"
 msgstr "Modification enregistrée"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:44
-msgid "Username"
-msgstr ""
-
 #: share/web/templates/__jifty/halo:96
 msgid "Variables"
 msgstr ""
@@ -808,7 +791,7 @@
 msgid "Welcome back, "
 msgstr "Re-bonjour, "
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:258
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:194
 #. ($user->name)
 msgid "Welcome back, %1."
 msgstr "Re-bonjour, %1."
@@ -867,11 +850,11 @@
 msgid "You may have mistyped your email address or password. Give it another shot."
 msgstr "Vous vous êtes trompé dans votre mail ou votre mot de passe. Ré-essayez."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:199
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:138
 msgid "You may have mistyped your email or password. Give it another shot."
 msgstr "Vous vous êtes trompé dans votre mail ou votre mot de passe. Ré-essayez."
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
 msgid "You may have mistyped your login or password. Give it another shot?"
 msgstr "Vous vous êtes trompé dans votre compte ou votre mot de passe. Ré-essayez."
 
@@ -888,7 +871,7 @@
 msgid "You said you wanted a pony. (Source %1)"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:96 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:45
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:45 lib/Jifty/Plugin/Authentication/Password/View.pm:96
 msgid "You're already logged in."
 msgstr "Vous êtes déjà connecté."
 
@@ -901,11 +884,11 @@
 msgid "Your account has been successfully linked to your Facebook user %1!"
 msgstr "Votre compte a bien été lié à votre compte Facebook %1"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:73
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
 msgid "Your browser can remember your login for you"
 msgstr "Votre navigateur peut mémoriser cette identification"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
+#: lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
 msgid "Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."
 msgstr "Votre commentaire a été ajouté. S'il n'apparaît pas immédiatement, c'est qu'il est en attente de modération."
 
@@ -917,12 +900,12 @@
 msgid "Your password should be at least six characters"
 msgstr "Votre mot de passe doit contenir au moins six caractères"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
+#: lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
 #. ($appname, $comment->title)
 msgid "[%1] Moderate comment: %2"
 msgstr "[%1] Commentaire modéré : %2"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
 #. ($appname, $comment->title)
 msgid "[%1] New comment: %2"
 msgstr "[%1] Nouveau commentaire : %2"
@@ -935,7 +918,7 @@
 msgid "for now, and try to forget that we let you down."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:87
+#: lib/Jifty/Plugin/Comment/View.pm:87
 #. ($status)
 msgid "mark as %1"
 msgstr "marqué comme %1"
@@ -944,7 +927,7 @@
 msgid "no value"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "publish"
 msgstr "publier"
 
@@ -960,7 +943,7 @@
 msgid "type your password again"
 msgstr "confirmez votre mot de passe"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "unpublish"
 msgstr "ne pas publier"
 

Modified: jifty/trunk/share/po/ja.po
==============================================================================
--- jifty/trunk/share/po/ja.po	(original)
+++ jifty/trunk/share/po/ja.po	Tue Sep 16 03:33:21 2008
@@ -838,7 +838,7 @@
 msgid "warning"
 msgstr "警告"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
 #. ($url,        $self->parent->title,        $comment->title,         $from,         $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid ""
 "\n"
@@ -990,11 +990,7 @@
 msgid "A notification from %1!"
 msgstr ""
 
-#: plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm:61 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:1 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:2
-msgid "Access denied."
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:165
+#: lib/Jifty/Plugin/Comment/View.pm:165
 msgid "Add a comment"
 msgstr ""
 
@@ -1030,12 +1026,7 @@
 msgid "Bindings"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:22
-#. ($blog->author)
-msgid "By %1"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:138 plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:197
+#: lib/Jifty/Plugin/Comment/View.pm:138 lib/Jifty/Plugin/Comment/View.pm:197
 #. ($poster,                     $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 #. ($poster,                             $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid "By %1 %2"
@@ -1095,7 +1086,7 @@
 msgid "Edit"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:53 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
 msgid "Email"
 msgstr ""
 
@@ -1131,7 +1122,7 @@
 msgid "Go for it!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:69
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
 msgid "Hashed Password"
 msgstr ""
 
@@ -1144,7 +1135,7 @@
 msgid "Hello, %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147
 #. (Jifty->web->current_user->user_object->facebook_name)
 #. (Jifty->web->current_user->user_object->name)
 msgid "Hi %1!"
@@ -1189,7 +1180,7 @@
 msgid "Invalid OpenID URL.  Please check to make sure it is correct.  (@{[$csr->err]})"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:122 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:62 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
 msgid "It doesn't look like there's an account by that name."
 msgstr ""
 
@@ -1221,7 +1212,7 @@
 msgid "Loading..."
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132
 msgid "Login"
 msgstr ""
 
@@ -1237,7 +1228,7 @@
 msgid "Login with a password"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
 msgid "Login with your Ldap account"
 msgstr ""
 
@@ -1245,11 +1236,11 @@
 msgid "Login with your OpenID"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
 msgid "Login with your ldap account"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:57 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:22
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:22 lib/Jifty/Plugin/Authentication/Password/View.pm:57
 msgid "Login!"
 msgstr ""
 
@@ -1289,7 +1280,7 @@
 msgid "No items found."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:304
+#: lib/Jifty/Plugin/Comment/View.pm:304
 msgid "No one has made a comment yet."
 msgstr ""
 
@@ -1330,7 +1321,7 @@
 msgid "Parent"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:64 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60
 msgid "Password"
 msgstr ""
 
@@ -1346,11 +1337,7 @@
 msgid "Please email us!"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:13
-msgid "Post"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:221
+#: lib/Jifty/Plugin/Comment/View.pm:221
 msgid "Preview"
 msgstr ""
 
@@ -1366,7 +1353,7 @@
 msgid "Really, really sorry."
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:72
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
 msgid "Remember me?"
 msgstr ""
 
@@ -1424,7 +1411,7 @@
 msgid "Sorry about this."
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115
 msgid "Sorry, something weird happened (we couldn't create a user for you).  Try again later."
 msgstr ""
 
@@ -1432,7 +1419,7 @@
 msgid "Start"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:236
+#: lib/Jifty/Plugin/Comment/View.pm:236
 msgid "Submit"
 msgstr ""
 
@@ -1450,7 +1437,7 @@
 msgid "That doesn't look like a correct value"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
 msgid "That doesn't look like a valid login."
 msgstr ""
 
@@ -1506,10 +1493,6 @@
 msgid "Updated"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:44
-msgid "Username"
-msgstr ""
-
 #: share/web/templates/__jifty/halo:96
 msgid "Variables"
 msgstr ""
@@ -1535,7 +1518,7 @@
 msgid "Welcome back, "
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:258
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:194
 #. ($user->name)
 msgid "Welcome back, %1."
 msgstr ""
@@ -1582,11 +1565,11 @@
 msgid "You lost your password. A link to reset it will be sent to the following email address:"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:199
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:138
 msgid "You may have mistyped your email or password. Give it another shot."
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
 msgid "You may have mistyped your login or password. Give it another shot?"
 msgstr ""
 
@@ -1603,7 +1586,7 @@
 msgid "You said you wanted a pony. (Source %1)"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:96 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:45
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:45 lib/Jifty/Plugin/Authentication/Password/View.pm:96
 msgid "You're already logged in."
 msgstr ""
 
@@ -1616,11 +1599,11 @@
 msgid "Your account has been successfully linked to your Facebook user %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:73
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
 msgid "Your browser can remember your login for you"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
+#: lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
 msgid "Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."
 msgstr ""
 
@@ -1632,12 +1615,12 @@
 msgid "Your password should be at least six characters"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
+#: lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
 #. ($appname, $comment->title)
 msgid "[%1] Moderate comment: %2"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
 #. ($appname, $comment->title)
 msgid "[%1] New comment: %2"
 msgstr ""
@@ -1650,7 +1633,7 @@
 msgid "for now, and try to forget that we let you down."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:87
+#: lib/Jifty/Plugin/Comment/View.pm:87
 #. ($status)
 msgid "mark as %1"
 msgstr ""
@@ -1659,7 +1642,7 @@
 msgid "no value"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "publish"
 msgstr ""
 
@@ -1675,7 +1658,7 @@
 msgid "type your password again"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "unpublish"
 msgstr ""
 

Modified: jifty/trunk/share/po/ro.po
==============================================================================
--- jifty/trunk/share/po/ro.po	(original)
+++ jifty/trunk/share/po/ro.po	Tue Sep 16 03:33:21 2008
@@ -15,7 +15,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
 #. ($url,        $self->parent->title,        $comment->title,         $from,         $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid ""
 "\n"
@@ -167,11 +167,7 @@
 msgid "A notification from %1!"
 msgstr "O notificare de la %1!"
 
-#: plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm:61 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:1 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:2
-msgid "Access denied."
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:165
+#: lib/Jifty/Plugin/Comment/View.pm:165
 msgid "Add a comment"
 msgstr "Adaugă un comentariu"
 
@@ -207,19 +203,14 @@
 msgid "Bindings"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:22
-#. ($blog->author)
-msgid "By %1"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:138 plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:197
+#: lib/Jifty/Plugin/Comment/View.pm:138 lib/Jifty/Plugin/Comment/View.pm:197
 #. ($poster,                     $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 #. ($poster,                             $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid "By %1 %2"
 msgstr "De %1 %2"
 
 #: share/web/templates/helpers/calendar.html:4
-#. (_ &><body class="calpopup"><a href="#" onclick="window.close()
+#. (_ &><body class="calpopup"><a href="#" DEFANGED_Onclick="window.close()
 msgid "Calendar"
 msgstr "Calendar"
 
@@ -272,7 +263,7 @@
 msgid "Edit"
 msgstr "Modifică"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:53 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
 msgid "Email"
 msgstr ""
 
@@ -308,7 +299,7 @@
 msgid "Go for it!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:69
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
 msgid "Hashed Password"
 msgstr "Parolă criptată"
 
@@ -321,7 +312,7 @@
 msgid "Hello, %1!"
 msgstr "Bună ziua"
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147
 #. (Jifty->web->current_user->user_object->facebook_name)
 #. (Jifty->web->current_user->user_object->name)
 msgid "Hi %1!"
@@ -366,7 +357,7 @@
 msgid "Invalid OpenID URL.  Please check to make sure it is correct.  (@{[$csr->err]})"
 msgstr "URL OpenID invalid. Verificaţi daca este corect.  (@{[$csr->err]})"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:122 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:62 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
 msgid "It doesn't look like there's an account by that name."
 msgstr "Acest cont pare a fi utilizat deja."
 
@@ -398,7 +389,7 @@
 msgid "Loading..."
 msgstr "Se incarcă"
 
-#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132
 msgid "Login"
 msgstr "Identificare"
 
@@ -414,7 +405,7 @@
 msgid "Login with a password"
 msgstr "Indentificare cu o parolă"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
 msgid "Login with your Ldap account"
 msgstr "Identificare cu un cont Ldap"
 
@@ -422,11 +413,11 @@
 msgid "Login with your OpenID"
 msgstr "Indeitificare cu OpenID"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
 msgid "Login with your ldap account"
 msgstr "Identificare cu un cont Ldap"
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:57 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:22
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:22 lib/Jifty/Plugin/Authentication/Password/View.pm:57
 msgid "Login!"
 msgstr "Identificare!"
 
@@ -466,7 +457,7 @@
 msgid "No items found."
 msgstr "Nicio înregistrare găsită."
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:304
+#: lib/Jifty/Plugin/Comment/View.pm:304
 msgid "No one has made a comment yet."
 msgstr "Niciun comentariu deocamdată."
 
@@ -507,7 +498,7 @@
 msgid "Parent"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:64 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60
 msgid "Password"
 msgstr "Parola"
 
@@ -523,11 +514,7 @@
 msgid "Please email us!"
 msgstr "Contactaţi-ne prin email, vă rugăm!"
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:13
-msgid "Post"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:221
+#: lib/Jifty/Plugin/Comment/View.pm:221
 msgid "Preview"
 msgstr "Previzualizare"
 
@@ -543,7 +530,7 @@
 msgid "Really, really sorry."
 msgstr "Regretăm."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:72
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
 msgid "Remember me?"
 msgstr "Memorează?"
 
@@ -601,7 +588,7 @@
 msgid "Sorry about this."
 msgstr "Ne cerem scuze."
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115
 msgid "Sorry, something weird happened (we couldn't create a user for you).  Try again later."
 msgstr "Scuze, datorită unei probleme, nu va pute; crea contul. Încercaţi mai târziu."
 
@@ -609,7 +596,7 @@
 msgid "Start"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:236
+#: lib/Jifty/Plugin/Comment/View.pm:236
 msgid "Submit"
 msgstr "Trimite"
 
@@ -627,7 +614,7 @@
 msgid "That doesn't look like a correct value"
 msgstr "Această valoare nu pare a fi corectă"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
 msgid "That doesn't look like a valid login."
 msgstr "Acest login nu pare a fi valid."
 
@@ -683,10 +670,6 @@
 msgid "Updated"
 msgstr "Modificare inregistrată"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:44
-msgid "Username"
-msgstr ""
-
 #: share/web/templates/__jifty/halo:96
 msgid "Variables"
 msgstr "Variabile"
@@ -712,7 +695,7 @@
 msgid "Welcome back, "
 msgstr "Bine aţi revenit"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:258
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:194
 #. ($user->name)
 msgid "Welcome back, %1."
 msgstr "Bine aţi revenit"
@@ -759,11 +742,11 @@
 msgid "You lost your password. A link to reset it will be sent to the following email address:"
 msgstr "Aţi pierdut parola. Un link pentru modificarea parolei va fi trans;is la adresa email următoare:"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:199
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:138
 msgid "You may have mistyped your email or password. Give it another shot."
 msgstr "Aţi greşit adresa email sau parola. Re-încercaţi."
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
 msgid "You may have mistyped your login or password. Give it another shot?"
 msgstr "Aţi greşit adresa email sau parola. Re-încercaţi?"
 
@@ -780,7 +763,7 @@
 msgid "You said you wanted a pony. (Source %1)"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:96 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:45
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:45 lib/Jifty/Plugin/Authentication/Password/View.pm:96
 msgid "You're already logged in."
 msgstr "Sunteţi deja conectat"
 
@@ -793,11 +776,11 @@
 msgid "Your account has been successfully linked to your Facebook user %1!"
 msgstr "Contul dvs. a fost asociat cu contul dvs. Facebook  %1!"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:73
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
 msgid "Your browser can remember your login for you"
 msgstr "Navigatorul dvs. vă poate memora loginul pentru o conectare ulterioară"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
+#: lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
 msgid "Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."
 msgstr "Co;entariul dvs. a fost adăugat. Dacă nu apare imediat, este in aşteptare de moderare si va apărea curând."
 
@@ -809,12 +792,12 @@
 msgid "Your password should be at least six characters"
 msgstr "Parola trebuie sa conţină şase caractere"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
+#: lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
 #. ($appname, $comment->title)
 msgid "[%1] Moderate comment: %2"
 msgstr "[%1] Comentariu moderat: %2"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
 #. ($appname, $comment->title)
 msgid "[%1] New comment: %2"
 msgstr "Nou omentariut: %2"
@@ -827,7 +810,7 @@
 msgid "for now, and try to forget that we let you down."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:87
+#: lib/Jifty/Plugin/Comment/View.pm:87
 #. ($status)
 msgid "mark as %1"
 msgstr ""
@@ -836,7 +819,7 @@
 msgid "no value"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "publish"
 msgstr "publicaţi"
 
@@ -852,7 +835,7 @@
 msgid "type your password again"
 msgstr "re-scrieţi parola"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "unpublish"
 msgstr "nu publicaţi"
 

Modified: jifty/trunk/share/po/ru.po
==============================================================================
--- jifty/trunk/share/po/ru.po	(original)
+++ jifty/trunk/share/po/ru.po	Tue Sep 16 03:33:21 2008
@@ -14,7 +14,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
 #. ($url,        $self->parent->title,        $comment->title,         $from,         $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid ""
 "\n"
@@ -166,11 +166,7 @@
 msgid "A notification from %1!"
 msgstr "Уведомление от %1!"
 
-#: plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm:61 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:1 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:2
-msgid "Access denied."
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:165
+#: lib/Jifty/Plugin/Comment/View.pm:165
 msgid "Add a comment"
 msgstr ""
 
@@ -206,12 +202,7 @@
 msgid "Bindings"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:22
-#. ($blog->author)
-msgid "By %1"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:138 plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:197
+#: lib/Jifty/Plugin/Comment/View.pm:138 lib/Jifty/Plugin/Comment/View.pm:197
 #. ($poster,                     $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 #. ($poster,                             $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid "By %1 %2"
@@ -275,7 +266,7 @@
 msgid "Edit %1"
 msgstr "Изменить %1"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:53 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
 msgid "Email"
 msgstr "Почта"
 
@@ -311,7 +302,7 @@
 msgid "Go for it!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:69
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
 msgid "Hashed Password"
 msgstr ""
 
@@ -324,7 +315,7 @@
 msgid "Hello, %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147
 #. (Jifty->web->current_user->user_object->facebook_name)
 #. (Jifty->web->current_user->user_object->name)
 msgid "Hi %1!"
@@ -369,7 +360,7 @@
 msgid "Invalid OpenID URL.  Please check to make sure it is correct.  (@{[$csr->err]})"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:122 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:62 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
 msgid "It doesn't look like there's an account by that name."
 msgstr "Кажется в системе нет пользователя с таким именем."
 
@@ -401,7 +392,7 @@
 msgid "Loading..."
 msgstr "Загрузка..."
 
-#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132
 msgid "Login"
 msgstr "Вход"
 
@@ -417,7 +408,7 @@
 msgid "Login with a password"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
 msgid "Login with your Ldap account"
 msgstr ""
 
@@ -425,11 +416,11 @@
 msgid "Login with your OpenID"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
 msgid "Login with your ldap account"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:57 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:22
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:22 lib/Jifty/Plugin/Authentication/Password/View.pm:57
 msgid "Login!"
 msgstr ""
 
@@ -469,7 +460,7 @@
 msgid "No items found."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:304
+#: lib/Jifty/Plugin/Comment/View.pm:304
 msgid "No one has made a comment yet."
 msgstr ""
 
@@ -510,7 +501,7 @@
 msgid "Parent"
 msgstr "Родитель"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:64 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60
 msgid "Password"
 msgstr "Пароль"
 
@@ -526,11 +517,7 @@
 msgid "Please email us!"
 msgstr ""
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:13
-msgid "Post"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:221
+#: lib/Jifty/Plugin/Comment/View.pm:221
 msgid "Preview"
 msgstr ""
 
@@ -546,7 +533,7 @@
 msgid "Really, really sorry."
 msgstr "Очень сожалеем."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:72
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
 msgid "Remember me?"
 msgstr "Запомнить?"
 
@@ -612,7 +599,7 @@
 msgid "Sorry about this."
 msgstr "Сожалеем об этом."
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115
 msgid "Sorry, something weird happened (we couldn't create a user for you).  Try again later."
 msgstr ""
 
@@ -620,7 +607,7 @@
 msgid "Start"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:236
+#: lib/Jifty/Plugin/Comment/View.pm:236
 msgid "Submit"
 msgstr ""
 
@@ -638,7 +625,7 @@
 msgid "That doesn't look like a correct value"
 msgstr "Не похоже на допустимое значение"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
 msgid "That doesn't look like a valid login."
 msgstr ""
 
@@ -694,10 +681,6 @@
 msgid "Updated"
 msgstr "Обновленно"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:44
-msgid "Username"
-msgstr ""
-
 #: share/web/templates/__jifty/halo:96
 msgid "Variables"
 msgstr "Переменные"
@@ -723,7 +706,7 @@
 msgid "Welcome back, "
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:258
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:194
 #. ($user->name)
 msgid "Welcome back, %1."
 msgstr "Рады вас видеть снова, %1."
@@ -774,11 +757,11 @@
 msgid "You lost your password. A reminder will be send to the following mail:"
 msgstr "Вы забыли пароль. Напоминание будет отправлено на адрес: %1"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:199
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:138
 msgid "You may have mistyped your email or password. Give it another shot."
 msgstr "Должно быть вы ввели неправильно адрес или пароль. Попробуйте еще разок."
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
 msgid "You may have mistyped your login or password. Give it another shot?"
 msgstr ""
 
@@ -795,7 +778,7 @@
 msgid "You said you wanted a pony. (Source %1)"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:96 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:45
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:45 lib/Jifty/Plugin/Authentication/Password/View.pm:96
 msgid "You're already logged in."
 msgstr "Вы уже вошли."
 
@@ -808,11 +791,11 @@
 msgid "Your account has been successfully linked to your Facebook user %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:73
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
 msgid "Your browser can remember your login for you"
 msgstr "Ваш браузер может запомнить ваш логин за вас"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
+#: lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
 msgid "Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."
 msgstr ""
 
@@ -824,12 +807,12 @@
 msgid "Your password should be at least six characters"
 msgstr "Ваш пароль должен состоять из шести исмволов минимум"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
+#: lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
 #. ($appname, $comment->title)
 msgid "[%1] Moderate comment: %2"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
 #. ($appname, $comment->title)
 msgid "[%1] New comment: %2"
 msgstr ""
@@ -842,7 +825,7 @@
 msgid "for now, and try to forget that we let you down."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:87
+#: lib/Jifty/Plugin/Comment/View.pm:87
 #. ($status)
 msgid "mark as %1"
 msgstr ""
@@ -851,7 +834,7 @@
 msgid "no value"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "publish"
 msgstr ""
 
@@ -867,7 +850,7 @@
 msgid "type your password again"
 msgstr "введите ваг пароль снова"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "unpublish"
 msgstr ""
 

Modified: jifty/trunk/share/po/zh_cn.po
==============================================================================
--- jifty/trunk/share/po/zh_cn.po	(original)
+++ jifty/trunk/share/po/zh_cn.po	Tue Sep 16 03:33:21 2008
@@ -14,7 +14,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
 #. ($url,        $self->parent->title,        $comment->title,         $from,         $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid ""
 "\n"
@@ -184,15 +184,11 @@
 msgid "A notification from %1!"
 msgstr "从 %1 送来的消息!"
 
-#: plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm:61 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:1 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:2
-msgid "Access denied."
-msgstr ""
-
 #:
 msgid "Actions"
 msgstr "操作"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:165
+#: lib/Jifty/Plugin/Comment/View.pm:165
 msgid "Add a comment"
 msgstr ""
 
@@ -236,12 +232,7 @@
 msgid "Bindings"
 msgstr "快捷键"
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:22
-#. ($blog->author)
-msgid "By %1"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:138 plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:197
+#: lib/Jifty/Plugin/Comment/View.pm:138 lib/Jifty/Plugin/Comment/View.pm:197
 #. ($poster,                     $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 #. ($poster,                             $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid "By %1 %2"
@@ -321,7 +312,7 @@
 msgid "Edit %1"
 msgstr "编辑 %1"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:53 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
 msgid "Email"
 msgstr "电子邮箱"
 
@@ -357,7 +348,7 @@
 msgid "Go for it!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:69
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
 msgid "Hashed Password"
 msgstr ""
 
@@ -370,7 +361,7 @@
 msgid "Hello, %1!"
 msgstr "%1, 您好!"
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147
 #. (Jifty->web->current_user->user_object->facebook_name)
 #. (Jifty->web->current_user->user_object->name)
 msgid "Hi %1!"
@@ -415,7 +406,7 @@
 msgid "Invalid OpenID URL.  Please check to make sure it is correct.  (@{[$csr->err]})"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:122 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:62 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
 msgid "It doesn't look like there's an account by that name."
 msgstr "该账号不存在."
 
@@ -459,7 +450,7 @@
 msgid "Loading..."
 msgstr "正在加载..."
 
-#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132
 msgid "Login"
 msgstr "登录"
 
@@ -475,7 +466,7 @@
 msgid "Login with a password"
 msgstr "使用密码登录"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
 msgid "Login with your Ldap account"
 msgstr ""
 
@@ -483,11 +474,11 @@
 msgid "Login with your OpenID"
 msgstr ""
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
 msgid "Login with your ldap account"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:57 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:22
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:22 lib/Jifty/Plugin/Authentication/Password/View.pm:57
 msgid "Login!"
 msgstr "登录!"
 
@@ -547,7 +538,7 @@
 msgid "No items found."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:304
+#: lib/Jifty/Plugin/Comment/View.pm:304
 msgid "No one has made a comment yet."
 msgstr ""
 
@@ -592,7 +583,7 @@
 msgid "Parent"
 msgstr "父组件"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:64 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60
 msgid "Password"
 msgstr "密码"
 
@@ -608,11 +599,7 @@
 msgid "Please email us!"
 msgstr "请给我们发邮件!"
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:13
-msgid "Post"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:221
+#: lib/Jifty/Plugin/Comment/View.pm:221
 msgid "Preview"
 msgstr ""
 
@@ -632,7 +619,7 @@
 msgid "Record created"
 msgstr "成功建立记录."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:72
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
 msgid "Remember me?"
 msgstr "记住我?"
 
@@ -710,7 +697,7 @@
 msgid "Sorry about this."
 msgstr "非常抱歉"
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115
 msgid "Sorry, something weird happened (we couldn't create a user for you).  Try again later."
 msgstr ""
 
@@ -718,7 +705,7 @@
 msgid "Start"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:236
+#: lib/Jifty/Plugin/Comment/View.pm:236
 msgid "Submit"
 msgstr ""
 
@@ -740,7 +727,7 @@
 msgid "That doesn't look like a correct value"
 msgstr "字段格式错误."
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
 msgid "That doesn't look like a valid login."
 msgstr ""
 
@@ -804,10 +791,6 @@
 msgid "Updated"
 msgstr "成功更新项目."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:44
-msgid "Username"
-msgstr ""
-
 #: share/web/templates/__jifty/halo:96
 msgid "Variables"
 msgstr "变项"
@@ -833,7 +816,7 @@
 msgid "Welcome back, "
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:258
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:194
 #. ($user->name)
 msgid "Welcome back, %1."
 msgstr "欢迎回来, %1."
@@ -892,11 +875,11 @@
 msgid "You may have mistyped your email address or password. Give it another shot."
 msgstr "您或许输错了电子邮箱或密码,请重试."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:199
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:138
 msgid "You may have mistyped your email or password. Give it another shot."
 msgstr "您或许输错了电子邮箱或密码,请重试."
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
 msgid "You may have mistyped your login or password. Give it another shot?"
 msgstr ""
 
@@ -913,7 +896,7 @@
 msgid "You said you wanted a pony. (Source %1)"
 msgstr "您不正想要一匹小马吗? (参见 %1)"
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:96 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:45
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:45 lib/Jifty/Plugin/Authentication/Password/View.pm:96
 msgid "You're already logged in."
 msgstr "您已经登录了."
 
@@ -926,11 +909,11 @@
 msgid "Your account has been successfully linked to your Facebook user %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:73
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
 msgid "Your browser can remember your login for you"
 msgstr "下次开启浏览器时, 是否保持登录状态?"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
+#: lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
 msgid "Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."
 msgstr ""
 
@@ -942,12 +925,12 @@
 msgid "Your password should be at least six characters"
 msgstr "密码长度至少为6位"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
+#: lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
 #. ($appname, $comment->title)
 msgid "[%1] Moderate comment: %2"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
 #. ($appname, $comment->title)
 msgid "[%1] New comment: %2"
 msgstr ""
@@ -968,7 +951,7 @@
 msgid "for now, and try to forget that we let you down."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:87
+#: lib/Jifty/Plugin/Comment/View.pm:87
 #. ($status)
 msgid "mark as %1"
 msgstr ""
@@ -977,7 +960,7 @@
 msgid "no value"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "publish"
 msgstr ""
 
@@ -993,7 +976,7 @@
 msgid "type your password again"
 msgstr "重新输入密码"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "unpublish"
 msgstr ""
 

Modified: jifty/trunk/share/po/zh_tw.po
==============================================================================
--- jifty/trunk/share/po/zh_tw.po	(original)
+++ jifty/trunk/share/po/zh_tw.po	Tue Sep 16 03:33:21 2008
@@ -14,7 +14,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:71
 #. ($url,        $self->parent->title,        $comment->title,         $from,         $comment->created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid ""
 "\n"
@@ -184,15 +184,11 @@
 msgid "A notification from %1!"
 msgstr "%1 捎來的訊息!"
 
-#: plugins/AuthzLDAP/lib/Jifty/Plugin/AuthzLDAP/Action/LDAPValidate.pm:61 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:1 plugins/AuthzLDAP/share/web/templates/error/AccessDenied:2
-msgid "Access denied."
-msgstr ""
-
 #:
 msgid "Actions"
 msgstr "操作"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:165
+#: lib/Jifty/Plugin/Comment/View.pm:165
 msgid "Add a comment"
 msgstr "發表迴響"
 
@@ -236,12 +232,7 @@
 msgid "Bindings"
 msgstr "快速鍵"
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:22
-#. ($blog->author)
-msgid "By %1"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:138 plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:197
+#: lib/Jifty/Plugin/Comment/View.pm:138 lib/Jifty/Plugin/Comment/View.pm:197
 #. ($poster,                     $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 #. ($poster,                             $created_on->strftime('%A, %B %d, %Y @ %H:%M%P')
 msgid "By %1 %2"
@@ -321,7 +312,7 @@
 msgid "Edit %1"
 msgstr "編輯 %1"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:53 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:23 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:32
 msgid "Email"
 msgstr "電郵"
 
@@ -361,7 +352,7 @@
 msgid "Go for it!"
 msgstr "去吧!"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:69
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:34
 msgid "Hashed Password"
 msgstr ""
 
@@ -374,7 +365,7 @@
 msgid "Hello, %1!"
 msgstr "%1 您好!"
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:147 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:103 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:137
 #. (Jifty->web->current_user->user_object->facebook_name)
 #. (Jifty->web->current_user->user_object->name)
 msgid "Hi %1!"
@@ -419,7 +410,7 @@
 msgid "Invalid OpenID URL.  Please check to make sure it is correct.  (@{[$csr->err]})"
 msgstr "不正確的 OpenID 網址. (@{[$csr->err]})"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:122 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:62 lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:75 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:79
 msgid "It doesn't look like there's an account by that name."
 msgstr "沒有這個帳號."
 
@@ -463,7 +454,7 @@
 msgid "Loading..."
 msgstr "請稍候..."
 
-#: lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:23 lib/Jifty/Plugin/Authentication/Password/Dispatcher.pm:132
 msgid "Login"
 msgstr "登入"
 
@@ -479,7 +470,7 @@
 msgid "Login with a password"
 msgstr "使用密碼登入"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:28
 msgid "Login with your Ldap account"
 msgstr ""
 
@@ -487,11 +478,11 @@
 msgid "Login with your OpenID"
 msgstr "以您的 OpenID 登入"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:35
 msgid "Login with your ldap account"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:57 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:22
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:22 lib/Jifty/Plugin/Authentication/Password/View.pm:57
 msgid "Login!"
 msgstr "登入!"
 
@@ -547,7 +538,7 @@
 msgid "No items found."
 msgstr "未找到記錄"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:304
+#: lib/Jifty/Plugin/Comment/View.pm:304
 msgid "No one has made a comment yet."
 msgstr "尚無人發表評論"
 
@@ -592,7 +583,7 @@
 msgid "Parent"
 msgstr "上層元件"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:64 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:28 lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:29 lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm:32 lib/Jifty/Plugin/Authentication/Password/Mixin/Model/User.pm:60
 msgid "Password"
 msgstr "密碼"
 
@@ -608,11 +599,7 @@
 msgid "Please email us!"
 msgstr "請寫信通知我們!"
 
-#: plugins/Comment/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm:13
-msgid "Post"
-msgstr ""
-
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:221
+#: lib/Jifty/Plugin/Comment/View.pm:221
 msgid "Preview"
 msgstr "預覽"
 
@@ -632,7 +619,7 @@
 msgid "Record created"
 msgstr "成功建立項目."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:72
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:37
 msgid "Remember me?"
 msgstr "記住我?"
 
@@ -710,7 +697,7 @@
 msgid "Sorry about this."
 msgstr "非常抱歉."
 
-#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:115 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
+#: lib/Jifty/Plugin/Authentication/Facebook/Action/LoginFacebookUser.pm:62 lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:107
 msgid "Sorry, something weird happened (we couldn't create a user for you).  Try again later."
 msgstr "不好意思,發生了奇怪的事(我們無法替您建立帳號)。請稍候再試。"
 
@@ -718,7 +705,7 @@
 msgid "Start"
 msgstr "開始"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:236
+#: lib/Jifty/Plugin/Comment/View.pm:236
 msgid "Submit"
 msgstr "送出"
 
@@ -740,14 +727,10 @@
 msgid "That doesn't look like a correct value"
 msgstr "欄位格式錯誤."
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:46
 msgid "That doesn't look like a valid login."
 msgstr "看起來不像是有個有效的登入帳號"
 
-#: plugins/Authentication-CAS/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm:47
-msgid "That doesn't look like a valid ticket."
-msgstr ""
-
 #: lib/Jifty/Plugin/Authentication/Password/Action/SendAccountConfirmation.pm:68 lib/Jifty/Plugin/Authentication/Password/Action/SendPasswordReminder.pm:72 lib/Jifty/Plugin/Authentication/Password/Action/Signup.pm:70
 msgid "That doesn't look like an email address."
 msgstr "看起來不像是電子郵件地址"
@@ -804,10 +787,6 @@
 msgid "Updated"
 msgstr "成功更新項目."
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:44
-msgid "Username"
-msgstr ""
-
 #: share/web/templates/__jifty/halo:96
 msgid "Variables"
 msgstr "變數"
@@ -833,7 +812,7 @@
 msgid "Welcome back, "
 msgstr "歡迎回來,"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:258
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:194
 #. ($user->name)
 msgid "Welcome back, %1."
 msgstr "歡迎回來, %1."
@@ -888,11 +867,11 @@
 msgid "You lost your password. A reminder will be send to the following mail:"
 msgstr "您忘記密碼了.我們會寄送一份提示到下面的電郵地址:"
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:199
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:138
 msgid "You may have mistyped your email or password. Give it another shot."
 msgstr "你可能打錯了電郵或密碼.請再試一次"
 
-#: plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
+#: lib/Jifty/Plugin/Authentication/Ldap/Action/LDAPLogin.pm:77
 msgid "You may have mistyped your login or password. Give it another shot?"
 msgstr ""
 
@@ -909,7 +888,7 @@
 msgid "You said you wanted a pony. (Source %1)"
 msgstr "您可不正是想要一匹小馬嗎? (參見 %1)"
 
-#: lib/Jifty/Plugin/Authentication/Password/View.pm:96 plugins/Authentication-Ldap/lib/Jifty/Plugin/Authentication/Ldap/View.pm:45
+#: lib/Jifty/Plugin/Authentication/Ldap/View.pm:45 lib/Jifty/Plugin/Authentication/Password/View.pm:96
 msgid "You're already logged in."
 msgstr "您已經登入了."
 
@@ -922,11 +901,11 @@
 msgid "Your account has been successfully linked to your Facebook user %1!"
 msgstr ""
 
-#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:73
+#: lib/Jifty/Plugin/Authentication/Password/Action/Login.pm:38
 msgid "Your browser can remember your login for you"
 msgstr "下次開啟瀏覽器時, 是否保留您的登入狀態?"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
+#: lib/Jifty/Plugin/Comment/Action/CreateComment.pm:268
 msgid "Your comment has been added. If it does not immediately appear, it may have been flagged for moderation and should appear shortly."
 msgstr ""
 
@@ -938,12 +917,12 @@
 msgid "Your password should be at least six characters"
 msgstr "您的密碼必須至少有六個字"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
+#: lib/Jifty/Plugin/Comment/Notification/CommentNeedsModeration.pm:67
 #. ($appname, $comment->title)
 msgid "[%1] Moderate comment: %2"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
+#: lib/Jifty/Plugin/Comment/Notification/CommentPublished.pm:65
 #. ($appname, $comment->title)
 msgid "[%1] New comment: %2"
 msgstr ""
@@ -964,7 +943,7 @@
 msgid "for now, and try to forget that we let you down."
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:87
+#: lib/Jifty/Plugin/Comment/View.pm:87
 #. ($status)
 msgid "mark as %1"
 msgstr ""
@@ -973,7 +952,7 @@
 msgid "no value"
 msgstr ""
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "publish"
 msgstr ""
 
@@ -989,7 +968,7 @@
 msgid "type your password again"
 msgstr "請再次鍵入您的密碼"
 
-#: plugins/Comment/lib/Jifty/Plugin/Comment/View.pm:100
+#: lib/Jifty/Plugin/Comment/View.pm:100
 msgid "unpublish"
 msgstr ""
 

Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Tue Sep 16 03:33:21 2008
@@ -771,9 +771,7 @@
         }
     },
     '.form_field .error, .form_field .warning, .form_field .canonicalization_note': function(e) {
-        if ( e.innerHTML == "" ) {
-            e.style.display = "none";
-        }
+        if ( e.innerHTML == "" ) jQuery(e).hide();
     },
     // Form elements should focus if the CSS says so.
     ".focus": function(e) {

Added: jifty/trunk/t/TestApp-Plugin-Comments/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-Comments/Makefile.PL	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,7 @@
+use inc::Module::Install;
+
+name        'TestApp::Plugin::Comments';
+version     '0.01';
+requires    'Jifty' => '0.71129';
+
+WriteAll;

Added: jifty/trunk/t/TestApp-Plugin-Comments/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-Comments/bin/jifty	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname); 
+use UNIVERSAL::require;
+
+use Jifty;
+use Jifty::Script;
+
+local $SIG{INT} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();

Added: jifty/trunk/t/TestApp-Plugin-Comments/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-Comments/etc/config.yml	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,56 @@
+--- 
+framework: 
+  AdminMode: 1
+  ApplicationClass: TestApp::Plugin::Comments
+  ApplicationName: TestApp::Plugin::Comments
+  ApplicationUUID: E6A5E652-A2D2-11DC-B489-8901F3F60BF3
+  ConfigFileVersion: 2
+  Database: 
+    AutoUpgrade: 1
+    CheckSchema: 1
+    Database: testapp::plugin::comments
+    Driver: SQLite
+    Host: localhost
+    Password: ''
+    RecordBaseClass: Jifty::DBI::Record::Cachable
+    RecordUUIDs: active
+    User: ''
+    Version: 0.0.1
+  DevelMode: 1
+  L10N: 
+    PoDir: share/po
+  LogLevel: INFO
+  Mailer: Sendmail
+  MailerArgs: []
+
+  Plugins: 
+    - LetMe: {}
+    - SkeletonApp: {}
+    - REST: {}
+    - Halo: {}
+    - ErrorTemplates: {}
+    - OnlineDocs: {}
+    - CompressedCSSandJS: {}
+    - AdminUI: {}
+
+    - Comment: {}
+
+  PubSub: 
+    Backend: Memcached
+    Enable: ~
+  SkipAccessControl: 0
+  TemplateClass: TestApp::Plugin::Comments::View
+  Web: 
+    BaseURL: http://localhost
+    DataDir: var/mason
+    Globals: []
+
+    MasonConfig: 
+      autoflush: 0
+      default_escape_flags: h
+      error_format: text
+      error_mode: fatal
+    Port: 8888
+    ServeStaticFiles: 1
+    StaticRoot: share/web/static
+    TemplateRoot: share/web/templates

Added: jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Dispatcher.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+
+package TestApp::Plugin::Comments::Dispatcher;
+use Jifty::Dispatcher -base;
+
+on 'view/#' => run {
+    my $blog = TestApp::Plugin::Comments::Model::BlogPost->new;
+    $blog->load($1);
+
+    set blog => $blog;
+    show 'view';
+};
+
+1;

Added: jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Model/BlogPost.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/Model/BlogPost.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+
+package TestApp::Plugin::Comments::Model::BlogPost;
+use Jifty::DBI::Schema;
+
+use constant CLASS_UUID => '21EC717C-A2D3-11DC-BDD3-A201F3F60BF3';
+
+use TestApp::Plugin::Comments::Record schema {
+    column title => type is 'text';
+    column body => type is 'text';
+    column author => type is 'text';
+    column posted => type is 'text';
+};
+
+use Jifty::Plugin::Comment::Mixin::Model::Commented;
+
+# Your model-specific methods go here.
+
+1;
+

Added: jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-Comments/lib/TestApp/Plugin/Comments/View.pm	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,39 @@
+use strict;
+use warnings;
+
+package TestApp::Plugin::Comments::View;
+use Jifty::View::Declare -base;
+
+template 'post' => page {
+    { title is 'New Post' }
+
+    form {
+        my $post_blog = new_action class => 'CreateBlogPost';
+        render_action $post_blog;
+        form_submit label => _('Post'), submit => $post_blog;
+    };
+};
+
+template 'view' => page {
+    my $blog = get 'blog';
+
+    { title is $blog->title }
+
+    p { _('By %1', $blog->author) };
+
+    p { $blog->body };
+
+    hr { };
+
+    render_region
+        name      => 'comments',
+        path      => '/__comment/list',
+        arguments => {
+            collapsed    => 1,
+            parent_class => Jifty->app_class('Model', 'BlogPost'),
+            parent_id    => $blog->id,
+        },
+        ;
+};
+
+1;

Added: jifty/trunk/t/TestApp-Plugin-Comments/t/00-model-BlogPost.t
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Plugin-Comments/t/00-model-BlogPost.t	Tue Sep 16 03:33:21 2008
@@ -0,0 +1,83 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+
+=head1 DESCRIPTION
+
+A basic test harness for the BlogPost model.
+
+=cut
+
+use Test::More;
+BEGIN {
+    if (eval { require HTML::Scrubber; require MIME::Base64::URLSafe; require Regexp::Common::Email::Address; 1 }) {
+        plan tests => 16;
+    }
+    else {
+        plan skip_all => 'A requirement of the Comment plugin is not installed.';
+    }
+}
+
+use Jifty::Test::Dist;
+
+# Make sure we can load the model
+use_ok('TestApp::Plugin::Comments::Model::BlogPost');
+
+# Grab a system user
+my $system_user = TestApp::Plugin::Comments::CurrentUser->superuser;
+ok($system_user, "Found a system user");
+
+# Try testing a create
+my $o = TestApp::Plugin::Comments::Model::BlogPost->new(current_user => $system_user);
+my ($id) = $o->create();
+ok($id, "BlogPost create returned success");
+ok($o->id, "New BlogPost has valid id set");
+is($o->id, $id, "Create returned the right id");
+
+my $c_list = $o->comments;
+is($c_list->count, 0, 'We have zippo comments');
+
+# Add a comment
+my $c = TestApp::Plugin::Comments::Model::Comment->new(current_user => $system_user);
+$c->create(
+    title      => 'Jifty is da bomb',
+    body       => 'And other overused clichés...',
+    created_on => DateTime->now,
+    your_name  => 'Sterling',
+);
+ok($c->id, 'Created a comment');
+
+my $bpc = TestApp::Plugin::Comments::Model::BlogPostComment->new(current_user => $system_user);
+$bpc->create(
+    commented_upon => $o->id,
+    the_comment    => $c->id,
+);
+ok($bpc->id, 'Created a comment link');
+
+$c_list->redo_search;
+is($c_list->count, 1, 'We have a comment!');
+is($c_list->count_all, 1, 'We have a comment somewhere!');
+
+# And another
+$o->create();
+ok($o->id, "BlogPost create returned another value");
+isnt($o->id, $id, "And it is different from the previous one");
+
+# Searches in general
+my $collection =  TestApp::Plugin::Comments::Model::BlogPostCollection->new(current_user => $system_user);
+$collection->unlimit;
+is($collection->count, 2, "Finds two records");
+
+# Searches in specific
+$collection->limit(column => 'id', value => $o->id);
+is($collection->count, 1, "Finds one record with specific id");
+
+# Delete one of them
+$o->delete;
+$collection->redo_search;
+is($collection->count, 0, "Deleted row is gone");
+
+# And the other one is still there
+$collection->unlimit;
+is($collection->count, 1, "Still one left");
+


More information about the Jifty-commit mailing list