Description

Creating a dictionary page for Norwegian Bokmål as described in the documentation, using the name "NorwegianBokmalDict", does not result in the dictionary entries being used to translate the navibar, although the built-in translations do work. This is most likely because the MoinMoin.i18n.getText function uses the x-language-in-english property of the language translation files (or registry) whose value for Norwegian Bokmål is "Norwegian Bokmal". The code then attempts to find a page of that name, obviously failing.

At the same time, the various regular expressions which are meant to detect dictionary pages don't seem to permit page names containing spaces, at least according to the MoinMoin.config.multiconfig.DefaultConfig.page_dict_regex attribute.

Steps to reproduce

  1. Create a dictionary page for a language whose name contains spaces, populating it with definitions (eg. "Registration" -> "Påmelding").

  2. Edit the navibar to contain a page not translated by the default translations (eg. "Registration").
  3. Create a page corresponding to the page added to the navibar, having a different name for the translated page (eg. "Påmelding").
  4. Change browser or user preferences, selecting the language concerned.
  5. Observe that the untranslated page name appears in the navibar.

Example

Sorry, no example available publicly, but it should be easy to reproduce.

Component selection

Details

MoinMoin Version

1.6.3 (but probably in 1.7.1, too, according to the code)

OS and Version

Kubuntu 7.04

Python Version

2.5.1

Server Setup

Apache with CGI

Server Details

Apache 2.2.3

Language you are using the wiki in (set in the browser/UserPreferences)

Norwegian Bokmål (nb)

Workaround

A workaround I employed was to edit the getText function and to change the initialisation of dictpagename to the following:

            dictpagename = "%sDict" % language.replace(" ", "")

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/LanguageDictTranslationsNotFoundForLanguageNamesHavingSpaces (last edited 2008-08-31 21:04:48 by ThomasWaldmann)