diff --git a/.gitignore b/.gitignore index 8a3db033f2..7fe221ef9f 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,6 @@ prime/ # Manpage /man + +# Generated merged Forgejo+Gitea language files +/options/locale/locale_* diff --git a/Makefile b/Makefile index 6bcee87f9c..d7a2cad9a6 100644 --- a/Makefile +++ b/Makefile @@ -835,10 +835,14 @@ generate: generate-backend generate-backend: $(TAGS_PREREQ) generate-go .PHONY: generate-go -generate-go: $(TAGS_PREREQ) +generate-go: $(TAGS_PREREQ) merge-locales @echo "Running go generate..." @CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES) +.PHONY: merge-locales +merge-locales: + @CC= GOOS= GOARCH= $(GO) run build/merge-forgejo-locales.go + .PHONY: security-check security-check: go run $(GOVULNCHECK_PACKAGE) ./... @@ -996,13 +1000,7 @@ lockfile-check: .PHONY: update-translations update-translations: - mkdir -p ./translations - cd ./translations && curl -L https://crowdin.com/download/project/gitea.zip > gitea.zip && unzip gitea.zip - rm ./translations/gitea.zip - $(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini - $(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini - mv ./translations/*.ini ./options/locale/ - rmdir ./translations + # noop to detect merge conflicts (potentially needs updating the scripts) and avoid breaking with Gitea .PHONY: generate-license generate-license: