01157: Improved i18n support - Automatic translating page RecentChanges and AllRecentChanges

Summary: Improved i18n support - Automatic translating page RecentChanges and AllRecentChanges
Created: 2009-12-03 15:00
Status: Closed - added for 2.2.14
Category: CoreCandidate
From: SchreyP
Assigned:
Priority: 33
Version: 2.2.7
OS: n.a.

Description: Hi, As end November discussed in the pmwiki-users email list, I'm looking for a solution that have a (:title:) directive included when the pages {$Group}/RecentChanges and {$SiteGroup}.AllRecentChanges are generated, with the translation in the XLPage.

Or more specific:

  • (:title $[Recent Changes]:) for {$Group}/RecentChanges
  • (:title $[All Recent Changes]:) for {$SiteGroup}.AllRecentChanges

If we now define the translation in the XLPage using Numeric Character References (in the format &#number;) for non-ASCII characters, I think we solve the multi-language problem too. See also Wikipedia:Unicode_and_HTML

-- SchreyP December 03, 2009, at 03:09 PM

I added this feature for version 2.2.14. For a number of technical pages like RecentChanges, GroupHeader, SideBar, GroupAttributes, if there is such a string defined in XLPage, then the page title will be translated. See PmWikiFr.RecentChanges and PmWikiBg.RecentChanges for example. It also works with [[link|+]]. --Petko February 22, 2010, at 10:28 PM

The documentation should be updated. --Petko

Thanks! Added documentation in Localization.Localization, PmWiki.Links and extra entries in Localization.XLPageTemplate. Can you check if added documentation is ok, and more specific if the list of technical pages supported by this new feature is complete? -- SchreyP February 23, 2010, at 03:11 PM

Great, thanks. The list is rather large, includes most default pages in the Site and SiteAdmin groups. I'm not sure we should add all pages to the XLPage template. Current list is:

 Site(Admin)?
 (All)?(Site|Group)(Header|Footer|Attributes)
 (Side|Left|Right)Bar
 (Wiki)?Sandbox
 (All)?Recent(Changes|Uploads)
 InterMap|PageActions|\\w+QuickReference|\\w+Templates
 NotifyList|AuthUser|ApprovedUrls|(Block|Auth)List

where "(...)?" means an optional part, "(a|b)" means "a or b", "\\w+" means is a number of letters. Note that if a page has a (:title ...:) directive, it will be used; if a name is not defined in XLPage, it will be displayed as is. --Petko February 24, 2010, at 08:26 AM

Yes, I agree this is too much to add all in the XLPage template. I will update the template/documentation tomorrow -- SchreyP February 24, 2010, at 05:01 PM

Good job, thanks! --Petko February 25, 2010, at 04:56 PM