Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 61510 invoked from network); 17 Feb 2005 15:18:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Feb 2005 15:18:03 -0000 Received: (qmail 29012 invoked by uid 500); 17 Feb 2005 15:18:00 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 28952 invoked by uid 500); 17 Feb 2005 15:18:00 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 28936 invoked by uid 99); 17 Feb 2005 15:18:00 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of melowe@gmail.com designates 64.233.184.202 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.202) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 17 Feb 2005 07:17:59 -0800 Received: by wproxy.gmail.com with SMTP id 58so371777wri for ; Thu, 17 Feb 2005 07:17:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=APixknmYAzuilB2w3uazTTMYXJxVq6ASDnwGgUWchaxOkRTlVgd2joRpfkkDUnmmbNt8V3CeCiylLAvW8en3TwFZecEz1RQvBJvszlqTCYiKh/cSBPQvwY60pImiLsPWlIjTteWrku+dojKVX3IDbJ/INk4+U2UeZbVlQQTVSMQ= Received: by 10.54.2.9 with SMTP id 9mr40089wrb; Thu, 17 Feb 2005 07:17:54 -0800 (PST) Received: by 10.54.27.42 with HTTP; Thu, 17 Feb 2005 07:17:54 -0800 (PST) Message-ID: <3e1257da05021707173b59333b@mail.gmail.com> Date: Thu, 17 Feb 2005 16:17:54 +0100 From: Mark Lowe Reply-To: Mark Lowe To: dev@cocoon.apache.org Subject: Re: Fixing i18n required messages In-Reply-To: <56184.212.102.67.12.1108651746.squirrel@mail.pro-netics.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <3e1257da05021701107655c5d1@mail.gmail.com> <35978.212.102.67.12.1108636837.squirrel@mail.pro-netics.com> <3e1257da05021705394074b442@mail.gmail.com> <56184.212.102.67.12.1108651746.squirrel@mail.pro-netics.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I've got all that working (localized error messages) and such like, thats all find and dandy. Its just the required field.. The situation has been complicated where I'm walking into a project thats already in progress and, So this could be down to the xslt for form rendering. However I was reading that the required attribute and rendering a localised message wasn't working in the sample either. So I thought I'd take a look into it, rather than whining about it. Guess ist time to run the examples again to see if they do what they say on the box. Mark On Thu, 17 Feb 2005 15:49:06 +0100 (CET), Daniele Madama wrote: > > > I found that, and yes of course I have the message keys added.. You > > should try it, practice is usually better than theory. I've seen this > > mentioned elsewhere, if its a bug I'd prefer to submit a patch when i > > enter it rather than just joining a que. > > If you see the form-instance you can found the declaration of > validation-message > > general.field-required > > so this message must be in the 'forms' catalogue, if you want to have the > message in the same file of other message you can simply add another > catalogue on the declaration of I18nTransformer that point on the same > file > > name="i18n" > label="i18n" > logger="sitemap.transformer.i18n" > src="org.apache.cocoon.transformation.I18nTransformer"> > > location="resources/translations"/> > location="resources/translations"/> > > false > > > in this code both catalogue point to the same file. > > Is this all or your sitatuion is different? > > TIA, > Best regards > > > > > On Thu, 17 Feb 2005 11:40:37 +0100 (CET), Daniele Madama > > wrote: > >> > >> > Hello > >> > > >> > Could someone nudge me in the right direction (i.e. where to start > >> > looking) if i wanted to get a patch in to fix this annoying i18n > >> > required messages problem. > >> > > >> > Thanks > >> > > >> > Mark > >> > > >> > >> If you are looking for the i18n of the cforms required message, is > >> already > >> done in the o.a.c.forms.formmodel.Field class > >> > >> > >> if (this.value == null && getFieldDefinition().isRequired()) > >> { > >> // Field is required > >> this.validationError = new ValidationError(new > >> I18nMessage("general.field-required", > >> Constants.I18N_CATALOGUE)); > >> } else { > >> > >> > >> So the only things is to add the correct message entry in the i18n > >> catalog. > >> > >> I hope this is what you need. > >> > >> Best regards > >> > >> -- > >> Daniele Madama > >> > >> Pro-netics s.r.l. > >> Via Elio Lampridio Cerva 127/c > >> Roma > >> Tel. 0651530849 > >> http://www.pro-netics.com > >> > > > > -- > Daniele Madama > > Pro-netics s.r.l. > Via Elio Lampridio Cerva 127/c > Roma > Tel. 0651530849 > http://www.pro-netics.com >