Skip to content

Commit d97b137

Browse files
committed
Translations import from Lokalise
1 parent 6376877 commit d97b137

17 files changed

+62
-27
lines changed

LoopKit

Submodule LoopKit updated 50 files

LoopSupport

NightscoutAPIClient

OverrideAssetsWatchApp.xcassets/AppIcon.appiconset/Contents.json

+14
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@
7575
"size" : "51x51",
7676
"subtype" : "45mm"
7777
},
78+
{
79+
"idiom" : "watch",
80+
"role" : "appLauncher",
81+
"scale" : "2x",
82+
"size" : "54x54",
83+
"subtype" : "49mm"
84+
},
7885
{
7986
"filename" : "icon_86pt@2x.png",
8087
"idiom" : "watch",
@@ -106,6 +113,13 @@
106113
"size" : "117x117",
107114
"subtype" : "45mm"
108115
},
116+
{
117+
"idiom" : "watch",
118+
"role" : "quickLook",
119+
"scale" : "2x",
120+
"size" : "129x129",
121+
"subtype" : "49mm"
122+
},
109123
{
110124
"filename" : "Icon.png",
111125
"idiom" : "watch-marketing",

Scripts/import_localizations.sh

+33-12
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ set -u
1414
date=`date`
1515

1616
# Fetch translations from Lokalise
17+
rm -rf xliff
1718
lokalise2 \
1819
--token "$LOKALISE_TOKEN" \
1920
--project-id "8069387863cdd837d11dd0.82955128" \
@@ -25,32 +26,52 @@ lokalise2 \
2526
--replace-breaks=false \
2627
--unzip-to ./xliff
2728

29+
projects=(LoopKit:AmplitudeService:dev LoopKit:CGMBLEKit:dev LoopKit:G7SensorKit:main LoopKit:LogglyService:dev LoopKit:Loop:dev LoopKit:LoopKit:dev LoopKit:LoopOnboarding:dev LoopKit:LoopSupport:dev LoopKit:NightscoutAPIClient:master ps2:NightscoutService:dev LoopKit:OmniBLE:dev LoopKit:TidepoolKit:dev LoopKit:TidepoolService:dev LoopKit:dexcom-share-client-swift:dev ps2:rileylink_ios:dev)
30+
31+
for project in ${projects}; do
32+
echo "Prepping $project"
33+
IFS=":" read user dir branch <<< "$project"
34+
echo "parts = $user $dir $branch"
35+
cd $dir
36+
git checkout $branch
37+
git branch -D translations || true
38+
cd -
39+
done
2840

2941
# Build Loop
30-
set -o pipefail && time xcodebuild -workspace Loop.xcworkspace -scheme 'Loop (Workspace)' build | xcpretty
42+
set -o pipefail && time xcodebuild -workspace LoopWorkspace.xcworkspace -scheme 'LoopWorkspace' build | xcpretty
3143

3244

3345
# Apply translations
3446
foreach file in xliff/*.xliff
35-
xcodebuild -workspace Loop.xcworkspace -scheme "Loop (Workspace)" -importLocalizations -localizationPath $file
47+
xcodebuild -workspace LoopWorkspace.xcworkspace -scheme "LoopWorkspace" -importLocalizations -localizationPath $file
3648
end
3749

3850

3951
# Generate branches, commit and push.
40-
projects=(LoopKit:AmplitudeService:dev LoopKit:CGMBLEKit:dev LoopKit:G7SensorKit:main LoopKit:LogglyService:dev LoopKit:Loop:dev LoopKit:LoopKit:dev LoopKit:LoopOnboarding:dev LoopKit:LoopSupport:dev LoopKit:NightscoutAPIClient:master ps2:NightscoutService:dev LoopKit:OmniBLE:dev LoopKit:TidepoolKit:dev LoopKit:TidepoolService:dev LoopKit:dexcom-share-client-swift:dev ps2:rileylink_ios:dev)
4152
for project in ${projects}; do
42-
echo "Working on $project"
53+
echo "Commiting $project"
4354
IFS=":" read user dir branch <<< "$project"
4455
echo "parts = $user $dir $branch"
4556
cd $dir
46-
set +e
47-
git checkout -b translations
57+
git checkout -b translations || true
4858
git add .
49-
git commit -am "Updated translations from Lokalise on ${date}"
50-
git push -f
51-
pr=$(gh pr create -B $branch -R $user/$dir --fill 2>&1 | grep http)
52-
echo "PR = $pr"
53-
open $pr
54-
cd ..
59+
if git commit -am "Updated translations from Lokalise on ${date}"; then
60+
git push -f
61+
pr=$(gh pr create -B $branch -R $user/$dir --fill 2>&1 | grep http)
62+
echo "PR = $pr"
63+
open $pr
64+
fi
65+
cd -
5566
done
5667

68+
# Reset
69+
#for project in ${projects}; do
70+
# echo "Commiting $project"
71+
# IFS=":" read user dir branch <<< "$project"
72+
# echo "parts = $user $dir $branch"
73+
# cd $dir
74+
# git checkout $branch
75+
# git pull
76+
# cd -
77+
#done

rileylink_ios

Submodule rileylink_ios updated 37 files

0 commit comments

Comments
 (0)