Reputation: 6649
Versions:
I followed the rosetta tutorial. After creating some sentences to translate in a template using {% trans "sentence" %}
(and {% load i18n %}
), and running django-admin
's makemessages
and compilemessages
, rosetta still cannot find anything to translate:
Nothing to translate!
You haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.
Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project.
Notes:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-13 13:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: templates/www/batch.html:8
msgid "(mother) and"
msgstr ""
#: templates/www/batch.html:8
msgid "(father)"
msgstr ""
settings.py
's LANGUAGES
list. No effect, except I had to solve yet another bug.LOCALE_PATHS
suggested in this question.runserver
(via PyCharm). Local development.I can't think of or find anything more to try.
Upvotes: 1
Views: 812
Reputation: 1
This worked for me:
create locale
directory in project root
run django-admin makemessages -l fa -i myenv
Upvotes: 0