From 9be232ae3aa6da29c99d80fea38edf831e2f41f9 Mon Sep 17 00:00:00 2001 From: fnetx Date: Wed, 14 Dec 2022 19:56:57 +0100 Subject: [PATCH] [I18N] Makefile + gitignore (cherry picked from commit 75da77f3d765b5f3cb5e83e308f58ecf661db36b) --- .gitignore | 3 +++ Makefile | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 6d9eceb30f..6ec3c3faed 100644 --- a/.gitignore +++ b/.gitignore @@ -115,3 +115,6 @@ prime/ # Manpage /man + +# Generated merged Forgejo+Gitea language files +/options/locale/locale_* diff --git a/Makefile b/Makefile index 8745cd8d16..5805e24cdd 100644 --- a/Makefile +++ b/Makefile @@ -748,10 +748,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: + $(GO) run build/merge-forgejo-locales.go + .PHONY: security-check security-check: govulncheck -v ./... @@ -908,13 +912,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: