如何在Ubuntu上设置Pootle tranlation服务器?

我正在尝试在Ubuntu上安装Pootle翻译服务。 不幸的是我被困在运行Pootle服务器。

我已经手动设置了所有必需的软件包(pootle,translate-toolkit和其他)。 然后,如果我从安装目录运行./PootleServer,它将以完美的方式运行。

/usr/src/Pootle-2.1.5# ./PootleServer Starting server, listening on port 8080. 2011-03-14 21:53:56,001 INFO Starting Django server, listening on port 8080 

但是当我试图用“PootleServer”命令运行PootleServer时,出现以下错误。 Pootle显然希望/ usr / share / pootle目录存在,而不是。 / usr / share / pootle丢失。 你知道为什么吗?

 /usr/src/Pootle-2.1.5# PootleServer Starting server, listening on port 8080. Traceback (most recent call last): File "/usr/local/bin/PootleServer", line 32, in <module> PootleServer.main() File "/usr/local/lib/python2.6/dist-packages/pootle/PootleServer.py", line 103, in main run_pootle(options, args) File "/usr/local/lib/python2.6/dist-packages/pootle/PootleServer.py", line 87, in run_pootle handler = AdminMediaHandler(WSGIHandler(), path) File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 652, in __init__ self.media_url = settings.ADMIN_MEDIA_PREFIX File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py", line 276, in __getattr__ self._setup() File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 40, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 73, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/usr/local/lib/python2.6/dist-packages/pootle/settings.py", line 200, in <module> LANGUAGES = override.find_languages(LOCALE_PATHS[0]) File "/usr/local/lib/python2.6/dist-packages/pootle/i18n/override.py", line 38, in find_languages dirs = os.listdir(locale_path) OSError: [Errno 2] No such file or directory: '/usr/share/pootle/mo' 

我无法克服这个错误。 请帮我正确设置PootleServer。

安装软件

 /usr/src/Pootle-2.1.5# PootleServer --version Pootle 2.1.5 Translate Toolkit 1.8.1 Django 1.2.5 

Ubuntu 9.04

我的猜测是,你在那里丢失的mo目录与这里引用的mo目录相同,这表明setup.py有一个build_mo命令。

也就是说,似乎其余的pootle是使用/usr/local的PREFIX安装的,所以mo目录可能位于/usr/local/share/pootle/mo ,您需要跟踪configuration和修复它,或者如果没有configuration,如果你安装了默认以外的地方(把文件夹移动到/usr/share ),那么就会对项目提交一个bug来遵守安装PREFIX。