CoderGuy123
CoderGuy123

Reputation: 6649

Rosetta can't find anything to translate "Nothing to translate!"

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 ""

I can't think of or find anything more to try.

Upvotes: 1

Views: 812

Answers (1)

Ehsan Bitaraf
Ehsan Bitaraf

Reputation: 1

This worked for me:

  1. create locale directory in project root

  2. run django-admin makemessages -l fa -i myenv

Upvotes: 0

Related Questions