<commit_before>
VERGEN = ../../tools/vergen
PREFIX?=	/usr
LOCALE_DIR   = $(DESTDIR)$(PREFIX)/share/locale
MO_FILE      = openxpki.mo
INSTALL      = install
LANGS         = en_GB de_DE ru_RU
PO_SOURCES   = $(LANGS:%=%/openxpki.po)
MO_TRANSLATIONS = $(LANGS:%=%/$(MO_FILE))
POT_SOURCES  = ../perl-modules ../clients ../deployment
VERSION_FILE    = ./VERSION

#---- variable settings above, rules below ----

.PHONY:	default test install clean clean.local distclean openxpki.pot

default::	$(MO_TRANSLATIONS)
	@echo Languages: $(LANGS)

$(PO_SOURCES):	openxpki.pot
	@if (test ! -d $(@:openxpki.po=)); then echo creating directory for $(@:openxpki.po=); mkdir $(@:openxpki.po=); fi
	@if (test ! -e $@); then echo creating po file $@; cp openxpki.pot $@; fi
	msgmerge --update $@ openxpki.pot
	@rm -f $@~
	@perl convert.pl $@ > $@_utf8 2>/dev/null
	@if (test ! -z `diff $@ $@_utf8`); then echo no utf8; exit 1; fi
	@rm -f $@_utf8

## do not depend on openxpki.pot or some directories - this does not work
scan:
	sh build-pot.sh $(POT_SOURCES) > openxpki.pot
	make $(PO_SOURCES)

install::	$(LANGS)
	make install_dir DIR=$(LOCALE_DIR)
	set -e; for lang in $(LANGS); do \
		make install_dir DIR=$(LOCALE_DIR)/$$lang; \
		make install_dir DIR=$(LOCALE_DIR)/$$lang/LC_MESSAGES; \
		$(INSTALL) -m 644 $$lang/$(MO_FILE) $(LOCALE_DIR)/$$lang/LC_MESSAGES/$(MO_FILE); \
	done

install_dir:
	@if (test ! -d $(DIR)); then \
		$(INSTALL) -m 755 -d $(DIR); \<commit_msg>modified Makefile not to automatically use the .pot file to update .po sources<commit_after>
VERGEN = ../../tools/vergen
PREFIX?=	/usr
LOCALE_DIR   = $(DESTDIR)$(PREFIX)/share/locale
MO_FILE      = openxpki.mo
INSTALL      = install
LANGS         = en_GB de_DE ru_RU
PO_SOURCES   = $(LANGS:%=%/openxpki.po)
MO_TRANSLATIONS = $(LANGS:%=%/$(MO_FILE))
POT_SOURCES  = ../perl-modules ../clients ../deployment
VERSION_FILE    = ./VERSION

#---- variable settings above, rules below ----

.PHONY:	default test install clean clean.local distclean openxpki.pot

default::	$(MO_TRANSLATIONS)
	@echo Languages: $(LANGS)

$(PO_SOURCES)::
	@if (test ! -d $(@:openxpki.po=)); then echo creating directory for $(@:openxpki.po=); mkdir $(@:openxpki.po=); fi
	@if (test ! -e $@); then echo creating po file $@; cp openxpki.pot $@; fi
	msgmerge --update $@ openxpki.pot
	@rm -f $@~
	@perl convert.pl $@ > $@_utf8 2>/dev/null
	@if (test ! -z `diff $@ $@_utf8`); then echo no utf8; exit 1; fi
	@rm -f $@_utf8

## do not depend on openxpki.pot or some directories - this does not work
scan:
	sh build-pot.sh $(POT_SOURCES) > openxpki.pot
	make $(PO_SOURCES)

install::	$(LANGS)
	make install_dir DIR=$(LOCALE_DIR)
	set -e; for lang in $(LANGS); do \
		make install_dir DIR=$(LOCALE_DIR)/$$lang; \
		make install_dir DIR=$(LOCALE_DIR)/$$lang/LC_MESSAGES; \
		$(INSTALL) -m 644 $$lang/$(MO_FILE) $(LOCALE_DIR)/$$lang/LC_MESSAGES/$(MO_FILE); \
	done

install_dir:
	@if (test ! -d $(DIR)); then \
		$(INSTALL) -m 755 -d $(DIR); \
{'fraction_non_alphanumeric': 0.18194115657761245, 'fraction_numerical': 0.008116334122421373, 'mean_word_length': 3.687797147385103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4291308', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1145, 'n_words': 305}