line is None when i use chinese language

21 views
Skip to first unread message

Jelly Chen

unread,
Oct 24, 2011, 11:42:46 PM10/24/11
to lettuce-d...@googlegroups.com
特性: 计算加法       # features/add.feature:3
  为了计算           # features/add.feature:4
  作为会计师         # features/add.feature:5
  希望实现加法功能   # features/add.feature:6
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/lettuce-0.1.33-py2.6.egg/lettuce/registry.py", line 84, in call_hook
    callback(*args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/lettuce-0.1.33-py2.6.egg/lettuce/plugins/colored_shell_output.py", line 132, in print_scenario_running
    string = scenario.represented()
  File "/usr/local/lib/python2.6/dist-packages/lettuce-0.1.33-py2.6.egg/lettuce/core.py", line 658, in represented
    return strings.rfill(head, self.feature.max_length + 1, append=u'# %s:%d\n' % (self.described_at.file, self.described_at.line))
TypeError: %d format: a number is required, not NoneType

I have added these content to lettuce/language.py, and reinstalled lettuce.
     'zh-CN': {
        'examples': u'例如|场景',
        'feature': u'特性|功能',
        'name': u'Simplified Chinese',
        'native': u'简体中文',
        'scenario': u'场景',
        'scenario_outline': u'场景描述',
        'scenario_separator': u'(场景描述|场景)',
    },
      'zh-TW': {
        'examples': u'例如|場景',
        'feature': u'特性|功能',
        'name': u'Traditional Chinese',
        'native': u'繁體中文',
        'scenario': u'場景',
        'scenario_outline': u'場景描述',
        'scenario_separator': u'(場景描述|場景)',
    },

Jelly Chen

unread,
Oct 26, 2011, 9:34:53 AM10/26/11
to lettuce-d...@googlegroups.com
I see.

scenario can not be contained in examples.

at last, i use this, it works fine.

     'zh-CN': {
        'examples': u'例如|场景集',
        'feature': u'特性',

        'name': u'Simplified Chinese',
        'native': u'简体中文',
        'scenario': u'场景',
        'scenario_outline': u'场景模板',
        'scenario_separator': u'(场景模板|场景)',
    },
     'zh-TW': {
        'examples': u'例如|場景集',
        'feature': u'特性',

        'name': u'Traditional Chinese',
        'native': u'繁體中文',
        'scenario': u'場景',
        'scenario_outline': u'場景模板',
        'scenario_separator': u'(場景模板|場景)',
    },
查词典
 
Dict.cn 海词 - 划词释义
已开启划词
设置
查词典
 
Dict.cn 海词 - 划词释义
已开启划词
设置
Reply all
Reply to author
Forward
0 new messages