Coverage for app/venv/lib/python3.14/site-packages/weblate/utils/management/commands/compilemessages.py: 0%

10 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 07:15 +0000

1# Copyright © Michal Čihař <michal@weblate.org> 

2# 

3# SPDX-License-Identifier: GPL-3.0-or-later 

4from __future__ import annotations 

5 

6from django.core.management.commands.compilemessages import Command as BaseCommand 

7 

8from weblate.utils.files import should_skip 

9 

10 

11class Command(BaseCommand): 

12 # We just remove --format-check as it just complicates things 

13 # for some translations 

14 program_options = [] # noqa: RUF012 

15 

16 def compile_messages(self, locations) -> None: 

17 # Avoid compiling po files in DATA_DIR 

18 locations = [location for location in locations if not should_skip(location[0])] 

19 if not locations: 

20 return 

21 super().compile_messages(locations)