mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-24 15:23:33 +01:00
6c7b5e322d
Before:
* Translations were imported from Crowdin via Gitea
* New strings were added by Forgejo in feature branches but never translated
* The build/merge-forgejo-locales.go script in the forgejo-i18n branch
added/replaced Forgejo specific strings in the translated files at
build time
* Conflicts arising from Gitea changes in locale_en-US.ini were resolved by moving around
Forgejo strings
Transition:
* The build/merge-forgejo-locales.go is run once on the source
* The result is commited to the forgejo-development branch
After:
* Translation are exported and imported from translate.codeberg.org
* build/crowdin-to-weblate.sh run is run when rebasing (soft-fork)
or cherry-picking (hard-fork) to collect new translations from
Crowdin via Gitea
* In case of a conflict Forgejo translations are authoritative
* In the absence of a conflict Crowdin translations are uploaded to Weblate
(cherry picked from commit 9b5b714048
)
27 lines
494 B
Bash
Executable file
27 lines
494 B
Bash
Executable file
#!/bin/bash
|
|
# Copyright 2024 The Forgejo Authors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
D=/tmp/crowdin-to-weblate
|
|
mkdir -p $D
|
|
|
|
function checkout() {
|
|
if test -d $D/gitea ; then
|
|
git -C $D/gitea reset --hard
|
|
return
|
|
fi
|
|
|
|
git clone --depth 1 https://github.com/go-gitea/gitea $D/gitea
|
|
}
|
|
|
|
function replace() {
|
|
go run build/merge-forgejo-locales.go $D/gitea/options/locale
|
|
cp -a $D/gitea/options/locale/* options/locale
|
|
}
|
|
|
|
function run() {
|
|
checkout
|
|
replace
|
|
}
|
|
|
|
"$@"
|