Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c5344e

Browse files
committed
Modify Makefile
1 parentd86bcc2 commit0c5344e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
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)

[8]ページ先頭

©2009-2025 Movatter.jp