<commit_before># Makefile include

POT=$(LOCALES)$(DOMAIN).pot
LANGUAGES=$(LANGUAGES_INCLUDE) $(LANGUAGES_OTHER)
JSON_INCLUDE=$(addsuffix .json, $(addprefix $(LOCALES), $(LANGUAGES_INCLUDE)))
JSON_OTHER=$(addsuffix .jsonpath, $(addprefix $(LOCALES), $(LANGUAGES_OTHER)))


default: combine

extract:
	mkdir -p $(LOCALES)
	i19extract $(POT) $(POT).i19n $(HTML)

init: extract
	for L in $(LANGUAGES); do \
		pybabel init -D $(DOMAIN) -i $(POT) -d $(LOCALES) -l $$L; done

update: extract
	for L in $(LANGUAGES); do \
		pybabel update -D $(DOMAIN) -i $(POT) -d $(LOCALES) -l $$L; done

compile: update
	for L in $(LANGUAGES); do \
		i19json $(LOCALES)$$L/LC_MESSAGES/$(DOMAIN).po $$L $(POT).i19n $(LOCALES)$$L.json; \
		echo "{\"$$L\": \"$(LOCALES)$$L.json\"}" > $(LOCALES)$$L.jsonpath; \
    done
<commit_msg>support prepending a base path to JSON urls<commit_after># Makefile include

POT=$(LOCALES)$(DOMAIN).pot
LANGUAGES=$(LANGUAGES_INCLUDE) $(LANGUAGES_OTHER)
JSON_INCLUDE=$(addsuffix .json, $(addprefix $(LOCALES), $(LANGUAGES_INCLUDE)))
JSON_OTHER=$(addsuffix .jsonpath, $(addprefix $(LOCALES), $(LANGUAGES_OTHER)))


default: combine

extract:
	mkdir -p $(LOCALES)
	i19extract $(POT) $(POT).i19n $(HTML)

init: extract
	for L in $(LANGUAGES); do \
		pybabel init -D $(DOMAIN) -i $(POT) -d $(LOCALES) -l $$L; done

update: extract
	for L in $(LANGUAGES); do \
		pybabel update -D $(DOMAIN) -i $(POT) -d $(LOCALES) -l $$L; done

compile: update
	for L in $(LANGUAGES); do \
		i19json $(LOCALES)$$L/LC_MESSAGES/$(DOMAIN).po $$L $(POT).i19n $(LOCALES)$$L.json; \
		echo "{\"$$L\": \"$(BASEURL)$(LOCALES)$$L.json\"}" > $(LOCALES)$$L.jsonpath; \
    done

{'fraction_non_alphanumeric': 0.2097944377267231, 'fraction_numerical': 0.009673518742442563, 'mean_word_length': 4.827464788732394, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, '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': '1236095', 'n_tokens_mistral': 708, 'n_tokens_neox': 641, 'n_words': 165}