File tree Expand file tree Collapse file tree 5 files changed +447
-111
lines changed Expand file tree Collapse file tree 5 files changed +447
-111
lines changed Original file line number Diff line number Diff line change @@ -109,20 +109,39 @@ serve:
109
109
110
110
.PHONY : progress
111
111
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])))' \
113
115
$(shell msgcat *.po */*.po | msgattrib --translated | grep -c '^msgid') \
114
116
$(shell msgcat *.po */*.po | grep -c '^msgid')
115
117
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
+
116
124
117
125
.PHONY : todo
118
126
todo : ensure_prerequisites
119
127
potodo --exclude venv .venv $(EXCLUDED )
120
128
121
129
.PHONY : wrap
122
130
wrap : ensure_prerequisites
131
+ ifeq ($(fix ) ,)
123
132
@echo "Verify wrapping"
124
133
powrap --check --quiet *.po **/*.po
125
134
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
+
126
145
SRCS = $(shell git diff --name-only $(BRANCH ) | grep '.po$$')
127
146
# foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out
128
147
DESTS = $(addprefix $(POSPELL_TMP_DIR ) /,$(addsuffix .out,$(SRCS ) ) )
You can’t perform that action at this time.
0 commit comments