【发布时间】:2020-06-23 18:22:24
【问题描述】:
当 .mo 文件从 .../LC_MESSAGES 中删除但 .po 文件存在时,我的应用程序中的 Gettext 会出现以下错误:
No translation file found for domain', domain)
FileNotFoundError: [Errno 2] No translation file found for domain: 'bot'
可能是什么原因?我看到了一些没有 .mo 文件的项目,它们工作正常。例如,.mo 文件在 Python gitignore 文件(https://github.com/github/gitignore/blob/master/Python.gitignore; 第 55 行)中声明,因此应将它们从存储库中删除。
【问题讨论】: