blob: 1173f7f264940ba5f5c010888714b9dd48884530 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/bash
# Rename the zh_cn folder
mv translations/zh_cn translations/zh
# Create a directory for api (locale)
mkdir locale
# Copy all subdirectories to locale
cp -r translations/ locale/
# Loop over each directory and create another directory LC_Messages
# Move django.po files to LC_Messages and remove messages.po
cd locale/
for d in */ ; do
dir=${d%*/}
mkdir $dir/LC_MESSAGES
mv $dir/django.po $dir/LC_MESSAGES/
rm $dir/messages.po
done
cd ..
# Create a directory for ui (locales)
mkdir locales
# Copy all subdirectories to locales
cp -r translations/ locales/
# Loop over each directory and remove django.po
cd locales
for d in */ ; do
dir=${d%*/}
rm $dir/django.po
done
cd ..
awx_api_path="awx/locale" # locale will be dropped here
rsync -av locale/ $awx_api_path
rm -rf translations/
rm -rf locale/
rm -rf locales/
|