contrib: mv locale-related scripts to contrib/locale/
This commit is contained in:
@@ -22,7 +22,7 @@ fi
|
||||
# update locale
|
||||
info "preparing electrum-locale."
|
||||
(
|
||||
"$CONTRIB/build_cleanlocale.sh"
|
||||
"$CONTRIB/locale/build_cleanlocale.sh"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||
)
|
||||
|
||||
@@ -136,7 +136,7 @@ break_legacy_easy_install
|
||||
|
||||
info "preparing electrum-locale."
|
||||
(
|
||||
"$CONTRIB/build_cleanlocale.sh"
|
||||
"$CONTRIB/locale/build_cleanlocale.sh"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||
)
|
||||
|
||||
@@ -52,6 +52,6 @@ The differences are as follows:
|
||||
found and used at runtime.
|
||||
- the normal tarball includes compiled (.mo) locale files, the source-only tarball does not.
|
||||
Both tarballs contain (.po) source locale files. If you are packaging for a Linux distro,
|
||||
you probably want to compile the .mo locale files yourself (see `contrib/build_locale.sh`).
|
||||
you probably want to compile the .mo locale files yourself (see `contrib/locale/build_locale.sh`).
|
||||
- the normal tarball includes generated `*_pb2.py` files. These are created
|
||||
using `protobuf-compiler` from `.proto` files (see `contrib/generate_payreqpb2.sh`)
|
||||
|
||||
@@ -26,7 +26,7 @@ fi
|
||||
|
||||
info "preparing electrum-locale."
|
||||
(
|
||||
"$CONTRIB/build_cleanlocale.sh"
|
||||
"$CONTRIB/locale/build_cleanlocale.sh"
|
||||
# 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)
|
||||
|
||||
@@ -18,7 +18,7 @@ info "Last commit: $VERSION"
|
||||
|
||||
info "preparing electrum-locale."
|
||||
(
|
||||
"$CONTRIB/build_cleanlocale.sh"
|
||||
"$CONTRIB/locale/build_cleanlocale.sh"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||
)
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
CONTRIB="$(dirname "$(readlink -e "$0")")"
|
||||
CONTRIB_LOCALE="$(dirname "$(readlink -e "$0")")"
|
||||
CONTRIB="$CONTRIB_LOCALE"/..
|
||||
PROJECT_ROOT="$CONTRIB"/..
|
||||
|
||||
cd "$PROJECT_ROOT"
|
||||
@@ -12,4 +13,4 @@ LOCALE="$PROJECT_ROOT/electrum/locale/"
|
||||
cd "$LOCALE"
|
||||
git clean -ffxd
|
||||
git reset --hard
|
||||
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/locale"
|
||||
"$CONTRIB_LOCALE/build_locale.sh" "$LOCALE/locale" "$LOCALE/locale"
|
||||
@@ -16,7 +16,7 @@ except ImportError as e:
|
||||
sys.exit(f"Error: {str(e)}. Try 'python3 -m pip install --user <module-name>'")
|
||||
|
||||
# set cwd
|
||||
project_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
project_root = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||
os.chdir(project_root)
|
||||
|
||||
locale_dir = os.path.join(project_root, "electrum", "locale")
|
||||
@@ -134,7 +134,7 @@ info "preparing electrum-locale."
|
||||
brew install gettext
|
||||
brew link --force gettext
|
||||
fi
|
||||
"$CONTRIB/build_cleanlocale.sh"
|
||||
"$CONTRIB/locale/build_cleanlocale.sh"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||
) || fail "failed generating locale"
|
||||
|
||||
Reference in New Issue
Block a user