diff --git a/.gitmodules b/.gitmodules index 1308e60c03..c1fb407a91 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,3 +58,12 @@ [submodule "LibreTransmitter"] path = LibreTransmitter url = https://github.com/LoopKit/LibreTransmitter.git +[submodule "EversenseKit"] + path = EversenseKit + url = https://github.com/loopandlearn/EversenseKit +[submodule "MedtrumKit"] + path = MedtrumKit + url = https://github.com/loopandlearn/MedtrumKit.git +[submodule "DanaKit"] + path = DanaKit + url = https://github.com/loopandlearn/DanaKit diff --git a/DanaKit b/DanaKit new file mode 160000 index 0000000000..0158fc8539 --- /dev/null +++ b/DanaKit @@ -0,0 +1 @@ +Subproject commit 0158fc85391725bb1855ea34469d48cb65667850 diff --git a/EversenseKit b/EversenseKit new file mode 160000 index 0000000000..0bf3cf44fd --- /dev/null +++ b/EversenseKit @@ -0,0 +1 @@ +Subproject commit 0bf3cf44fd33eaf861efa63b16bb322970575b8b diff --git a/LoopWorkspace.xcworkspace/contents.xcworkspacedata b/LoopWorkspace.xcworkspace/contents.xcworkspacedata index a870f8b7c9..b042792973 100644 --- a/LoopWorkspace.xcworkspace/contents.xcworkspacedata +++ b/LoopWorkspace.xcworkspace/contents.xcworkspacedata @@ -108,12 +108,18 @@ + + + + @@ -132,4 +138,7 @@ + + diff --git a/LoopWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved b/LoopWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved index 85b387d04a..c9b09d9601 100644 --- a/LoopWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/LoopWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "7645108625333b4ec60e0e439db0c0dc8a91ad0942d36797c6b66208a9082ea2", + "originHash" : "23b19e660bb8e19ecae2e1186b6d2d4c2b64d16171c7a1658e596c8af3b90873", "pins" : [ { "identity" : "amplitude-ios", diff --git a/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme b/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme index e09bc55654..eb4fbe86ba 100644 --- a/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme +++ b/LoopWorkspace.xcworkspace/xcshareddata/xcschemes/LoopWorkspace.xcscheme @@ -146,6 +146,20 @@ ReferencedContainer = "container:MinimedKit/MinimedKit.xcodeproj"> + + + + + + + + + + + + + + + + As of 18 Feb 2026, the translations for these repositories are added to lokalise +> * DanaKit +> * EversenseKit +> * MedtrumKit + +> In order to manage those localization strings, the translation work will be done in the feat/eversense branch, which includes those 3 repositories. + +> The Scripts needed to handle these new repositories are found on in this branch (for now). + Translations for Loop are performed by volunteers at [lokalise](https://app.lokalise.com/projects). Several scripts were added to assist in bringing those translations into the repositories and updating keys when strings are added or modified. diff --git a/Scripts/define_common.sh b/Scripts/define_common.sh index 0c75a998e0..acd5ac9e00 100755 --- a/Scripts/define_common.sh +++ b/Scripts/define_common.sh @@ -61,6 +61,9 @@ LANGUAGES=(en \ ) # define the PROJECTS used by the translation scripts +# Note that although loopandlearn is the address used for .gitmodules for +# DanaKit, EversenseKit, and MedtrumKit, +# the upstream repositories are used here so that the appropriate pr can be generated PROJECTS=( \ LoopKit:AmplitudeService:dev \ LoopKit:CGMBLEKit:dev \ @@ -79,6 +82,9 @@ PROJECTS=( \ LoopKit:OmniKit:main \ LoopKit:RileyLinkKit:dev \ LoopKit:TidepoolService:dev \ + bastiaanv:DanaKit:dev \ + bastiaanv:EversenseKit:dev \ + jbr7rr:MedtrumKit:dev \ ) function section_divider() { diff --git a/Scripts/open_selected_url.sh b/Scripts/open_selected_url.sh new file mode 100755 index 0000000000..7a94c8cccb --- /dev/null +++ b/Scripts/open_selected_url.sh @@ -0,0 +1,46 @@ +#!/bin/zsh + +# The purpose of this script is to open forks on GitHub in browser that require manual evaluation. + +source Scripts/define_common.sh + +section_divider +echo "You are running ${0}" +echo +echo " This automatically opens forks that need to be manually managed in your browser so you" +echo " can handle the process at GitHub." + +# There are repositories that use loopandlearn in .gitmodules but the upstream forks come +# from the original authors. They are handled maually for both Loop and Trio. +# These URL are the same for Loop and Trio. +# At the moment, LoopKit/LoopKit has commits used by Trio that require manual sync +# so it is added to the SPECIAL_PROJECT_FORKS list. (This is here for convenience.) +DOWNSTREAM_GITHUB_NAME="loopandlearn" + +SPECIAL_PROJECT_FORKS=( \ + loopandlearn:LoopKit:dev:trio \ + bastiaanv:DanaKit:dev:dev \ + bastiaanv:EversenseKit:dev:dev \ + jbr7rr:MedtrumKit:dev:dev \ +) + +section_divider +echo " ////////////// Use Browser for next step ////////////" +echo +echo " Manually update these downstream repositories at ${DOWNSTREAM_GITHUB_NAME}" +echo " Each URL will automatically open" +echo +for project in ${SPECIAL_PROJECT_FORKS}; do + IFS=":" read user dir branch downstream_branch <<< "$project" + echo " Manually sync ${DOWNSTREAM_GITHUB_NAME}/$dir:$downstream_branch with $user/$dir:$branch" + open https://github.com/${DOWNSTREAM_GITHUB_NAME}/$dir/tree/$downstream_branch +done + +section_divider +echo " ////////////// WARNING ////////////" +echo +echo " If any updates were made by manual sync at GitHub," +echo " follow up by running:" +echo " ./Scripts/update_submodule_refs.sh" +echo " This ensures the submodules used in your local clone are up to date" +section_divider diff --git a/Scripts/update_loopandlearn_forks.sh b/Scripts/update_loopandlearn_forks.sh new file mode 100755 index 0000000000..627fee076a --- /dev/null +++ b/Scripts/update_loopandlearn_forks.sh @@ -0,0 +1,69 @@ +#!/bin/zsh + +# The purpose of this script is to update the loopandlearn forks to match the upstream repositories +# The script can only be run by someone with push privileges to the loopandlearn forks. + +source Scripts/define_common.sh + +section_divider +echo "You are running ${0}" +echo +echo " This automatically updates the downstream loopandlearn forks at GitHub" +echo " to match their upstream LoopKit counterparts." +echo " Next, the forks that need to be manually managed will be opened so you" +echo " can handle the process at GitHub." +echo +echo " The automated process only works with push privileges to loopandlearn." +echo " Running the script without privileges yields error messages; no harm occurs." + +continue_or_quit ${0} + + +# define the TRIO_PROJECT_FORKS to be updated +# these branches in loopandlearn should match the branches in the upstream repositories + +# note that the OmniBLE pod-keep-alive branch is a temporary addition and must come +# before the nominal OmniBLE dev branch in the list below +TRIO_PROJECT_FORKS=( \ + LoopKit:OmniBLE:pod-keep-alive \ + LoopKit:CGMBLEKit:dev \ + LoopKit:dexcom-share-client-swift:dev \ + LoopKit:G7SensorKit:main \ + LoopKit:LibreTransmitter:main \ + LoopKit:MinimedKit:main \ + LoopKit:OmniBLE:dev \ + LoopKit:OmniKit:main \ + LoopKit:RileyLinkKit:dev \ + LoopKit:TidepoolService:dev \ +) + +# This script uses remotes with the indicated nickname for the downstream repository +# If the proper remotes are not yet configured, they will be added later +DOWNSTREAM_GITHUB_NAME="loopandlearn" +DOWNSTREAM_NICKNAME="lal" + +section_divider +echo " ////////////// Automatically push updates from LoopKit to loopandlearn ////////////" +echo +for project in ${TRIO_PROJECT_FORKS}; do + IFS=":" read user dir branch <<< "$project" + echo " Make sure $branch for $dir is up to date" + cd $dir + git switch $branch + git pull + # Ensure remote is configured + if ! git remote get-url ${DOWNSTREAM_NICKNAME} &>/dev/null; then + echo " Adding remote ${DOWNSTREAM_NICKNAME} for $dir" + git remote add ${DOWNSTREAM_NICKNAME} https://github.com/${DOWNSTREAM_GITHUB_NAME}/$dir + fi + + echo " Push this update downstream to ${DOWNSTREAM_GITHUB_NAME}/$dir:$branch" + git push ${DOWNSTREAM_NICKNAME} $branch + echo "" + cd - +done + +# The next script is called automatically to enable manual evaluation for +# additional pump and cgm manager repositories. + +source Scripts/open_selected_url.sh \ No newline at end of file diff --git a/Scripts/update_submodule_refs.sh b/Scripts/update_submodule_refs.sh index b9edba347a..3fb71658a0 100755 --- a/Scripts/update_submodule_refs.sh +++ b/Scripts/update_submodule_refs.sh @@ -2,13 +2,24 @@ source Scripts/define_common.sh +section_divider +echo "You are running ${0}" +echo +echo " This modifies your local clone, in whatever branch is currently selected," +echo " so that every submodule is at the tip of the appropriate branch." +echo +current_branch=$(git branch --show-current 2>/dev/null) +echo " The current LoopWorkspace branch is $current_branch" + +continue_or_quit ${0} + for project in ${PROJECTS}; do + echo echo "Updating to $project" IFS=":" read user dir branch <<< "$project" echo "Updating to $branch on $user/$project" cd $dir git checkout $branch - #git branch -D tidepool-sync git pull cd - done