diff --git a/engine/core/management/commands/demo_data.py b/engine/core/management/commands/demo_data.py index 195f4dca..3858ab6e 100644 --- a/engine/core/management/commands/demo_data.py +++ b/engine/core/management/commands/demo_data.py @@ -10,6 +10,7 @@ from django.core.files.base import ContentFile from django.core.management.base import BaseCommand from django.db import transaction from django.utils import timezone +from django.utils.translation import override from engine.blog.models import Post, PostTag from engine.core.models import ( @@ -86,12 +87,13 @@ class Command(BaseCommand): self._load_demo_data() - if action == "install": - self._install(options) - elif action == "remove": - self._remove() - else: - self.stdout.write(self.style.ERROR(f"Unknown action: {action}")) + with override("en"): + if action == "install": + self._install(options) + elif action == "remove": + self._remove() + else: + self.stdout.write(self.style.ERROR(f"Unknown action: {action}")) @property def staff_user(self):