From 99272834bbab29fac3881a46fd144ab327746eac 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 dd055526a84bc253263ac363f866425511221297) (cherry picked from commit 098e709b0c2ba7a1dfbb5e38004d7ff2d84eaf17) (cherry picked from commit 2271f5a8d33598ef1272c3c72cb8095e76e4e373) (cherry picked from commit 06798f3e082b86595c406b613a9682bd2ad2d4af) (cherry picked from commit 31c7dc0dcb5d4005e4704519c3ce93179429434b) (cherry picked from commit bb80efd62fbeca3ec81c69cf1d6d614817955c0c) (cherry picked from commit fe6d9f1672138cf49d57e44352d9fe4edde482eb) (cherry picked from commit ab4cae98576de25e1ee1cb17dfb1d523ceb73bb5) (cherry picked from commit 3e84897381e442771b746f36521d06b4daa8056b) --- .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 c3861be60a..ccb6d21e75 100644 --- a/Makefile +++ b/Makefile @@ -772,10 +772,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) -v ./... @@ -934,13 +938,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: