From acd4275acbada93b49c0baabfc5bd9db2ebbca6c 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 68c744111d02a0cd93716a8f75442ad85f44243b) (cherry picked from commit 30d7c4a8998baf957b8a156789cc6601d4e87628) (cherry picked from commit 220ac0a6d3579da5d9c1a028cdd59511f3e97a88) (cherry picked from commit 21cb16af9502c0c14aae30eee3a65d4c14be3cbe) (cherry picked from commit 41a9373e3e78f050bb07ea475fdbf3261cf694b2) (cherry picked from commit 69030f7803c175706946af5fb8956d19aa7d2bec) (cherry picked from commit 92c4d4d2e6bf7f100feb5c85a9ae78afea2adbd8) (cherry picked from commit c1bfd1730e79c6c1720df99f367ddc030282f7e3) (cherry picked from commit 18a9a9e73cdea5bd501b10a2fde0d39be74d7f25) (cherry picked from commit 07f988207303011b3f645dc515ff855c0317507f) (cherry picked from commit e71b8061d4297fe2336cbf404046c1fdd8332fc6) (cherry picked from commit 225b30f1f77cd5edd06ca4a271a64029b0391d7e) (cherry picked from commit fdf98910039a98009e3c38be00db1785fe4292e7) (cherry picked from commit df2f4134764a4811a4f012193b93b2d1b8a2749b) (cherry picked from commit b01c755aaf634dd0f4c436ad90eda47f6e901afd) --- .gitignore | 3 +++ Makefile | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 4afa93123b..ad75c8c845 100644 --- a/.gitignore +++ b/.gitignore @@ -116,3 +116,6 @@ prime/ # Manpage /man + +# Generated merged Forgejo+Gitea language files +/options/locale/locale_* diff --git a/Makefile b/Makefile index a640c4df82..a5850064a3 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: + $(GO) run build/merge-forgejo-locales.go + .PHONY: security-check security-check: go run $(GOVULNCHECK_PACKAGE) ./... @@ -1003,13 +1007,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: