无法找到一个区域设置路径来存储文件__init__.py的翻译 [英] Unable to find a locale path to store translations for file __init__.py

查看:141
本文介绍了无法找到一个区域设置路径来存储文件__init__.py的翻译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试翻译一个Django应用。我在我的模板中创建了一些 {%trans%} 的字符串。但是,当我在我的应用程序文件夹中执行以下命令时,我收到一条错误消息:

I'm trying to translate a Django app. I created some strings with {% trans %} in my templates. However, when I execute the following command in my app folder, I receive an error message:

$ django-admin.py makemessages -l fr 
CommandError: Unable to find a locale path to store translations for file __init__.py`



What did I do wrong?

推荐答案

原来你需要创建一个 locale 文件夹首先使用 mkdir locale

这篇关于无法找到一个区域设置路径来存储文件__init__.py的翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆