forked from AFPy/python-docs-fr
Pospell + rapide (#991)
This commit is contained in:
parent
5d7112d2b7
commit
79bcbf1743
|
@ -3,3 +3,4 @@
|
||||||
venv/
|
venv/
|
||||||
.idea/
|
.idea/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.pospell/
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -35,11 +35,11 @@ UPSTREAM := https://github.com/python/cpython
|
||||||
VENV := $(shell pwd)/venv/
|
VENV := $(shell pwd)/venv/
|
||||||
PYTHON := $(shell which python3)
|
PYTHON := $(shell which python3)
|
||||||
MODE := html
|
MODE := html
|
||||||
|
POSPELL_TMP_DIR := .pospell/
|
||||||
WORKTREES := $(VENV)/worktrees/
|
WORKTREES := $(VENV)/worktrees/
|
||||||
WORKTREE := $(WORKTREES)/$(CPYTHON_CURRENT_COMMIT)/
|
WORKTREE := $(WORKTREES)/$(CPYTHON_CURRENT_COMMIT)/
|
||||||
JOBS := auto
|
JOBS := auto
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: setup
|
all: setup
|
||||||
mkdir -p $(WORKTREE)/locales/$(LANGUAGE)/LC_MESSAGES/
|
mkdir -p $(WORKTREE)/locales/$(LANGUAGE)/LC_MESSAGES/
|
||||||
|
@ -109,9 +109,17 @@ todo: venv
|
||||||
wrap: venv
|
wrap: venv
|
||||||
$(VENV)/bin/powrap --check --quiet *.po **/*.po
|
$(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
|
.PHONY: spell
|
||||||
spell: venv
|
spell: venv $(DESTS)
|
||||||
$(VENV)/bin/pospell -p dict -l fr_FR *.po **/*.po
|
|
||||||
|
$(POSPELL_TMP_DIR)/%.po.out: %.po dict
|
||||||
|
@echo "Checking $<..."
|
||||||
|
@mkdir -p $(@D)
|
||||||
|
@$(VENV)/bin/pospell -p dict -l fr_FR $< && touch $@
|
||||||
|
|
||||||
.PHONY: fuzzy
|
.PHONY: fuzzy
|
||||||
fuzzy: venv
|
fuzzy: venv
|
||||||
|
@ -149,5 +157,5 @@ merge: setup
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -fr venv
|
rm -fr venv $(POSPELL_TMP_DIR)
|
||||||
find -name '*.mo' -delete
|
find -name '*.mo' -delete
|
||||||
|
|
Loading…
Reference in New Issue