[rt-users] Re: How is language determined in RT?
Autrijus Tang
autrijus at autrijus.org
Thu Aug 7 03:19:27 EDT 2003
On Thu, Aug 07, 2003 at 02:56:22AM -0400, Jesse Vincent wrote:
> I'm sending in a header that looks like:
> en-us, ja;q=0.8
> Instead of getting en back (as matching the en-us tag prefix), I'm getting
> ja.
Locale::Maketext thinks superclass languages are not alternates, so
it tries them after all other language selections.
The patch below treats it like alternate language tags, and DWYM.
Thanks,
/Autrijus/
--- Maketext.pm.orig Thu Aug 7 15:14:09 2003
+++ Maketext.pm Thu Aug 7 15:16:46 2003
@@ -283,7 +283,7 @@
# if it's a locale ID, try converting to a lg tag (untainted),
# otherwise nix it.
- push @languages, map I18N::LangTags::super_languages($_), @languages
+ @languages = map { $_, I18N::LangTags::super_languages($_) } @languages
if $MATCH_SUPERS;
@languages = map { $_, I18N::LangTags::alternate_language_tags($_) }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20030807/5645cb53/attachment.sig>
More information about the rt-users
mailing list