Return-Path: Delivered-To: apmail-forrest-dev-archive@www.apache.org Received: (qmail 63152 invoked from network); 17 Jan 2007 12:19:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jan 2007 12:19:45 -0000 Received: (qmail 55335 invoked by uid 500); 17 Jan 2007 12:19:45 -0000 Delivered-To: apmail-forrest-dev-archive@forrest.apache.org Received: (qmail 55276 invoked by uid 500); 17 Jan 2007 12:19:44 -0000 Mailing-List: contact dev-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@forrest.apache.org List-Id: Delivered-To: mailing list dev@forrest.apache.org Received: (qmail 55220 invoked by uid 99); 17 Jan 2007 12:19:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2007 04:19:44 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [62.142.5.107] (HELO emh01.mail.saunalahti.fi) (62.142.5.107) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2007 04:19:34 -0800 Received: from [88.112.45.139] (a88-112-45-139.elisa-laajakaista.fi [88.112.45.139]) by emh01.mail.saunalahti.fi (Postfix) with ESMTP id 644EB4BE21 for ; Wed, 17 Jan 2007 14:19:11 +0200 (EET) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Sjur Moshagen Subject: Re: i18n enhancements of wiki plugin Date: Wed, 17 Jan 2007 14:19:08 +0200 To: dev@forrest.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org Den 17. jan. 2007 kl. 13.39 skrev Sjur Moshagen: > Now, it *continues* to work with plain content like index.jspwiki. > But as soon as I localise it to index.no.jspwiki, I get a file-not- > found error. I don't understand why... :-( I found a pattern, and a (clumsy) work-around: It seems the i18n matcher needs to have a default/fallback file. Adding a file index.jspwiki will let the other localised two be accessible. The next thought was that this was caused by a parameter in the main sitemap, so I changed $FORREST_HOME/main/webapp/sitemap.xmap to read in the LocaleMatcher config section: false (it used to be true in my local copy). According to the Cocoon docs it should now NOT be looking for a fallback document. But it still does - I get the following error message as long as I don't have a fallback file: Request URI adm/positions/software_engineer.html cause /Users/sjur/Documents/xtdoc/sd/src/documentation/content/xdocs/adm/ positions/software_engineer.xml (No such file or directory) The workaround is thus to make sure I have a(n empty) fallback document. Then i18n with wiki files seems to work as it should. On the other hand, when having a mixture of localised and non- localised files, we also need to have access to those non-localised files. Thus, we need to leave the use-blank-locale parameter true, otherwise Forrest will give a file-not-found error on all non- localised files! Since there was no actual difference between the two settings, that should not be a problem. Please note that it does normally not make sense to have a fallback document for wiki documents. Since the wiki format is text-only (no markup), there is no explicit information about the human language used in a particular file within the document content. Thus, to detect the language used for further processing (language override menu, whatever), the filename is the *only* place where it is possible to encode this info. The question remains why I get a file not found error when leaving out the fallback document. LocaleMatcher has a fallback language specified, which it could/should use to look up a file, if nothing else is found. Thus, as long as one of the localised files is the default language, there should be no error. Sjur