UpdateTranslationScript (#3396)

This commit is contained in:
Krosus777
2025-09-18 10:12:57 +02:00
committed by GitHub
parent cad32f4a26
commit 0fee8f533a
2 changed files with 30 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
chardet==5.2.0
fluent==0.10.0
pydash==8.0.5
typing_extensions==4.9.0
typing_extensions==4.12.2
PyYAML==6.0.2

37
Tools/ss14_ru/translation.sh Normal file → Executable file
View File

@@ -1,12 +1,33 @@
#!/usr/bin/env sh
#!/usr/bin/env sh
# make sure to start from script dir
if [ "$(dirname $0)" != "." ]; then
cd "$(dirname $0)"
if [ "$(dirname "$0")" != "." ]; then
cd "$(dirname "$0")"
fi
pip install -r requirements.txt --no-warn-script-location
python3 ./yamlextractor.py
python3 ./keyfinder.py
python3 ./clean_duplicates.py
python3 ./clean_empty.py
# pick Python and Pip in a way that respects a venv if active
if command -v python3 >/dev/null 2>&1; then
PY=python3
else
PY=python
fi
if "$PY" -m pip --version >/dev/null 2>&1; then
PIP="$PY -m pip"
elif command -v pip >/dev/null 2>&1; then
PIP=pip
elif command -v pip3 >/dev/null 2>&1; then
PIP=pip3
else
echo "Warning: pip not found; skipping dependency install" >&2
PIP=""
fi
if [ -n "$PIP" ]; then
$PIP install -r requirements.txt --no-warn-script-location
fi
$PY ./yamlextractor.py
$PY ./keyfinder.py
$PY ./clean_duplicates.py
$PY ./clean_empty.py