schon/scripts/Windows/make-messages.ps1
Egor fureunoir Gorbunov 943aa02cd3 Features: 1) Add test cases for DRF and GraphQL views in core, blog, payments, and vibes_auth applications; 2) Implement reusable GraphQL testing utilities in test classes; 3) Introduce test configuration scripts for Windows and Unix environments.
Fixes: 1) Correct entrypoint scripts by removing redundant `python` reference in `uv run` commands; 2) Resolve incorrect imports and adjust class renaming in vibes_auth tests; 3) Address typing errors and minor omissions in existing code.

Extra: 1) Improve formatting in settings and middleware files; 2) Update messaging test class names for clarity; 3) Cleanup unused imports and extra whitespaces, ensuring cleaner codebase.
2025-11-13 16:42:04 +03:00

44 lines
1.6 KiB
PowerShell

Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
.\scripts\Windows\starter.ps1
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
if (-not (Test-Path '.env'))
{
Write-Warning ".env file not found. Exiting without running Docker steps."
exit 0
}
Write-Host "Remove old fuzzy entries..." -ForegroundColor Magenta
docker compose exec app uv run manage.py fix_fuzzy
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Old fuzzy entries removed successfully!" -ForegroundColor Green
Write-Host "Updating PO files..." -ForegroundColor Magenta
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
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "PO files updated successfully!" -ForegroundColor Green
Write-Host "Fixing new fuzzy entries..." -ForegroundColor Magenta
docker compose exec app uv run manage.py fix_fuzzy
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "New fuzzy entries fixed successfully!" -ForegroundColor Green
Write-Host "Translating with DeepL..." -ForegroundColor Magenta
docker compose exec app uv run manage.py deepl_translate -l ALL -a ALL
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Translated successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "You can now use compile-messages.ps1 script." -ForegroundColor Cyan