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

@@ -140,9 +140,12 @@ info "preparing electrum-locale."
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
)

View File

@@ -7,7 +7,6 @@ CONTRIB="$PROJECT_ROOT/contrib"
CONTRIB_SDIST="$CONTRIB/build-linux/sdist"
DISTDIR="$PROJECT_ROOT/dist"
BUILDDIR="$CONTRIB_SDIST/build"
LOCALE="$PROJECT_ROOT/electrum/locale"
. "$CONTRIB"/build_tools_util.sh
@@ -25,16 +24,20 @@ if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then
"$CONTRIB"/make_packages.sh || fail "make_packages failed"
fi
git submodule update --init
info "preparing electrum-locale."
(
cd "$PROJECT_ROOT"
git submodule update --init
LOCALE="$PROJECT_ROOT/electrum/locale/"
cd "$LOCALE"
git clean -ffxd
git reset --hard
# By default, include both source (.po) and compiled (.mo) locale files in the source dist.
# Set option OMIT_UNCLEAN_FILES=1 to exclude the compiled locale files
# see https://askubuntu.com/a/144139 (also see MANIFEST.in)
rm -rf "$LOCALE"
cp -r "$CONTRIB/deterministic-build/electrum-locale/locale/" "$LOCALE/"
if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then
"$CONTRIB/build_locale.sh" "$LOCALE" "$LOCALE"
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/locale"
fi
)