I have no issue with running django-admin makemessages --all from the base directory and the .po files are being generated inside the locale directory in my main app but I have an issue with generating the same files in my specific apps.
my project looks like this
├── about_page ((but this one is not filled)
___ en
___ de
___ es
___ fr
├── accessories
├── callibrators
├── careers
├── contact_page
├── db.sqlite3
├── dimensional_measurement
├── leak_testing
├── locale
___ en (these files are filled with .po files)
___ de
___ fr
___ es
├── manage.py
├── mysite
├── newsnevents_page
├── polls
├── products_page
└── services
my settings.py has
from django.utils.translation import gettext_lazy as _
LANGUAGES = [
('en', _('English')),
('de', _('German')),
('fr', _('French')),
('es', _('Spanish')),
]
LOCALE_PATHS = [
os.path.join(BASE_DIR, 'locale'),
os.path.join(BASE_DIR, 'about_page', 'locale'),
]
# Application definition
INSTALLED_APPS = [
'polls.apps.PollsConfig',
'about_page.apps.AboutPageConfig',
'contact_page.apps.ContactConfig',
'products_page.apps.ProductsPageConfig',
'careers.apps.CareersConfig',
'newsnevents_page.apps.NewsneventsPageConfig',
'dimensional_measurement.apps.DimensionalMeasurementConfig',
'leak_testing.apps.LeakTestingConfig',
'callibrators.apps.CallibratorsConfig',
'services.apps.ServicesConfig',
'accessories.apps.AccessoriesConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_recaptcha',
'rosetta', #NEW
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'mysite.urls'
when I execute this from the project’s base directory
django-admin makemessages --all
the locale in base directory is filled but the about_page’s locale directory is not filled with the translation files. Here I attached a view from the Rosetta site.
When I execute
django-admin makemessages --all , from the about_page app directory,
I get
kaan@kaan-GF63-Thin-11UC:~/kao_website/mysite/about_page$ django-admin makemessages --all
processing locale de
processing locale es
processing locale en
processing locale fr
but these files are empty.
I attached rosetta view of my project