[PATCH 06 of 52 Narval cube] [new style] fix unicode not found

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 11:34:06 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585406868 0
#      Sat Mar 28 14:47:48 2020 +0000
# Node ID 394efcb13ac25e5b17092e4dc7ef3e1ad87f6cdd
# Parent  44a6b4af7297c37a82bae77f9ec6877cdc2146bf
[new style] fix unicode not found

diff --git a/cubicweb_narval/logformat.py b/cubicweb_narval/logformat.py
--- a/cubicweb_narval/logformat.py
+++ b/cubicweb_narval/logformat.py
@@ -7,7 +7,7 @@
 :license: General Public License version 2 - http://www.gnu.org/licenses
 """
 __docformat__ = "restructuredtext en"
-_ = unicode
+from cubicweb import _
 
 import logging
 import re
diff --git a/cubicweb_narval/migration/postcreate.py b/cubicweb_narval/migration/postcreate.py
--- a/cubicweb_narval/migration/postcreate.py
+++ b/cubicweb_narval/migration/postcreate.py
@@ -18,7 +18,7 @@
 
 You could setup site properties or a workflow here for example.
 """
-_ = unicode
+from cubicweb import _
 
 # create the WF of Plan
 wf = add_workflow(u'Plan execution status workflow', 'Plan')
diff --git a/cubicweb_narval/schema.py b/cubicweb_narval/schema.py
--- a/cubicweb_narval/schema.py
+++ b/cubicweb_narval/schema.py
@@ -15,7 +15,7 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """cubicweb-narval schema"""
 
-_ = unicode
+from cubicweb import _
 
 from logilab.common.tasksqueue import MEDIUM, PRIORITY
 from yams.buildobjs import (DEFAULT_ATTRPERMS, EntityType, RelationDefinition,
diff --git a/cubicweb_narval/views/bot.py b/cubicweb_narval/views/bot.py
--- a/cubicweb_narval/views/bot.py
+++ b/cubicweb_narval/views/bot.py
@@ -15,7 +15,7 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
 __docformat__ = "restructuredtext en"
-_ = unicode
+from cubicweb import _
 
 from cubicweb.view import StartupView
 
diff --git a/cubicweb_narval/views/plan.py b/cubicweb_narval/views/plan.py
--- a/cubicweb_narval/views/plan.py
+++ b/cubicweb_narval/views/plan.py
@@ -15,7 +15,7 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
 __docformat__ = "restructuredtext en"
-_ = unicode
+from cubicweb import _
 
 from tempfile import NamedTemporaryFile
 from logilab.mtconverter import xml_escape
diff --git a/cubicweb_narval/views/recipe.py b/cubicweb_narval/views/recipe.py
--- a/cubicweb_narval/views/recipe.py
+++ b/cubicweb_narval/views/recipe.py
@@ -15,7 +15,7 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
 __docformat__ = "restructuredtext en"
-_ = unicode
+from cubicweb import _
 
 from pygments import highlight
 from pygments.lexers import PythonLexer
diff --git a/cubicweb_narval/views/startplan.py b/cubicweb_narval/views/startplan.py
--- a/cubicweb_narval/views/startplan.py
+++ b/cubicweb_narval/views/startplan.py
@@ -15,7 +15,7 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """cubicweb-narval views/forms/actions/components for web ui"""
 
-_ = unicode
+from cubicweb import _
 
 from logilab.common.tasksqueue import PRIORITY, MEDIUM
 
diff --git a/cubicweb_narval/views/startup.py b/cubicweb_narval/views/startup.py
--- a/cubicweb_narval/views/startup.py
+++ b/cubicweb_narval/views/startup.py
@@ -15,7 +15,7 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
 __docformat__ = "restructuredtext en"
-_ = unicode
+from cubicweb import _
 
 from cubicweb.predicates import is_instance, none_rset
 from cubicweb.web.views import tableview




More information about the cubicweb-devel mailing list