File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -109,20 +109,39 @@ serve:
109109
110110.PHONY : progress
111111progress :
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
118126todo : ensure_prerequisites
119127 potodo --exclude venv .venv $(EXCLUDED )
120128
121129.PHONY : wrap
122130wrap : 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+
126145SRCS = $(shell git diff --name-only $(BRANCH ) | grep '.po$$')
127146# foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out
128147DESTS = $(addprefix $(POSPELL_TMP_DIR ) /,$(addsuffix .out,$(SRCS ) ) )
You can’t perform that action at this time.
0 commit comments