Skip to content

Commit e470c39

Browse files
Merge branch '3.10' of https://github.com/python-docs-tr/python-docs-tr into 3.10
2 parents 614e333 + 01f0a85 commit e470c39

File tree

5 files changed

+447
-111
lines changed

5 files changed

+447
-111
lines changed

Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,39 @@ serve:
109109

110110
.PHONY: progress
111111
progress:
112-
@$(PYTHON) -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \
112+
ifeq ($(file),)
113+
@echo "No file specified, showing total progress"; \
114+
$(PYTHON) -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \
113115
$(shell msgcat *.po */*.po | msgattrib --translated | grep -c '^msgid') \
114116
$(shell msgcat *.po */*.po | grep -c '^msgid')
115117

118+
else
119+
@$(PYTHON) -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \
120+
$(shell msgcat $(file) | msgattrib --translated | grep -c '^msgid') \
121+
$(shell msgcat $(file) | grep -c '^msgid')
122+
endif
123+
116124

117125
.PHONY: todo
118126
todo: ensure_prerequisites
119127
potodo --exclude venv .venv $(EXCLUDED)
120128

121129
.PHONY: wrap
122130
wrap: ensure_prerequisites
131+
ifeq ($(fix),)
123132
@echo "Verify wrapping"
124133
powrap --check --quiet *.po **/*.po
125134

135+
else
136+
ifeq ($(file),)
137+
@echo "Checking and fixing wrapping"
138+
powrap *.po **/*.po
139+
else
140+
@echo "Fixing wrapping in $(file)"
141+
powrap $(file)
142+
endif
143+
endif
144+
126145
SRCS = $(shell git diff --name-only $(BRANCH) | grep '.po$$')
127146
# foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out
128147
DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS)))

0 commit comments

Comments
 (0)