00987: XLPage adds redundant tags to $XLLangs

Summary: XLPage adds redundant tags to $XLLangs
Created: 2007-10-06 08:48
Status: Closed - fixed for 2.2.0-beta64
Category:
From: swestrup
Assigned:
Priority: 1
Version: 2.2.0-beta63
OS: all

Description: Currently, any successful use of XLPage() unconditionally adds the language tag used to the end of $XLLangs. This means that when there are a number of places to look for translations, a language tag can be added multiple times. This is also common when using the XLPage() feature to load parameters for a recipe from some wiki page.

For example, if one writes:

  XLPage('fr',"$Group.XLPageLocal");    # group local translations
  XLPage('fr','PmWikiFr.XLPageLocal');  # my local translations
  XLPage('fr','PmWikiFr.XLPage');       # from i18n.tgz

If all three succeed, you'll end up with 'fr' showing up three times in $XLLangs. This causes unnecessary lookups, and makes working with $XLLangs more trouble than it should be.

It should be simple to modify XLPag()e so that it only appends tags that don't already appear in $XLLangs.


Now fixed for 2.2.0-beta64.

Pm November 13, 2007, at 07:52 AM