Return-Path: Delivered-To: apmail-ofbiz-user-archive@www.apache.org Received: (qmail 35578 invoked from network); 3 Mar 2008 22:14:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 22:14:28 -0000 Received: (qmail 15161 invoked by uid 500); 3 Mar 2008 22:14:22 -0000 Delivered-To: apmail-ofbiz-user-archive@ofbiz.apache.org Received: (qmail 15147 invoked by uid 500); 3 Mar 2008 22:14:22 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 15138 invoked by uid 99); 3 Mar 2008 22:14:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 14:14:22 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bruno.busco@gmail.com designates 209.85.200.170 as permitted sender) Received: from [209.85.200.170] (HELO wf-out-1314.google.com) (209.85.200.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 22:13:47 +0000 Received: by wf-out-1314.google.com with SMTP id 25so450820wfa.31 for ; Mon, 03 Mar 2008 14:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=k3qL4a4HcD3eGnLj82vQ6g1+AW4OwVoK/jks8Qbajo8=; b=H0JMNWw8v/U2ODXDFR2MxTrmue8ouO4vTLX2gUTgF/foawrTD2IfyuVb8gylU+6njZcj3zcPyCqkaOO4lvJF5W2gFND4YJ/wrTT2FsQKSYo8IgCwrRX0W3Z0JJxUHtmz/vpbwRnv+sqyDQ2OVadkCEpZFL4OVF6kuVj7IV8dwB8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Wecfl6j6CoOk2g3Ye7ukBA2ijzILj5tAoTONIHdHHUvHXggzo33zPpiwbsWCoeZY2uvCC1T0DHaJdCQdsexrbn6AoWAUZt0YbhggaH+VuPqDHByNm4K2M9GJpdBAhwkn/lsLQ6VkPdn6AGsN9Dp8qn1tIpItzoOAiQB41z0ZZJE= Received: by 10.142.171.6 with SMTP id t6mr1951wfe.173.1204582438174; Mon, 03 Mar 2008 14:13:58 -0800 (PST) Received: by 10.142.52.6 with HTTP; Mon, 3 Mar 2008 14:13:58 -0800 (PST) Message-ID: Date: Mon, 3 Mar 2008 23:13:58 +0100 From: "Bruno Busco" To: user@ofbiz.apache.org Subject: Re: Multiple UiLabels definitions In-Reply-To: <47CC2008.1030704@hlmksw.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6212_26654208.1204582438158" References: <47CC2008.1030704@hlmksw.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_6212_26654208.1204582438158 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/3/3, Adrian Crum : > > Bruno Busco wrote: > > Hi, > > while testing ecommerce application i have found that selecting the > ITalian > > language, some labels are displayed still in english. > > I was convinced that this was because of a missing translation but the > > reason was a little different: > > > > Some labels are defined in more than one resource file. For example > > "CommonQuickAdd" is both in EcommerceUiLabels.xml and in > > CommonUiLabels.xmlfiles. > > But while the CommonUiLabels.xml is complete, in the > > > EcommerceUiLabels.xmlfile there is no italian label. > > > > > So what I think that could happen is that OFBiz tries to have an IT > string > > from the EcommerceUiLabels.xml file (the first one), this is not found > and > > so it falls back to what is specified in (locale.properties.fallback=en) > > BEFORE checking if the IT string is present in other resource files. > > > > I tryed to delete the incomplete from > the > > EcommerceUiLabels.xml and now the italian string is correctly displayed > > (because no fallback). > > Also defining (locale.properties.fallback=it) it works because now, even > the > > CommonUiLabels.xml is looked for an italian string. > > > > I see four options for me to solve the problem: > > 1) Add all italian strings to EcommerceUiLabels.xml even if they are > already > > present in CommonUiLabels.xml (I don't like because of redundancy) > > 2) Remove all the Common*** labels from EcommerceUiLabels.xml (any > > drawbacks?) > > 3) Change to (locale.properties.fallback=it) > > > #3 will generate "resource not found" errors. In effect you would be > saying "If you can't find the IT label, then fall back to the IT label." > > > -Adrian > OK. I have removed all Common* labels that are defined in CommonUiLabels.xmlfile from all the other files and it seems to work now. But this is not enough because for instance EcommerceYourShoppingCartEmpty label is present both in ECommerceUiLabels.xml AND in OrderUiLabels.xml. Should I remove the occurrence of this label from OrderUiLabels.xml ? In other words what is the naming convention to be observed? Could I follow the rule that all the labels that starts with AppName must be only defined in the AppNameUiLabels.xml file? Bruno ------=_Part_6212_26654208.1204582438158--