From 478874764aa80195aebe2f7a5366033749a0735b Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Sun, 19 Mar 2023 20:45:50 -0500 Subject: [PATCH 1/6] Migrate OmniKit and MinimedKit out into their own repos --- .gitmodules | 6 ++ G7SensorKit | 2 +- .../contents.xcworkspacedata | 6 ++ .../xcschemes/LoopWorkspace.xcscheme | 60 +++++++++---------- MinimedKit | 1 + OmniKit | 1 + rileylink_ios | 2 +- 7 files changed, 46 insertions(+), 32 deletions(-) create mode 160000 MinimedKit create mode 160000 OmniKit diff --git a/.gitmodules b/.gitmodules index fd3101427e..5df7f69a9c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,9 @@ [submodule "TidepoolKit"] path = TidepoolKit url = https://github.com/LoopKit/TidepoolKit.git +[submodule "OmniKit"] + path = OmniKit + url = https://github.com/LoopKit/OmniKit.git +[submodule "MinimedKit"] + path = MinimedKit + url = https://github.com/LoopKit/MinimedKit.git diff --git a/G7SensorKit b/G7SensorKit index 1dba808efc..c3520a9a20 160000 --- a/G7SensorKit +++ b/G7SensorKit @@ -1 +1 @@ -Subproject commit 1dba808efcd629f2831b65c2a4d6967520b0ba95 +Subproject commit c3520a9a20184a7170dbb2def63b1f98794fbe79 diff --git a/LoopWorkspace.xcworkspace/contents.xcworkspacedata b/LoopWorkspace.xcworkspace/contents.xcworkspacedata index 2b1c12fc70..d6870b0833 100644 --- a/LoopWorkspace.xcworkspace/contents.xcworkspacedata +++ b/LoopWorkspace.xcworkspace/contents.xcworkspacedata @@ -65,6 +65,12 @@ + + + + diff --git a/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme b/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme index 49cba9ab4d..00fa61ad1a 100644 --- a/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme +++ b/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme @@ -140,10 +140,10 @@ buildForAnalyzing = "YES"> + BlueprintIdentifier = "A99C713023396CB100AB9035" + BuildableName = "NightscoutServiceKitPlugin.loopplugin" + BlueprintName = "NightscoutServiceKitPlugin" + ReferencedContainer = "container:NightscoutService/NightscoutService.xcodeproj"> + BlueprintIdentifier = "C1E34B5A29C7AD01009A50A5" + BuildableName = "MinimedKitPlugin.loopplugin" + BlueprintName = "MinimedKitPlugin" + ReferencedContainer = "container:MinimedKit/MinimedKit.xcodeproj"> + ReferencedContainer = "container:OmniKit/OmniKit.xcodeproj"> - - - - - - - - + + + + + + + + Date: Sun, 19 Mar 2023 23:36:25 -0500 Subject: [PATCH 2/6] Update scripts with new repos --- Scripts/export_localizations.sh | 2 +- Scripts/import_localizations.sh | 4 ++-- Scripts/update_submodule_refs.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Scripts/export_localizations.sh b/Scripts/export_localizations.sh index 66343f7c8c..efbb2a5291 100755 --- a/Scripts/export_localizations.sh +++ b/Scripts/export_localizations.sh @@ -23,7 +23,7 @@ foreach lang in $LANGUAGES lokalise2 \ --token $LOKALISE_TOKEN \ - --project-id 8069387863cdd837d11dd0.82955128 \ + --project-id 414338966417c70d7055e2.75119857 \ file upload \ --file ${lang}.xliff \ --cleanup-mode \ diff --git a/Scripts/import_localizations.sh b/Scripts/import_localizations.sh index fa8adcce7f..180650006c 100755 --- a/Scripts/import_localizations.sh +++ b/Scripts/import_localizations.sh @@ -17,7 +17,7 @@ date=`date` rm -rf xliff lokalise2 \ --token "$LOKALISE_TOKEN" \ - --project-id "8069387863cdd837d11dd0.82955128" \ + --project-id "414338966417c70d7055e2.75119857" \ file download \ --format xliff \ --bundle-structure "%LANG_ISO%.%FORMAT%" \ @@ -26,7 +26,7 @@ lokalise2 \ --replace-breaks=false \ --unzip-to ./xliff -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) +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 LoopKit:OmniKit:main LoopKit:MinimedKit:main) for project in ${projects}; do echo "Prepping $project" diff --git a/Scripts/update_submodule_refs.sh b/Scripts/update_submodule_refs.sh index 081544bf49..fe24d7f015 100755 --- a/Scripts/update_submodule_refs.sh +++ b/Scripts/update_submodule_refs.sh @@ -1,11 +1,11 @@ #!/bin/zsh -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) +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 LoopKit:OmniKit:main LoopKit:MinimedKit:main) for project in ${projects}; do - echo "Prepping $project" + echo "Updating to $project" IFS=":" read user dir branch <<< "$project" - echo "parts = $user $dir $branch" + echo "Updating to $branch on $user/$project" cd $dir git checkout $branch git pull From 914382e16ffa3dc2ab8ecb3b80c44153451a7cd9 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Mon, 20 Mar 2023 00:11:40 -0500 Subject: [PATCH 3/6] Separate in/out xliff directories, and do not convert placeholders on upload --- Scripts/export_localizations.sh | 7 ++++--- Scripts/import_localizations.sh | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Scripts/export_localizations.sh b/Scripts/export_localizations.sh index efbb2a5291..811a54d3f8 100755 --- a/Scripts/export_localizations.sh +++ b/Scripts/export_localizations.sh @@ -12,10 +12,10 @@ IFS=" "; args=( $=argstring ) xcodebuild -scheme LoopWorkspace -exportLocalizations -localizationPath xclocs $args -mkdir -p xliff -find xclocs -name '*.xliff' -exec cp {} xliff \; +mkdir -p xliff_out +find xclocs -name '*.xliff' -exec cp {} xliff_out \; -cd xliff +cd xliff_out foreach lang in $LANGUAGES @@ -23,6 +23,7 @@ foreach lang in $LANGUAGES lokalise2 \ --token $LOKALISE_TOKEN \ + --convert-placeholders false \ --project-id 414338966417c70d7055e2.75119857 \ file upload \ --file ${lang}.xliff \ diff --git a/Scripts/import_localizations.sh b/Scripts/import_localizations.sh index 180650006c..38f21f6d52 100755 --- a/Scripts/import_localizations.sh +++ b/Scripts/import_localizations.sh @@ -14,7 +14,7 @@ set -u date=`date` # Fetch translations from Lokalise -rm -rf xliff +rm -rf xliff_in lokalise2 \ --token "$LOKALISE_TOKEN" \ --project-id "414338966417c70d7055e2.75119857" \ @@ -24,7 +24,7 @@ lokalise2 \ --original-filenames=false \ --export-empty-as skip \ --replace-breaks=false \ - --unzip-to ./xliff + --unzip-to ./xliff_in 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 LoopKit:OmniKit:main LoopKit:MinimedKit:main) @@ -43,7 +43,7 @@ set -o pipefail && time xcodebuild -workspace LoopWorkspace.xcworkspace -scheme # Apply translations -foreach file in xliff/*.xliff +foreach file in xliff_in/*.xliff xcodebuild -workspace LoopWorkspace.xcworkspace -scheme "LoopWorkspace" -importLocalizations -localizationPath $file end From 1f086016c88039495e542eb6733929e0b5374125 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Mon, 20 Mar 2023 01:21:12 -0500 Subject: [PATCH 4/6] Do not convert placeholders on upload --- Scripts/export_localizations.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/export_localizations.sh b/Scripts/export_localizations.sh index 811a54d3f8..f4fce81768 100755 --- a/Scripts/export_localizations.sh +++ b/Scripts/export_localizations.sh @@ -23,7 +23,7 @@ foreach lang in $LANGUAGES lokalise2 \ --token $LOKALISE_TOKEN \ - --convert-placeholders false \ + --convert-placeholders=false \ --project-id 414338966417c70d7055e2.75119857 \ file upload \ --file ${lang}.xliff \ From 40ce8357d04df91ff27be5a2f258a077313c40c6 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Mon, 20 Mar 2023 12:28:52 -0500 Subject: [PATCH 5/6] Fix missing cs locale during export --- Scripts/export_localizations.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/export_localizations.sh b/Scripts/export_localizations.sh index f4fce81768..46619d2bc1 100755 --- a/Scripts/export_localizations.sh +++ b/Scripts/export_localizations.sh @@ -5,7 +5,7 @@ set -u : "$LOKALISE_TOKEN" -LANGUAGES=(ar es ru en zh-Hans nl fr de it nb pl ru es ja pt-BR vi da sv fi ro tr he sk) +LANGUAGES=(ar cs ru en zh-Hans nl fr de it nb pl ru es ja pt-BR vi da sv fi ro tr he sk) argstring="${LANGUAGES[@]/#/-exportLanguage }" IFS=" "; args=( $=argstring ) From 5ffed7bcda3b81990b1b8cf3078a2ba7439c637d Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Mon, 20 Mar 2023 13:38:22 -0500 Subject: [PATCH 6/6] Update submodules to latest --- AmplitudeService | 2 +- CGMBLEKit | 2 +- G7SensorKit | 2 +- LogglyService | 2 +- Loop | 2 +- LoopKit | 2 +- LoopSupport | 2 +- MinimedKit | 2 +- NightscoutAPIClient | 2 +- NightscoutService | 2 +- OmniBLE | 2 +- OmniKit | 2 +- Scripts/import_localizations.sh | 1 + TidepoolKit | 2 +- rileylink_ios | 2 +- 15 files changed, 15 insertions(+), 14 deletions(-) diff --git a/AmplitudeService b/AmplitudeService index 8526982b8e..5c77f20995 160000 --- a/AmplitudeService +++ b/AmplitudeService @@ -1 +1 @@ -Subproject commit 8526982b8ed044f277003329bf537706d97222b2 +Subproject commit 5c77f20995eee141e00141065eff3579db430d9c diff --git a/CGMBLEKit b/CGMBLEKit index 28863fbd25..5a4beb4cd8 160000 --- a/CGMBLEKit +++ b/CGMBLEKit @@ -1 +1 @@ -Subproject commit 28863fbd25a2139a036ef4848fdb7f22d90610e8 +Subproject commit 5a4beb4cd89699cfae2d93938659cc8414e16373 diff --git a/G7SensorKit b/G7SensorKit index c3520a9a20..30eb7f87b6 160000 --- a/G7SensorKit +++ b/G7SensorKit @@ -1 +1 @@ -Subproject commit c3520a9a20184a7170dbb2def63b1f98794fbe79 +Subproject commit 30eb7f87b67347e6319a6517215fa6b8746d218e diff --git a/LogglyService b/LogglyService index 8924840243..9336301bc7 160000 --- a/LogglyService +++ b/LogglyService @@ -1 +1 @@ -Subproject commit 8924840243fffa5365bef26fac22b6e589f59197 +Subproject commit 9336301bc7d4768c8442c5edd8109441a30cd60d diff --git a/Loop b/Loop index c1116d92b3..9965046312 160000 --- a/Loop +++ b/Loop @@ -1 +1 @@ -Subproject commit c1116d92b338eafffa01b1a60fd1e46fe4ca2b8c +Subproject commit 9965046312b18f983c7e22251dfe63e7204dfb94 diff --git a/LoopKit b/LoopKit index 84ae01a221..9835a29f1b 160000 --- a/LoopKit +++ b/LoopKit @@ -1 +1 @@ -Subproject commit 84ae01a221543f3f1573d2ec4d4da3bb42bf9570 +Subproject commit 9835a29f1bac9f75023f39c376479a2e6a6c8ccd diff --git a/LoopSupport b/LoopSupport index 3e6eaf8e69..40362a12e3 160000 --- a/LoopSupport +++ b/LoopSupport @@ -1 +1 @@ -Subproject commit 3e6eaf8e69fc5eb2cc5f35e7b023a147bd3faca4 +Subproject commit 40362a12e3e73e40ffadef5a1252d100c5761e8e diff --git a/MinimedKit b/MinimedKit index ae7c8fa426..3ede47efd2 160000 --- a/MinimedKit +++ b/MinimedKit @@ -1 +1 @@ -Subproject commit ae7c8fa4265b2843005a8bd0bfcd4f96859a2ad8 +Subproject commit 3ede47efd256513c372e9b356fff309f2b755c01 diff --git a/NightscoutAPIClient b/NightscoutAPIClient index 1e2b1f97c9..68178a834e 160000 --- a/NightscoutAPIClient +++ b/NightscoutAPIClient @@ -1 +1 @@ -Subproject commit 1e2b1f97c972196aa1704903bb501e501eec8ff2 +Subproject commit 68178a834e64eca04483a13af81f54911b4b40e2 diff --git a/NightscoutService b/NightscoutService index e03b2ae741..1196d9e3d6 160000 --- a/NightscoutService +++ b/NightscoutService @@ -1 +1 @@ -Subproject commit e03b2ae741fd10937a17cb7b9b32f78069afef59 +Subproject commit 1196d9e3d659ef5e8788c760a6afacdc6f6b9009 diff --git a/OmniBLE b/OmniBLE index 4bfebeab88..9cc9fbbf11 160000 --- a/OmniBLE +++ b/OmniBLE @@ -1 +1 @@ -Subproject commit 4bfebeab88689cc5f88d39b59d19092d2354cc5f +Subproject commit 9cc9fbbf113848c42bd0aa4a2f1f865315ae1475 diff --git a/OmniKit b/OmniKit index aa726002d1..b35b29b0ce 160000 --- a/OmniKit +++ b/OmniKit @@ -1 +1 @@ -Subproject commit aa726002d1fe546cd8aa0f761aaf95a78c5aff47 +Subproject commit b35b29b0cedccd33d7297d5482300ab68b113c18 diff --git a/Scripts/import_localizations.sh b/Scripts/import_localizations.sh index 38f21f6d52..3eb54a5a3e 100755 --- a/Scripts/import_localizations.sh +++ b/Scripts/import_localizations.sh @@ -22,6 +22,7 @@ lokalise2 \ --format xliff \ --bundle-structure "%LANG_ISO%.%FORMAT%" \ --original-filenames=false \ + --placeholder-format ios \ --export-empty-as skip \ --replace-breaks=false \ --unzip-to ./xliff_in diff --git a/TidepoolKit b/TidepoolKit index 1a097ec698..f551afa4ea 160000 --- a/TidepoolKit +++ b/TidepoolKit @@ -1 +1 @@ -Subproject commit 1a097ec698cfa5e3e8edd34971aab66f99f874d8 +Subproject commit f551afa4ea7b770901385568f389b90b8e42a4d3 diff --git a/rileylink_ios b/rileylink_ios index 1193131dae..6b2d3c45c6 160000 --- a/rileylink_ios +++ b/rileylink_ios @@ -1 +1 @@ -Subproject commit 1193131dae8aa63a4bc68238c9bfe97069d34757 +Subproject commit 6b2d3c45c6dfaeb6ea2a9da5111e7a2a5e2dc38e