From e71beac4dc0cdf1eb79bf5e5cc576a2a2a351c79 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 10 Jan 2017 12:16:08 +0100 Subject: [PATCH] converts the doc informations into unicode --- ChangeLog | 5 ++++- tiramisu/i18n.py | 2 +- tiramisu/storage/dictionary/option.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5aa862..792ab36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Thu Jan 10 11:55:02 2017 +0200 Gwenael Remond + * converts the doc informations into unicode + Mon Jan 9 20:12:02 2017 +0200 Emmanuel Garette * make_dict has new fullpath option @@ -34,7 +37,7 @@ Thu Sep 17 21:23:34 2015 +0200 Emmanuel Garette Sun Jul 26 19:09:29 2015 +0200 Emmanuel Garette * add global 'empty' property, this property raise mandatory - PropertiesOptionError if multi or master have empty value + PropertiesOptionError if multi or master have empty value Fri Jul 24 18:03:59 2015 +0200 Emmanuel Garette * add duplicate option to Config, to generate new Config with same diff --git a/tiramisu/i18n.py b/tiramisu/i18n.py index 340064e..c7c9cab 100644 --- a/tiramisu/i18n.py +++ b/tiramisu/i18n.py @@ -49,4 +49,4 @@ gettext.translation(APP_NAME, fallback=True) t = gettext.translation(APP_NAME, fallback=True) -_ = t.gettext +_ = t.ugettext diff --git a/tiramisu/storage/dictionary/option.py b/tiramisu/storage/dictionary/option.py index a8b8a62..b0b8c45 100644 --- a/tiramisu/storage/dictionary/option.py +++ b/tiramisu/storage/dictionary/option.py @@ -73,6 +73,8 @@ class StorageBase(object): _setattr = object.__setattr__ _setattr(self, '_name', name) if doc is not undefined: + if isinstance(doc, str): + doc = doc.decode('utf8') _setattr(self, '_informations', {'doc': doc}) if multi != 1: _setattr(self, '_multi', multi)