mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
feat: add a make add string command to add new localized strings
This commit is contained in:
parent
d53dc4cf28
commit
12ca7aa085
1 changed files with 10 additions and 0 deletions
10
Makefile
10
Makefile
|
@ -116,6 +116,16 @@ run:
|
||||||
clean:
|
clean:
|
||||||
@ rm -f $(APP)-* $(APP) $(APP)*.rpm $(APP)*.deb $(APP)*.exe $(APP)*.sha256
|
@ rm -f $(APP)-* $(APP) $(APP)*.rpm $(APP)*.deb $(APP)*.exe $(APP)*.sha256
|
||||||
|
|
||||||
|
.PHONY: add-string
|
||||||
|
add-string:
|
||||||
|
cd internal/locale/translations && \
|
||||||
|
for file in *.json; do \
|
||||||
|
jq --indent 4 --arg key "$(KEY)" --arg val "$(VAL)" \
|
||||||
|
'. + {($$key): $$val} | to_entries | sort_by(.key) | from_entries' "$$file" > tmp && \
|
||||||
|
mv tmp "$$file"; \
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -cover -race -count=1 ./...
|
go test -cover -race -count=1 ./...
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue