From 79bcbf1743781bb57d6b5b93ef467e945bd5cecb Mon Sep 17 00:00:00 2001 From: Antoine <43954001+awecx@users.noreply.github.com> Date: Tue, 10 Dec 2019 13:57:17 +0100 Subject: [PATCH] Pospell + rapide (#991) --- .gitignore | 1 + Makefile | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 28894835..483f8d8a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ venv/ .idea/ .DS_Store +.pospell/ diff --git a/Makefile b/Makefile index e0a2ce8f..f72132e6 100644 --- a/Makefile +++ b/Makefile @@ -35,11 +35,11 @@ UPSTREAM := https://github.com/python/cpython VENV := $(shell pwd)/venv/ PYTHON := $(shell which python3) MODE := html +POSPELL_TMP_DIR := .pospell/ WORKTREES := $(VENV)/worktrees/ WORKTREE := $(WORKTREES)/$(CPYTHON_CURRENT_COMMIT)/ JOBS := auto - .PHONY: all all: setup mkdir -p $(WORKTREE)/locales/$(LANGUAGE)/LC_MESSAGES/ @@ -109,9 +109,17 @@ todo: venv wrap: venv $(VENV)/bin/powrap --check --quiet *.po **/*.po +SRCS = $(shell git diff --name-only $(BRANCH) | grep '.po$$') +# foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out +DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS))) + .PHONY: spell -spell: venv - $(VENV)/bin/pospell -p dict -l fr_FR *.po **/*.po +spell: venv $(DESTS) + +$(POSPELL_TMP_DIR)/%.po.out: %.po dict + @echo "Checking $<..." + @mkdir -p $(@D) + @$(VENV)/bin/pospell -p dict -l fr_FR $< && touch $@ .PHONY: fuzzy fuzzy: venv @@ -149,5 +157,5 @@ merge: setup .PHONY: clean clean: - rm -fr venv + rm -fr venv $(POSPELL_TMP_DIR) find -name '*.mo' -delete