Description

When running the standalone moin, click the language setup will cause an internal error. It then traced back to "action/language_setup.py" line 88, said:

Traceback (most recent call last):
  File "/home/exaos/Projects/CNDL-Cluster/moin-1.9.1/MoinMoin/support/werkzeug/utils.py", line 248, in __call__
    return self.app(environ, start_response)
  File "/home/exaos/Projects/CNDL-Cluster/moin-1.9.1/MoinMoin/wsgiapp.py", line 281, in __call__
    response = run(context)
  File "/home/exaos/Projects/CNDL-Cluster/moin-1.9.1/MoinMoin/wsgiapp.py", line 88, in run
    response = dispatch(request, context, action_name)
  File "/home/exaos/Projects/CNDL-Cluster/moin-1.9.1/MoinMoin/wsgiapp.py", line 136, in dispatch
    response = handle_action(context, pagename, action_name)
  File "/home/exaos/Projects/CNDL-Cluster/moin-1.9.1/MoinMoin/wsgiapp.py", line 195, in handle_action
    handler(context.page.page_name, context)
  File "/home/exaos/Projects/CNDL-Cluster/moin-1.9.1/MoinMoin/action/language_setup.py", line 88, in execute
    title = _("Install language packs for '%s'") % (lang)
TypeError: not all arguments converted during string formatting

Steps to reproduce

  1. Continue the steps to run an standalone server.

Example

Component selection

Details

MoinMoin Version

1.9.1

OS and Version

Debian Linux testing

Python Version

2.5.4

Server Setup

Standalone

Server Details

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

zh

Workaround

(removed the working, but wrong workaround)

Fix the zh po file locally (it is already fixed on master19 wiki).

Discussion

Looks like in language, which you're using, translation string misses %s placeholder. Workaround changes i18n string, so it isn't found and not translated. Can you say, which interface language you are using? -- EugeneSyromyatnikov 2010-01-19 17:55:50

Looks like (guess is based on ip whois information), this is Chinese. Please, check out this diff: http://master19.moinmo.in/4ct10n/info/MoinI18n/zh?action=diff&rev2=181&rev1=180 -- EugeneSyromyatnikov 2010-01-19 18:01:37

Hm, may be we need to add some placeholder-checking mechanism in po-update scripts to prevent such errors? -- EugeneSyromyatnikov 2010-01-19 18:01:37

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/1.9.1LanguageSetupInternalError (last edited 2010-01-22 09:00:37 by ThomasWaldmann)