You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tiles.apache.org by Nicolas Le Bas <ma...@nlebas.net> on 2014/03/17 13:25:07 UTC
Underscores in file names.
Hi,
There has been an interesting discussion in spring's JIRA https://jira.spring.io/browse/SPR-11491. How do we make the difference between an underscore meant for a localization suffix and an underscore meant as a regular character?
I'd like to continue it here so we can officially decide what to do.
Thanks,
Nick
Re: Underscores in file names.
Posted by Mick Semb Wever <mc...@apache.org>.
ClamAV 0.96.5
> > but taking a pragmatic
> > approach in the code by checking the suffix against
> > Locale.getISOLanguageCodes().
>
>
> patch in progress…
done. see http://article.gmane.org/gmane.comp.apache.tiles.scm/578
Easy if the suffix after the underscore is obviously not a locale,
but in some situations it could be, eg the language code is valid but
not the country/region.
> • if the resource name contains "_" and after it there is no supported locale language code then the whole resource name is treated as a non-localized path.
> This situation prints a warning like
> > No supported matching language for locale "zz". Using /my/path_zz.html as a non-localized resource path.
>
> • if the resource name contains "_" and after it there is a supported locale language code but the locale constructed isn't valid/supported then the closest supported locale is used.
> This situation prints a warning like
> > For resource /my/path_en_ZZ.html the closest supported matching locale to "en_ZZ" is "en". Using /my/path.html as resource path.
~mck
--
"Perl: The only language that looks the same before and after RSA
encryption." Keith Bostic
| http://github.com/finn-no | http://tech.finn.no |
Re: Underscores in file names.
Posted by Mick Semb Wever <mc...@apache.org>.
ClamAV 0.96.5
On Wed, 2014-03-19 at 09:16 +0100, mck wrote:
> but taking a pragmatic
> approach in the code by checking the suffix against
> Locale.getISOLanguageCodes().
patch in progress…
--
"Everything you can imagine is real." Pablo Picasso
| http://github.com/finn-no | http://tech.finn.no |
Re: Underscores in file names.
Posted by mck <mc...@apache.org>.
> There has been an interesting discussion in spring's JIRA https://jira.spring.io/browse/SPR-11491.
> How do we make the difference between an underscore meant for a localization suffix and an underscore
> meant as a regular character?
>
> I'd like to continue it here so we can officially decide what to do.
I'm in favour of maintaining tiles documentation to state that
underscore is reserved for locale suffixes, but taking a pragmatic
approach in the code by checking the suffix against
Locale.getISOLanguageCodes().
~mck