On 20/04/07, Daisuke Maki <[EMAIL PROTECTED]> wrote:
I'm trying to use a custom localize object so I can display errors from
my custom validator, and added this to my yaml config:

  ---
  localize_class: 'My::I18N'

This barfed on me at HTML/FormFu/Localize.pm line 95, where the class is
being required. The errors stated was "class argument missing" in
require_class().

So I looked at the code, and I'm guessing this is the culprit:

Index: lib/HTML/FormFu/Localize.pm
===================================================================
--- lib/HTML/FormFu/Localize.pm (revision 189)
+++ lib/HTML/FormFu/Localize.pm (working copy)
@@ -151,9 +151,7 @@
 #warn "+ loading ".$localize_data->{localize_object};

         $localize_data->{localize_object} =
-            $self->get_localize_object_from_class(
-                $localize_data->{localize_object}
-            );
+            $self->get_localize_object_from_class( $self->localize_class );

         $localize_data->{dies_on_missing_key} =
             $self->get_localize_object_dies_on_missing_key(

Is my correction above right? This is the first time I try out to change
localize_class, so I wasn't too sure if this was indeed the intended
behavior.

Sorry that this got overlooked.
I had hoped mario might respond, as I'm not familiar with the code in
Localize.pm
I've committed your patch, but the L10N behaviour really needs more
tests to pin down its behaviour.

Cheers,
Carl

_______________________________________________
Html-widget mailing list
Html-widget@lists.rawmode.org
http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget

Reply via email to