﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37188	compilemessages  should ignore common environment and dependency directories by default	Ayoub Bouaik	Ayoub Bouaik	"The `compilemessages` management command recursively traverses the entire project tree looking for `locale` directories. However, it currently lacks default ignore patterns for common python virtual environments (`venv`, `.venv`, `env`, `.env`) and modern frontend package management directories (`node_modules`). 

Because of this, if a project contains a third-party package inside `node_modules` or a local virtual environment that includes localized files with formatting quirks (such as a Byte Order Mark), `compilemessages` attempts to process them, resulting in unexpected execution overhead or critical crashes on files the developer did not write.

**Steps to Reproduce**
Inside a clean project workspace, run the following commands to simulate a third-party dependency with a BOM-encoded translation file:

1. Create a dummy package locale path:
   `mkdir -p node_modules/mock-package/locale/en/LC_MESSAGES/`

2. Add a dummy translation file containing a UTF-8 BOM flag:
   `printf '\xEF\xBB\xBF# Dummy translation file\nmsgid """"\nmsgstr """"\n' > node_modules/mock-package/locale/en/LC_MESSAGES/django.po`

3. Attempt to compile messages:
   `python manage.py compilemessages`

**Expected Behavior**
Django should automatically skip top-level dependency and virtual environment folders like `node_modules`, `venv`, and `.venv` unless explicitly instructed otherwise via the `-i` / `--ignore` CLI flags.

**Actual Output / Traceback**
`The /home/ayoub/django_test/node_modules/mock-package/locale/en/LC_MESSAGES/django.po file has a BOM (Byte Order Mark). Django only` `supports .po files encoded in UTF-8 and without any BOM.`
`CommandError: compilemessages generated one or more errors.`"	Bug	assigned	Core (Management commands)	dev	Normal		i18n, compilemessages, venv, node_modules	Ayoub Bouaik	Unreviewed	0	0	0	0	1	0
