-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdeploy_preparations.ps1
More file actions
27 lines (24 loc) · 892 Bytes
/
deploy_preparations.ps1
File metadata and controls
27 lines (24 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Save start location
$start_location = pwd
Write-Host "Starting virtual environment" -NoNewline
# Activate virtual env
./env/Scripts/activate
Write-Host " Done" -ForegroundColor Green
Write-Host "Preparing translations"
# collect and compile translateable texts
$languages = @('zh-hans', 'de', 'es', 'fr', 'it', 'ko', 'pt', 'ru', 'pl')
foreach($language in $languages) {
Write-Host $language
Write-Host " makemessages"
python manage.py makemessages --locale=$language --ignore="env/*" >$null
Write-Host " compilemessages"
python manage.py compilemessages --locale=$language >$null
}
Write-Host "Preparing translations" -NoNewLine
Write-Host " Done" -ForegroundColor Green
# Deactivate virtual env
deactivate
# Return to start of script location
cd $start_location
Write-Host "------------------------------------"
Write-Host "Translations are prepared."