From 80eb392c5c2c6e6decb7f99873c3dc7d6b300dd6 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) (cherry picked from commit acd4275acbada93b49c0baabfc5bd9db2ebbca6c) [I18N] Add Locale merger script (squash: compile on windows) Fixes: https://codeberg.org/forgejo/forgejo/issues/798 (cherry picked from commit b47b205e85f115b2493bd4c3a25c199196228d7a) (cherry picked from commit 1521f0bfd6747d0ad0d9c5e70c4c0b1d948e178e) (cherry picked from commit 7f988de42c6934105399985c7dd652ce81b79b3f) (cherry picked from commit d26b4913129e13c3afde69cd6c6db948e7789e3e) (cherry picked from commit 60136bac666f588179dbe1a9d98df0f82fcfb7de) (cherry picked from commit 915bb4b3542b14cc5f0e4d9feb3b8fa55a6d8440) (cherry picked from commit 3e1b42a8ca84a6abb81d4dfaf84ea7be383e7a37) (cherry picked from commit 18d8fc075fa6002fc1af0374005801cdeffc185d) (cherry picked from commit 1d9f95687b395df973e19d97294fca16b6f233e6) (cherry picked from commit e49da1a90d2358f18510d8e2e45448b24386f34e) (cherry picked from commit a182baed8a6a139dc473aa74797cdc404c206a72) (cherry picked from commit 3e48a87c0044b38dc8a9594c0dd14921a40f7e0b) (cherry picked from commit e0bb406c146408739f3140182082e910ac5b874c) (cherry picked from commit e45ec160f95f35a156423f98d7e8b0479184e197) (cherry picked from commit e89ec6d0086aedd0fddc2ee282b7a0f2c87b917a) --- .gitignore | 3 +++ Makefile | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f89f5021b1..878ab3bc81 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,6 @@ prime/ # Manpage /man + +# Generated merged Forgejo+Gitea language files +/options/locale/locale_* diff --git a/Makefile b/Makefile index 78b35120cc..ac300a8d08 100644 --- a/Makefile +++ b/Makefile @@ -833,10 +833,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) ./... @@ -1006,13 +1010,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: