【发布时间】:2015-07-02 00:31:42
【问题描述】:
我需要本地化我的金字塔应用程序,但我遇到了问题。
setup.py 文件包含以下 message_extractors 变量:
message_extractors = { '.': [
('templates/**.html', 'mako', None),
('templates/**.mako', 'mako', None),
('static/**', 'ignore', None)
]},
我已经创建了目录my_package_name/locale。在__init__.py 我添加了config.add_translation_dirs('my_package_name:locale')。
但是,当我跑步时(my_virtual_env): python setup.py extract_messages
我收到消息
running extract_messages
error: no output file specified`
如果我理解正确,extract_messages 在这种情况下不需要 --output-file 参数。
这种行为的原因是什么?
【问题讨论】:
标签: python localization pyramid mako