<commit_before>
all: $(wildcard *.po)

%.po: udiskie.pot
	if [ -f $@ ]; then \
        msgmerge --update $@ $< ;\
    else \
        msginit --output=$@ --input=$< --locale=en_US ;\
    fi

# Make .pot phony because make doesn't play well with git
.PHONY: udiskie.pot
udiskie.pot: $(wildcard ../udiskie/*.py)
	xgettext --language=Python --keyword=_ --output=$@ --from-code=UTF-8 $^

<commit_msg>Keep .pot file stable in case of no changes<commit_after>
all: $(wildcard *.po)

%.po: udiskie.pot
	if [ -f $@ ]; then \
        msgmerge --update $@ $< ;\
    else \
        msginit --output=$@ --input=$< --locale=en_US ;\
    fi

# Make .pot phony because make doesn't play well with git
.PHONY: udiskie.pot
udiskie.pot: $(wildcard ../udiskie/*.py)
	xgettext --language=Python --keyword=_ --output=$@ --from-code=UTF-8 $^
	if [[ $$( git diff --numstat -- $@ | cut -f1 ) -le 1 ]]; then \
		git checkout -- $@; \
	fi
{'fraction_non_alphanumeric': 0.20197585071350166, 'fraction_numerical': 0.0043907793633369925, 'mean_word_length': 2.390334572490706, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '451230', 'n_tokens_mistral': 362, 'n_tokens_neox': 337, 'n_words': 94}