Skip to content

Commit

Permalink
Add check for fuzzy messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pehala committed Sep 20, 2023
1 parent 84c8eb5 commit 1d0d7e8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
.PHONY: commit-acceptance pylint black reformat pre-commit locale migrations deploy
.PHONY: commit-acceptance pylint black reformat pre-commit locale migrations deploy check-fuzzy run

commit-acceptance: black pylint
pre-commit: locale migrations
pre-commit: messages migrations reformat

RUN = poetry run
MANAGE = $(RUN) python manage.py

SETTINGS ?= chords.settings.production

pylint:
$(RUN) pylint backend/ chords/ pdf/ frontend/ category/ analytics/ --django-settings-module=$(SETTINGS)
$(RUN) pylint backend/ chords/ pdf/ frontend/ category/ analytics/ pdf/ --django-settings-module=$(SETTINGS)

black:
$(RUN) black --check . --diff

reformat:
$(RUN) black .

locale:
check-fuzzy:
@ for app in "backend" "chords" "pdf" "frontend" "category" "analytics" ; do \
if [ ! -z "$$(msgattrib $${app}/locale/cs/LC_MESSAGES/django.po --only-fuzzy)" ]; then echo "$${app} app contains fuzzy strings" && exit 1; fi \
done;

messages:
$(MANAGE) makemessages -l cs

migrations:
Expand Down

0 comments on commit 1d0d7e8

Please sign in to comment.