Skip to content

Commit 9be232a

Browse files
fnetXLoïc Dachary
authored andcommitted
[I18N] Makefile + gitignore
(cherry picked from commit 75da77f3d765b5f3cb5e83e308f58ecf661db36b)
1 parent ce880f2 commit 9be232a

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,6 @@ prime/
115115

116116
# Manpage
117117
/man
118+
119+
# Generated merged Forgejo+Gitea language files
120+
/options/locale/locale_*

Makefile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,14 @@ generate: generate-backend
748748
generate-backend: $(TAGS_PREREQ) generate-go
749749

750750
.PHONY: generate-go
751-
generate-go: $(TAGS_PREREQ)
751+
generate-go: $(TAGS_PREREQ) merge-locales
752752
@echo "Running go generate..."
753753
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)
754754

755+
.PHONY: merge-locales
756+
merge-locales:
757+
$(GO) run build/merge-forgejo-locales.go
758+
755759
.PHONY: security-check
756760
security-check:
757761
govulncheck -v ./...
@@ -908,13 +912,7 @@ lockfile-check:
908912

909913
.PHONY: update-translations
910914
update-translations:
911-
mkdir -p ./translations
912-
cd ./translations && curl -L https://crowdin.com/download/project/gitea.zip > gitea.zip && unzip gitea.zip
913-
rm ./translations/gitea.zip
914-
$(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini
915-
$(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
916-
mv ./translations/*.ini ./options/locale/
917-
rmdir ./translations
915+
# noop to detect merge conflicts (potentially needs updating the scripts) and avoid breaking with Gitea
918916

919917
.PHONY: generate-license
920918
generate-license:

0 commit comments

Comments
 (0)