I've an functional test where I use Five's testbrowser. Everything generally works. Now I want to browser through a translated user interface in German. But I don't get translatable parts of the page in German. Maybe the message catalogs or other part of the translation machinery are not loaded? I tried to load the zcml from PloneTranslations, but that did not make a difference.

Here are some parts of my doctest:

  >>> from Products.Five.testbrowser import Browser
  >>> browser = Browser()
  >>> browser.addHeader('Accept-Language', 'de,de-DE')

Without configuring Plone, the content language is English.

  >>> browser.open('http://nohost/plone')
  >>> browser.headers['content-language']
  'en'

I switched the portal's language to German

  >>> from plone.app.controlpanel.language import \
  ... LanguageControlPanelAdapter

  >>> lcpa = LanguageControlPanelAdapter(self.portal)
  >>> lcpa.set_default_language('de')

If I now use the browser I get a response where the
content-language is German.

  >>> browser.open('http://nohost/plone')
  >>> browser.headers['content-language']
  'de'

But translatable strings in the response are still English

  >>> 'Log in' in browser.contents
  True
  >>> 'Anmelden' in browser.contents
  False


Thanks..Carsten

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to