Fixes: 1) Remove obsolete `reboot` scripts for Unix and Windows to prevent redundancy; 2) Update Windows `test.ps1` to handle omitted coverage patterns and improve error feedback. Extra: 1) Refactor Windows scripts (`make-messages.ps1`, `compile-messages.ps1`, `backup.ps1`) to use shared utilities for better consistency and output formatting; 2) Add spinner-based progress indicators to enhance user experience in interactive environments.
44 lines
1.4 KiB
Bash
Executable file
44 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
source ./scripts/Unix/starter.sh
|
|
|
|
if [ ! -f .env ]; then
|
|
log_warning ".env file not found. Exiting without running Docker steps."
|
|
exit 0
|
|
fi
|
|
|
|
# Remove old fuzzy entries
|
|
log_step "Remove old fuzzy entries..."
|
|
if ! docker compose exec app uv run manage.py fix_fuzzy; then
|
|
log_error "Failed to remove old fuzzy entries"
|
|
exit 1
|
|
fi
|
|
log_success "Old fuzzy entries removed successfully!"
|
|
|
|
# Update PO files
|
|
log_step "Updating PO files..."
|
|
if ! docker compose exec app uv run manage.py makemessages -l ar_AR -l cs_CZ -l da_DK -l de_DE -l en_GB -l en_US -l es_ES -l fa_IR -l fr_FR -l he_IL -l hi_IN -l hr_HR -l id_ID -l it_IT -l ja_JP -l kk_KZ -l ko_KR -l nl_NL -l no_NO -l pl_PL -l pt_BR -l ro_RO -l ru_RU -l sv_SE -l th_TH -l tr_TR -l vi_VN -l zh_Hans; then
|
|
log_error "Failed to update PO files"
|
|
exit 1
|
|
fi
|
|
log_success "PO files updated successfully!"
|
|
|
|
# Fix new fuzzy entries
|
|
log_step "Fixing new fuzzy entries..."
|
|
if ! docker compose exec app uv run manage.py fix_fuzzy; then
|
|
log_error "Failed to fix new fuzzy entries"
|
|
exit 1
|
|
fi
|
|
log_success "New fuzzy entries fixed successfully!"
|
|
|
|
# Translate with DeepL
|
|
log_step "Translating with DeepL..."
|
|
if ! docker compose exec app uv run manage.py deepl_translate -l ALL -a ALL; then
|
|
log_error "Translation failed"
|
|
exit 1
|
|
fi
|
|
log_success "Translated successfully!"
|
|
|
|
echo
|
|
log_result "You can now use compile-messages.sh script or run: ./lessy.py compile-messages"
|