1
0

mv git submodule electrum-locale from contrib to electrum/locale

- this merges `contrib/deterministic-build/locale` and `electrum/locale`
- it is now once again possible have translations when running from a local git clone
    - which was already possible in the past before crowdin removed their unauthenticated APIs
        - see https://github.com/spesmilo/electrum/issues/9531
    - however, the translations available are the often-old frozen strings from electrum-locale
        - while previously one could just download the latest strings from crowdin
This commit is contained in:
SomberNight
2025-04-08 15:56:35 +00:00
parent bd0085e680
commit 3567a4cfb0
15 changed files with 81 additions and 72 deletions

View File

@@ -6,7 +6,6 @@ CONTRIB_ANDROID="$(dirname "$(readlink -e "$0")")"
CONTRIB="$CONTRIB_ANDROID"/..
PROJECT_ROOT="$CONTRIB"/..
PACKAGES="$PROJECT_ROOT"/packages/
LOCALE="$PROJECT_ROOT"/electrum/locale/
. "$CONTRIB"/build_tools_util.sh
@@ -20,17 +19,19 @@ if [ ! -d "$PACKAGES" ]; then
"$CONTRIB"/make_packages.sh || fail "make_packages failed"
fi
pushd "$PROJECT_ROOT"
git submodule update --init
popd
# update locale
info "preparing electrum-locale."
(
cd "$PROJECT_ROOT"
git submodule update --init
LOCALE="$PROJECT_ROOT/electrum/locale/"
cd "$LOCALE"
git clean -ffxd
git reset --hard
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/locale"
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
rm -rf "$LOCALE"
"$CONTRIB/build_locale.sh" "$CONTRIB/deterministic-build/electrum-locale/locale/" "$LOCALE"
rm -r locale/*/electrum.po
)
pushd "$CONTRIB_ANDROID"