Commit 275e2faa authored by Jérome Perrin's avatar Jérome Perrin

Localizer: fix wrong replacement list -> ensure_list

This list was to cast the tuple, it can cause an AttributeError("'tuple' object has no attribute 'append'",)
error when this branch is used.

This is really an error code path, so that was unnoticed.
parent 0bc1d75e
......@@ -60,7 +60,6 @@ from .interfaces import IMessageCatalog
from .LanguageManager import LanguageManager
from .LocalFiles import LocalDTMLFile
from .utils import charsets, lang_negotiator, _
from Products.ERP5Type.Utils import ensure_list
###########################################################################
......@@ -312,7 +311,7 @@ class MessageCatalog(LanguageManager, ObjectManager, SimpleItem):
if lang is None:
# Builds the list of available languages
# should the empty translations be filtered?
available_languages = ensure_list(self._languages)
available_languages = list(self._languages)
# Imagine that the default language is 'en'. There is no
# translation from 'en' to 'en' in the message catalog
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment