mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 00:54:51 +01:00
UpdateTranslationScript (#3396)
This commit is contained in:
@@ -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
37
Tools/ss14_ru/translation.sh
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user