diff --git a/.circleci/config.yml b/.circleci/config.yml
index 0ea0edd9a8..b48d32e407 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,7 +1,7 @@
jobs:
build_and_test:
macos:
- xcode: 15.4.0
+ xcode: 16.4
steps:
- checkout
- run:
diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml
index 59e8247d46..0d2cfd4350 100644
--- a/.github/workflows/build_loop.yml
+++ b/.github/workflows/build_loop.yml
@@ -206,7 +206,7 @@ jobs:
)
steps:
- name: Select Xcode version
- run: "sudo xcode-select --switch /Applications/Xcode_16.3.app/Contents/Developer"
+ run: "sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer"
- name: Checkout Repo for syncing
if: |
diff --git a/CGMBLEKit b/CGMBLEKit
index 4adef26620..68ab20c659 160000
--- a/CGMBLEKit
+++ b/CGMBLEKit
@@ -1 +1 @@
-Subproject commit 4adef2662060f7d11d1abd8d099c3e022bf00cef
+Subproject commit 68ab20c65992a4db94bab5df73e5b9f9b615e4b0
diff --git a/DanaKit b/DanaKit
index 33a8d4705f..a8e4208572 160000
--- a/DanaKit
+++ b/DanaKit
@@ -1 +1 @@
-Subproject commit 33a8d4705fc82b371daf4bd5977ed2cfaf420204
+Subproject commit a8e4208572738d310db2a1991195c19c19e33c15
diff --git a/G7SensorKit b/G7SensorKit
index a97e4281e7..a159c7fca0 160000
--- a/G7SensorKit
+++ b/G7SensorKit
@@ -1 +1 @@
-Subproject commit a97e4281e7fd4e73e0ba82c8550eebe2e6587f62
+Subproject commit a159c7fca083147a66a41783d38cfc65fac3a9b0
diff --git a/LibreTransmitter b/LibreTransmitter
index a80ffb4bbc..ea027cc5d2 160000
--- a/LibreTransmitter
+++ b/LibreTransmitter
@@ -1 +1 @@
-Subproject commit a80ffb4bbc1cc72778cbf4eb69e90b4ff63dd5bf
+Subproject commit ea027cc5d24cf8de79f37b6421fd8d706a17989e
diff --git a/LogglyService b/LogglyService
index 1bb8223748..d2a17941f3 160000
--- a/LogglyService
+++ b/LogglyService
@@ -1 +1 @@
-Subproject commit 1bb8223748003e51770875200489cce83f74c570
+Subproject commit d2a17941f3c061cd10ae1e7ef5f3f1fb9454ef84
diff --git a/Loop b/Loop
index e45f1376bc..eb89c63c14 160000
--- a/Loop
+++ b/Loop
@@ -1 +1 @@
-Subproject commit e45f1376bc8cdf5f8ed009f0f165455909e60155
+Subproject commit eb89c63c14da7e63fc9d9ad68b2a6362cd5e0760
diff --git a/LoopKit b/LoopKit
index a03be5768e..24048713f5 160000
--- a/LoopKit
+++ b/LoopKit
@@ -1 +1 @@
-Subproject commit a03be5768e8d9cec87d93f0af9e72c97b7200b9a
+Subproject commit 24048713f530afc643c5d58a4350a768795f92aa
diff --git a/LoopOnboarding b/LoopOnboarding
index 4c5c192799..dc4ab0f499 160000
--- a/LoopOnboarding
+++ b/LoopOnboarding
@@ -1 +1 @@
-Subproject commit 4c5c1927999ae5dd3861e67ca9f10c14a59d1cc6
+Subproject commit dc4ab0f4990465ac9b6080d947e55d2427b782de
diff --git a/LoopSupport b/LoopSupport
index 4728c67836..18a1c537eb 160000
--- a/LoopSupport
+++ b/LoopSupport
@@ -1 +1 @@
-Subproject commit 4728c67836e6a60118fcf6cc262010e9b3d14e68
+Subproject commit 18a1c537eb37e9f31cc33190f3efc77880aac466
diff --git a/LoopWorkspace.xcworkspace/contents.xcworkspacedata b/LoopWorkspace.xcworkspace/contents.xcworkspacedata
index 8e67be231c..d0450f2cfe 100644
--- a/LoopWorkspace.xcworkspace/contents.xcworkspacedata
+++ b/LoopWorkspace.xcworkspace/contents.xcworkspacedata
@@ -5,10 +5,10 @@
location = "group:Scripts"
name = "Scripts">
+ location = "group:sync.swift">
+ location = "group:LocalizationInstructions.md">
@@ -17,13 +17,13 @@
location = "group:import_localizations.sh">
+ location = "group:update_submodule_refs.sh">
+ location = "group:define_common.sh">
+ location = "group:manual_download_from_lokalise.sh">
@@ -32,7 +32,22 @@
location = "group:manual_review_translations.sh">
+ location = "group:manual_finalize_translations.sh">
+
+
+
+
+
+
+
+
+
+
This is work-in-progress. There are some open questions on how to deal with certain strings.
+Table of Contents:
-There are several scripts to automate the localization process. However, these localization scripts require access to tokens:
+* [Overview](#overview)
+ * [Overview: From lokalise to LoopWorkspace](#overview-from-lokalise-to-loopworkspace)
+ * [Overview: From LoopWorkspace to lokalise](#overview-from-loopworkspace-to-lokalise)
+* [Loop Dashboard at lokalise](#loop-dashboard-at-lokalise)
+* Script Usage
+* Translations
+* From lokalise to LoopWorkspace
+ * [Download from lokalise](#download-from-lokalise)
+ * [Import xliff files into LoopWorkspace](#import-xliff-files-into-loopworkspace)
+ * [Review Differences](#review-differences)
+ * [Commit Submodule Changes and Create PRs](#commit-submodule-changes-and-create-prs)
+ * [Review the Open PR and merge](#review-the-open-pr-and-merge)
+* [Finalize with PR to LoopWorkspace](#finalize-with-pr-to-loopworkspace)
+* From LoopWorkspace to lokalise
+ * [Prepare xliff_out folder](#prepare-xliff_out-folder)
+ * [Update lokalise strings](#update-lokalise-strings)
+* [Utility Scripts](#utility-scripts)
+* [Questions and notes](#questions-and-notes)
-* export_localizations.sh
-* import_localizations.sh
+## Overview
-If access to these tokens is not available, but a user is a manager for the Loop project at lokalise, they can manually take those actions.
+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.
-New scripts were created to provide a step-by-step manual process:
+To volunteer, join [Loop zulipchat](https://loop.zulipchat.com/) and send a direct message to Marion Barker with your email address and the language(s) you can translate.
-* manual_export_localizations.sh
+The first set of scripts were created in 2023 to automate the localization process. (Refer to these as the original scripts.)
+
+* Scripts/import_localizations.sh
+* Scripts/export_localizations.sh
+
+About the naming:
+
+* The "import" in the original script name refered to importing xliff files from lokalise to provide updated localization strings for LoopWorkspace and associated submodules
+ * This script was used to bring in new translations into the LoopWorkspace submodules and autocreate PR
+* The "export" in the original script name refered to exporting localization from LoopWorkspace and associated submodules into xliff files and uploading them to the lokalise site
+ * This script was used to upload the strings in any of the workspace submodules
+
+New scripts were created in 2025 to provide smaller steps and to allow review before the modifications are committed and PR are opened.
+
+These new scripts have "manual" in the script name.
+
+### Overview: From lokalise to LoopWorkspace
+
+For details, see [From lokalise to LoopWorkspace](#from-lokalise-to-loopworkspace)
+
+These scripts break the original import_localizations script into smaller components:
+
+* manual_download_from_lokalise.sh
* manual_import_localizations.sh
* manual_review_translations.sh
-* manual_translations_finalize.sh
+* manual_finalize_translations.sh
+
+### Overview: From LoopWorkspace to lokalise
-The summary action for these script is provided here, with details in the [Usage](#usage) section.
+For details, see [From LoopWorkspace to lokalise](#from-loopworkspace-to-lokalise)
-#### manual_export_localizations
+This script prepares xliff files for each language (for all repositories) from LoopWorkspace suitable to be uploaded to lokalise:
-* script to create xliff_out folder with xliff files in all languages suitable to drag and drop into lokalise
+* manual_export_localizations.sh
+* manual_upload_to_lokalise.sh
+
+## Loop Dashboard at lokalise
-#### manual_import_localizations
+When you log into the [lokalise portal](https://app.lokalise.com/projects), navigate to the Loop dashboard, you see all the languages and the % complete for translation.
-* script to import from xliff_in folder
- * create `translations` branch for each project
- * command-line Xcode build before importing xliff files
- * command-line Xcode build for each language importing from the associated xliff file
- * after completion, LoopWorkspace has uncommitted changes in projects
-
-#### manual_review_translations
+## Translations
-* script to make it easy to review changes per submodule, shows diffs, and pause so manual modifications can be enacted if appropriate
+The translations are performed by volunteers. To volunteer, join [Loop zulipchat](https://loop.zulipchat.com/) and send a direct message to Marion Barker with your email address and the language(s) you can translate.
-#### manual_translations_finalize
+## Script Usage
-* script to commit the change for each project folder (submodule)
- * if there are no changes, no action is taken
- * if there are changes
- * git add .; commit all with automated message
- * push the `translations` branch to origin
- * create a PR from `translations` branch to default branch for that repository
- * open the URL for the PR
+Some scripts require a LOKALISE_TOKEN.
-## Usage
+When the user is a manager for the Loop project at lokalise, they create a LOKALISE_TOKEN (API token) with read/write privileges.
-### Loop Dashboard at localise
+* API tokens can be created and recovered by going to : https://app.lokalise.com/profile/?refresh6656#apitokens
-When you log into the [lokalise portal](https://app.lokalise.com/projects) navigate to the Loop dashboard, you see all the languages and the % complete for translation.
+Once the token is created, export the token, e.g.,
-#### Open questions
+```
+export LOKALISE_TOKEN=
+```
-> Notes from Marion Barker:
+Make sure the scripts are executable. If not, apply `chmod +x` to the scripts.
-##### Question 1:
+## From lokalise to LoopWorkspace
-I do not believe these keys should be included in the translation process:
+This has been broken into 4 separate scripts to allow review at each step.
-* CFBundleGetInfoString
-* CFBundleNames
-* NSHumanReadableCopyright
+### Download from lokalise
+
+The `manual_download_from_lokalise.sh` script requires a LOKALISE_TOKEN with at least read privileges, see [Script Usage](#script-usage).
+
+This script:
+
+* deletes any existing xliff_in folder
+* downloads the localization information from lokalise into a new xliff_in folder
+* generates a temporary `xlate_pr_title.txt` file used for the commit message and titles for PRs to the submodules and LoopWorkspace
+
+If you get a warning: `Warning: Project too big for sync export. Please use our async export endpoint instead`
+just try again and it will work on another attempt.
-These were almost all empty. I deleted these keys on 2025-07-27 on the lokalise site.
+### Import xliff files into LoopWorkspace
-A few of them did have entries for some languages
+**Bullet summary** of the `manual_import_translations.sh` script:
-* I have them archived locally and can restore them if they should have been kept
+* create `translations` branch for each submodule (project)
+* command-line Xcode build before importing xliff files
+* command-line Xcode build for each language importing from the associated xliff file
+* after completion, LoopWorkspace may have uncommitted changes in submodules
-When uploading a new set of xliff_out files, they are recreated - so I think I'm missing a method to limit them.
+**Descriptive summary** of the `manual_import_translations.sh` script.
-Note that in the xliff files, these say translate="no", so why do they show up in the imported list on lokalise?
+The `manual_import_translations.sh` script pulls the most recent tip from each submodule, creates a `translations` branch at that level in preparation for importing the localizations from xliff_in into LoopWorkspace and all the submodules.
-I will keep looking for help in the documentation, but if anyone knows - let me know.
+> Warning: this deletes any existing `translations` branch from each submodule. If you need to "save your work", check out [Utility Scripts](#utility-scripts).
-Because of this uncertainty, I only modified the LibreTransmitter project so far because there is a hotfix needed for it.
+It then goes through each language and brings in updates from the xliff_in folder.
-##### Question 2:
+The result is that any updated localizations shows up as a diff in each submodule.
-A lot of the changes that were proposed were white space changes.
+> The default branch name used for all the submodules is `translations`. If you want to modify that, edit Scripts/define_common.sh and change `translation_branch` before executing the script. This change will then be reflected in 3 scripts: import, review and finalize. In general, it is best to stick with `translations` as the branch name.
-Here's an example:
+Before running this script:
+
+* Confirm the list of `projects` in Scripts/define_common.sh is up to date regarding owner, repository name, repository branch
+* Trim any branches on GitHub with the name `translations`
+ * The trimming should have happened when the last set of translations PR were merged
+ * If not, do it now
+
+Execute this script:
```
-diff --git a/RileyLinkKitUI/nb.lproj/Localizable.strings b/RileyLinkKitUI/nb.lproj/Localizable.strings
-index fbfc31e..db53cbd 100644
---- a/RileyLinkKitUI/nb.lproj/Localizable.strings
-+++ b/RileyLinkKitUI/nb.lproj/Localizable.strings
-@@ -74,7 +74,7 @@
- "Name" = "Navn";
-
- /* Detail text when battery alert disabled.
-- Text indicating LED Mode is off */
-+Text indicating LED Mode is off */
- "Off" = "Av";
-
- /* Text indicating LED Mode is on */
-@@ -87,7 +87,7 @@
- "Signal Strength" = "Signalstyrke";
-
- /* The title of the section for orangelink commands
-- The title of the section for rileylink commands */
-+The title of the section for rileylink commands */
- "Test Commands" = "Testkommandoer";
-
- /* The title of the cell showing Test Vibration */
+./Scripts/manual_import_localizations.sh
+```
+
+### Review Differences
+
+The `InfoPlist.strings` may already be included in some cases. Don't worry about those. But do not add new ones.
+
+* If there is a change to the *.xcodeproj/project.pbxproj - it is probably duplicates of strings in files already included in the pbxproj file
+ * make sure that any new strings in the new files are handled in the existing Localizable.strings files for each language that has a new lproj folder added at the top level
+ * git restore the pbxproj file
+ * rm the new folders that contain those strings
+ * verify that LoopWorkspace still builds correctly
+* Note - when there already duplicates of the same string in more than one lproj folder
+ * save doing clean up for later
+ * just do not add to the confusion for now
+
+Use the `manual_review_translations.sh` script in one terminal and open another terminal if you want to look in detail at a particular submodule:
+
+```
+./Scripts/manual_review_translations.sh
+```
+
+After each submodule, if any differences are detected, the script pauses with the summary of files changed and allows time to do detailed review (in another terminal). Hit return when ready to continue the script.
+
+Examine the diffs for each submodule to make sure they are appropriate.
+
+### Commit Submodule Changes and Create PRs
+
+> Before running this script, ensure that code builds using Mac-Xcode GUI.
+
+**Bullet summary** of action for each submodule by the `manual_finalize_translations.sh` script:
+
+* if there are no changes, no action is taken
+* if there are changes
+ * git add .; commit all with automated message
+ * push the `translations` branch to origin
+ * create a PR from `translations` branch to default branch for that repository
+ * open the URL for the PR
+
+**Descriptive summary** of action for each submodule by the `manual_finalize_translations.sh` script.
+
+You should have trimmed any `translations` branches on any GitHub repositories before running the import script. If not, do it before running the `manual_finalize_translations.sh` script.
+
+Once all the diffs have been reviewed and you are ready to proceed, run this script:
+
```
+./Scripts/manual_finalize_translations.sh
+```
+
+Assuming the permission are ok for each repository that is being changed, this should run without errors, create the PRs and open each one.
+
+If the person running the script does not have appropriate permissions to push the branch, the commits are already made for that repository before attempting to push, so the user can just run the script again to proceed to the next repository.
+
+The missing PR need to be handled separately. But really the person running the script should have permissions to open new PR.
+
+If an error is seen with this hint - you need to go to GitHub and trim the translations branch and then push and create the pr manually:
-I see no point in committing this kind of a change. There are other substantive changes in other projects, but there is so much noise from the white space changes, I would like to modify this so only translation updates are included.
+> Updates were rejected because the tip of your current branch is behind its remote counterpart.
-##### Question 3:
+### Review the Open PR and merge
+
+At this point, get someone to approve each of the open PR and merge them. Be sure to trim the `translations` branch once the PR are merged.
+
+## Finalize with PR to LoopWorkspace
+
+Once all the translations branches for submodules are merged, run the script to prepare the PR to update LoopWorkspace.
+
+> Normally, this script is run starting with dev branch
+
+> For the case with script modifications, use a working branch from dev with the Scripts folder properly updated
+
+**Bullet summary** `manual_LoopWorkspace_prepare_pr.sh` script:
+
+* create translations branch (or use it if it already exists)
+* execute update_submodule_refs.sh to bring in the tip of every submodule
+* there should be changes for any updated submodules, if so
+ * git commit -a using the automated commit message
+ * push the `translations` branch to origin
+ * create a PR from `translations` branch to dev branch for LoopWorkspace
+ * open the URL for the PR
+
+Make sure the new translations branch builds. Update the version number and add that commit to the PR.
+
+```
+./Scripts/manual_LoopWorkspace_prepare_pr.sh
+```
-Both OmniBLE and OmniKit seem to be adding new xx.lproj folders at the top level with the languages already being present in other folders. These have associated changes to the `pbxproj` file. I'm confused by this and wonder if this is something else that should be fixed.
+## From LoopWorkspace to lokalise
-### Export from LoopWorkspace
+### Prepare xliff_out folder
-This section is used to update the strings in lokalise for translation.
+The `manual_export_translations.sh` script is used to prepare xliff files to be uploaded to lokalise for translation.
-First navigate to the LoopWorkspace directory in the appropriate branch. Make sure it is fully up to date with GitHub. Make sure the scripts are executable. You may need to apply `chmod +x` to the scripts.
+It is normally required for any code updates that add or modify the strings that require localization.
+
+First navigate to the LoopWorkspace directory in the appropriate branch, normally this is the `dev` branch. Make sure it is fully up to date with GitHub.
Make sure the Xcode workspace is **not** open on your Mac or this will fail.
@@ -127,90 +241,109 @@ Make sure the Xcode workspace is **not** open on your Mac or this will fail.
This creates an xliff_out folder filled with xliff files, one for each language, that contains all the keys and strings for the entire clone (including all submodules).
+### Update lokalise strings
-### Import into lokalise
+This script requires Read/Write token for lokalise. It uploads the xliff file for each language in the Xliff_out folder.
-This section requires the user have `manager` access to the Loop project.
+```
+./Scripts/manual_upload_to_lokalise.sh
+```
-Log into the [lokalise portal](https://app.lokalise.com/projects) and navigate to Loop.
+## Utility Scripts
-Select [Upload](https://app.lokalise.com/upload/414338966417c70d7055e2.75119857/)
+Once the import and export process is completed, you can delete temporary files and folders using:
-Drag the *.xliff files into the drag and drop location.
+```
+./Scripts/manual_cleanup.sh
+```
-Be patient
+The define_common.sh is used by other scripts to provide a single source for the list of:
-* while each language is uploaded, the `uploading` indicator shows up under each language on the left side
-* at the bottom of the list, the `Import Files` should be available when all have completed uploading
- * Tap on `Import Files`
-* progress will show at upper right
+* filename with message indicating download time from lokalise for commit messages and PR titles
+* branch names used by some of the scripts for output and input
+* LANGUAGES (list of all languages to be included)
+* projects (all the submodules for LoopWorkspace with owners and branches)
-When this is done, check the Loop lokalise dashboard again to see updated statistics.
+If you need to start over but don't want to lose prior work, use archive_translations.sh. This is suitable for use after manual_import_localizations and manual_review_translations and before manual_finalize_translations.
+If you want to change paths for translations and archived translations, edit Scripts/define_common.sh before running.
-### Translations
+* archive_translations.sh
+ * internal names that can be edited in define_common.sh:
+ * archive_branch="test_translations"
+ * translation_branch="translations"
-The translations are performed by volunteers. To volunteer, join [Loop zulipchat]() and send a direct message to Marion Barker with your email address and the language(s) you can translate.
+## Questions and notes
-### Export from lokalise
+Most of the questions were worked through while developing the new scripts.
-This section requires the user have `manager` access to the Loop project.
+#### Keys uploaded that not require translation
-Log into the [lokalise portal](https://app.lokalise.com/projects) and navigate to Loop.
+**Answer** Mark them as not visible to translators.
-Select [Download](https://app.lokalise.com/download/414338966417c70d7055e2.75119857/)
+**Details**
-* The default settings were adjusted to match those of the original script (import_localizations.sh)
-* Click on the `Build and download` button at either the bottom of the screen or the top left
+The current method uploads some keys that do not need to be translated. Initially, a few keys were deleted from lokalise, but on the next upload, they were restored. So the next modification was to mark the keys as not visible to the translators.
+Items already translated are brought down one time - go on and include those diffs and then next cycle, these should no longer be a problem.
-### Import into LoopWorkspace
+Keys that were deleted on 2025-07-27, then later are restored as empty:
-When the download from lokalise completes, navigate to your ~/Download folder in finder:
+* CFBundleGetInfoString
+* CFBundleNames
+* NSHumanReadableCopyright
-* rename `Loop-Localizable.zip` to `xliff_in.zip`
-* uncompress to create the xliff_in folder
-* move the xliff_in folder to the top level of the LoopWorkspace folder
+After the initial testing, some additional keys were marked as not visible. These were mostly identified when one or two translators were very thorough.
-The default branch name used for all the submodules is `translations`. If you want to modify that, edit the script and change `translation_dir` before executing the script.
+#### White space changes
-Confirm the list of `projects` in the script is up to date regarding owner, repository name, repository branch.
+**Answer** Accept these as a one-time change.
-Execute this script:
+**Details**
-```
-./Scripts/manual_import_localizations.sh
-```
+A lot of the keys have different white space than the 2023 downloads.
+I discussed this with Pete and we agreed to do the one time change to all the repositories for the keys.
-### Commit Changes and Create PRs
+#### Downloaded Translations duplicated in Xcode
-Examine the diffs for each submodule to make sure they are appropriate.
+**Answer** Manual cleanup when doing the review until this duplication is figured out.
+
+**Details**
+
+LoopKit, OmniBLE and OmniKit seem to be adding new ll.lproj folders at the top level with the languages already being present in other folders. These have associated changes to the `pbxproj` file.
-There are some changes that are primarily white space, so I did not commit those.
+I spot checked and found the new Localize.strings in the new ll.lproj folders have the same translations in the other locations where those translations are placed by Xcode.
-See section on [Open questions](#open-questions).
+Essentially, when doing the review:
-Status on 2025-07-28:
+```
+git restore ***.xcodeproj/project.pbxproj
+rm -rf ll.lproj
-* Previously LibreTransmitter translations were updated manually and that PR committed
-* A hotfix is needed for LibreTransmitter to support European Libre 2 transmitters and it is ready to go
-* A PR is merged to G7SensorKit that can be added along with the hotfix
+where *** is replaced by the submodule name
+and ll is replaced by the language code
+```
-Decided:
+For the DanaKit module, rely on the repository owner to maintain the translations with crowdin (for now). Do not add extra files to the repository as was already done for OmniBLE and OmniKit.
-* Hotfix will include these prototype scripts and the modification listed above.
-* Work will continue on the methodology to capture translations and bring them into Loop in the near future
-* This instruction file will be updated as the learning process continues
+#### Status on 2025-08-10
-### Utility Scripts
+Updated the LocalizationInstructions.md file after running through the sequence documented in this file:
-If you need to start over but don't want to lose prior work, edit this script for name of the branch to archive the translations and execute it.
+1. Download from lokalise (manual_download_from_lokalise.sh)
+2. Import into LoopWorkspace (manual_import_localizations.sh)
+3. Review Differences (manual_review_translations.sh)
+4. Commit Submodule Changes and Create PRs (manual_finalize_translations.md)
-* archive_translations.sh
- * internal names that can be edited:
- * archive_dir="test_translations"
- * translation_dir="translations"
+Only 4 PR were opened for this test, which were subsequently closed without merging. They helped with the testing process.
+
+#### Status on 2025-08-24
+
+Additional changes were made to the scripts and translations were merged into PR for 15 repositories from the download on 2025-08-24.
+#### Status on 2025-08-30
+Another cycle was completed, that included an upload to lokalise from the in-progress translations changes. Then a new download was processed.
+The final step to test is the creation of the PR for LoopWorkspace dev branch. To do this, the final script will be tested.
diff --git a/Scripts/archive_translations.sh b/Scripts/archive_translations.sh
index 4234d64e57..e3aace1553 100755
--- a/Scripts/archive_translations.sh
+++ b/Scripts/archive_translations.sh
@@ -1,31 +1,35 @@
#!/bin/zsh
-# archive previously created translation branches as test_translations as a "reset" action
+# archive previously created translation branches as a "reset" action
+# you can edit branch names in Scripts/define_common.sh prior to running
set -e
set -u
-date=`date`
+source Scripts/define_common.sh
-archive_dir="test_translations"
-translation_dir="translations"
-
-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:NightscoutRemoteCGM:dev LoopKit:NightscoutService:dev LoopKit:OmniBLE:dev LoopKit:TidepoolService:dev LoopKit:dexcom-share-client-swift:dev LoopKit:RileyLinkKit:dev LoopKit:OmniKit:main LoopKit:MinimedKit:main LoopKit:LibreTransmitter:main)
+# use a common message with the time at which xliff files were downloaded from lokalise
+if [[ -e "${message_file}" ]]; then
+ message_string=$(<"${message_file}")
+else
+ message_string="message not defined"
+fi
+echo "message_string = ${message_string}"
for project in ${projects}; do
- echo "Archive ${translation_dir} branch for $project"
+ echo "Archive ${translation_branch} branch for $project"
IFS=":" read user dir branch <<< "$project"
echo "parts = $user $dir $branch"
cd $dir
- if git switch ${translation_dir}; then
- echo "in $dir, configure $archive_dir"
- git branch -D ${archive_dir} || true
- git switch -c ${archive_dir}
+ if git switch ${translation_branch}; then
+ echo "in $dir, configure $archive_branch"
+ git branch -D ${archive_branch} || true
+ git switch -c ${archive_branch}
git add .
- if git commit -am "Updated translations from Lokalise on ${date}"; then
- echo "updated $dir with new translations in ${archive_dir} branch"
+ if git commit -m "${message_string}"; then
+ echo "updated $dir with ${message_string} in ${archive_branch} branch"
fi
- git branch -D ${translation_dir}
+ git branch -D ${translation_branch}
fi
cd -
done
diff --git a/Scripts/define_common.sh b/Scripts/define_common.sh
new file mode 100755
index 0000000000..2345e4beaa
--- /dev/null
+++ b/Scripts/define_common.sh
@@ -0,0 +1,75 @@
+#!/bin/zsh
+
+# define variables used by more than one script
+# variables are:
+# message_file
+# archive_branch
+# translation_branch
+# projects
+# LANGUAGES
+
+# include this file in each script using
+# source Scripts/define_commont.sh
+
+# define name of file used to save the commit message and title for pull requests
+message_file="xlate_message_file.txt"
+
+# define the branch names used by the translation scripts
+archive_branch="archive_translations"
+translation_branch="translations"
+target_loopworkspace_branch="dev"
+
+# define the languages used by the translation scripts
+# matches lokalise order, en plus alphabetical order by language name in English
+LANGUAGES=(en \
+ ar \
+ zh-Hans \
+ cs \
+ da \
+ nl \
+ fi \
+ fr \
+ de \
+ he \
+ hi ]
+ it \
+ ja \
+ nb \
+ pl \
+ pt-BR \
+ ro \
+ ru \
+ sk \
+ es \
+ sv \
+ tr \
+ vi \
+)
+
+# define the projects used by the translation scripts
+projects=( \
+ LoopKit:AmplitudeService:dev \
+ LoopKit:CGMBLEKit:dev \
+ LoopKit:dexcom-share-client-swift:dev \
+ loopandlearn:DanaKit:dev \
+ LoopKit:G7SensorKit:main \
+ LoopKit:LibreTransmitter:main \
+ LoopKit:LogglyService:dev \
+ LoopKit:Loop:dev \
+ LoopKit:LoopKit:dev \
+ LoopKit:LoopOnboarding:dev \
+ LoopKit:LoopSupport:dev \
+ LoopKit:MinimedKit:main \
+ LoopKit:NightscoutRemoteCGM:dev \
+ LoopKit:NightscoutService:dev \
+ LoopKit:OmniBLE:dev \
+ LoopKit:OmniKit:main \
+ LoopKit:RileyLinkKit:dev \
+ LoopKit:TidepoolService:dev \
+)
+
+function section_divider() {
+ echo -e ""
+ echo -e "--------------------------------"
+ echo -e ""
+}
diff --git a/Scripts/manual_LoopWorkspace_prepare_pr.sh b/Scripts/manual_LoopWorkspace_prepare_pr.sh
new file mode 100755
index 0000000000..d324807423
--- /dev/null
+++ b/Scripts/manual_LoopWorkspace_prepare_pr.sh
@@ -0,0 +1,83 @@
+#!/bin/zsh
+
+set -e
+set -u
+
+# this script prepares a branch of LoopWorkspace based on current local branch.
+# It brings in the tip of all the submodule branches which should have just
+# been updated with the manual download, import, review and finalize scripts.
+# After all those PR are merged and the translation branches trimmed,
+# the next step is to prepare the PR to update LoopWorkspace dev branch
+
+source Scripts/define_common.sh
+
+section_divider
+
+echo "You must be in the LoopWorkspace folder ready to bring in "
+echo " all the latest versions of the submodules which were "
+echo " just translated"
+echo ""
+echo "This script will prepare a PR to LoopWorkspace '${target_loopworkspace_branch}' branch"
+echo ""
+echo "1. If the branch name is not already '${translation_branch}', then"
+echo " that branch will be created and used for this PR"
+echo "2. ./Scripts/update_submodule_refs.sh will be executed"
+echo "3. The commit message in the ${message_file} will be used"
+cat ${message_file}
+echo "4. Once the PR is prepared, additional commits can be added as needed"
+
+section_divider
+
+echo "Enter y to proceed, any other character exits"
+read query
+
+if [[ ${query} == "y" ]]; then
+
+ current_branch=$(git branch --show-current 2>/dev/null)
+ echo "current_branch = $current_branch"
+
+ if [[ "${current_branch}" == "${translation_branch}" ]]; then
+ echo "already on $translation_branch, ok to continue"
+
+ elif [ -n "$(git branch --list "$translation_branch")" ]; then
+ echo "Local branch '$translation_branch' exists."
+ echo "You are on '$current_branch' and '$translation_branch' already exists"
+ echo "quitting"
+ exit 1 # exit with failure
+
+ else
+ echo "Local branch $translation_branch does not exist,"
+ echo "creating $translation_branch from the current branch, $current_branch."
+ git switch -c "${translation_branch}"
+ fi
+
+ section_divider
+
+ ./Scripts/update_submodule_refs.sh
+
+ section_divider
+
+ # only create a PR if there are changes
+ if git commit -a -F "${message_file}"; then
+ git push --set-upstream origin ${translation_branch}
+ pr=$(gh pr create -B ${target_loopworkspace_branch} --fill 2>&1 | grep http)
+ echo "PR = $pr"
+ open $pr
+
+ section_divider
+ echo "After you review, ${pr}, get approvals and merge the PR"
+ echo " be sure to trim the '${translation_branch}' branch,"
+ echo " and then run the export and upload scripts again from the updated '${target_loopworkspace_branch}' branch"
+ section_divider
+
+ else
+ section_divider
+ echo "No changes were found, no PR created"
+ section_divider
+ fi
+
+else
+ section_divider
+ echo "user opted to exit the script"
+ section_divider
+fi
diff --git a/Scripts/manual_cleanup.sh b/Scripts/manual_cleanup.sh
new file mode 100755
index 0000000000..3a36d01a1d
--- /dev/null
+++ b/Scripts/manual_cleanup.sh
@@ -0,0 +1,33 @@
+#!/bin/zsh
+
+# This script deletes temporary files and directories created during the translation process
+# You must be in the LoopWorkspace folder
+
+# ensure you really want to do this before executing with:
+# ./Scripts/manual_cleanup.sh
+
+set -e
+set -u
+
+echo " /////////// WARNING ///////////"
+echo "Be sure you are completely done with the translations process or"
+echo " that you want to discard all your work to date"
+echo " This deletes the xclocs, xliff_in, xliff_out folders"
+echo " This deletes the standard title for the PRs for submodules and LoopWorkspace"
+echo ""
+echo "Enter y return to continue, any other key to quit"
+read query
+echo ""
+
+if [[ ${query} == "y" ]]; then
+
+ rm -rf xclocs
+ rm -rf xliff_in
+ rm -rf xliff_out
+ rm "${message_file}"
+ echo "Temporary folders and ${message_file} removed from LoopWorkspace"
+
+else
+ echo "Exited without deleting folders and files"
+
+fi
diff --git a/Scripts/manual_download_from_lokalise.sh b/Scripts/manual_download_from_lokalise.sh
new file mode 100755
index 0000000000..fce79c1dc4
--- /dev/null
+++ b/Scripts/manual_download_from_lokalise.sh
@@ -0,0 +1,46 @@
+#!/bin/zsh
+
+# This script will import the latest translations from lokalise and
+# generate a standard commit message for subsequent pull requires
+
+# Install the lokalise command line tools from https://github.com/lokalise/lokalise-cli-2-go
+# Generate an API Token (not an SDK Token!) following the instructions here: https://docs.lokalise.com/en/articles/1929556-api-tokens
+# export LOKALISE_TOKEN=""
+
+# You must be in the LoopWorkspace folder before executing with:
+# ./Scripts/manual_download_from_lokalise.sh
+
+set -e
+set -u
+
+: "$LOKALISE_TOKEN"
+
+date=`date`
+
+source Scripts/define_common.sh
+
+# Fetch translations from lokalise
+rm -rf xliff_in
+lokalise2 \
+ --token "$LOKALISE_TOKEN" \
+ --project-id "414338966417c70d7055e2.75119857" \
+ file download \
+ --format xliff \
+ --bundle-structure "%LANG_ISO%.%FORMAT%" \
+ --original-filenames=false \
+ --placeholder-format ios \
+ --export-empty-as skip \
+ --replace-breaks=false \
+ --unzip-to ./xliff_in
+
+# create the temporary file xlate_pr_title.txt using the date of the import from localize
+# this overwrites any existing file because we want to capture the date of the actual download
+
+echo "Updated translations from lokalise on ${date}" > "${message_file}"
+
+echo "The standard translation commit message is stored in ${message_file}"
+
+echo ""
+echo "Continue by reviewing the importing the files in xliff_in"
+echo " for each submodule with command:"
+echo "./Scripts/manual_import_localizations.sh"
\ No newline at end of file
diff --git a/Scripts/manual_export_localizations.sh b/Scripts/manual_export_localizations.sh
index 06a079c432..eb2836363f 100755
--- a/Scripts/manual_export_localizations.sh
+++ b/Scripts/manual_export_localizations.sh
@@ -1,9 +1,14 @@
#!/bin/zsh
+# This script creates the xliff files suitable to upload to lokalise
+
+# You must be in the LoopWorkspace folder before executing with:
+# ./Scripts/manual_export_localizations.sh
+
set -e
set -u
-LANGUAGES=(ar cs ru en zh-Hans nl fr de it nb pl es ja pt-BR vi da sv fi ro tr he sk hi)
+source Scripts/define_common.sh
argstring="${LANGUAGES[@]/#/-exportLanguage }"
IFS=" "; args=( $=argstring )
@@ -13,3 +18,6 @@ xcodebuild -scheme LoopWorkspace -exportLocalizations -localizationPath xclocs $
mkdir -p xliff_out
find xclocs -name '*.xliff' -exec cp {} xliff_out \;
+echo ""
+echo "Next step is to upload the xliff_out files to lokalise with"
+echo "./Scripts/manual_upload_to_lokalise.sh"
\ No newline at end of file
diff --git a/Scripts/manual_finalize_translations.sh b/Scripts/manual_finalize_translations.sh
new file mode 100755
index 0000000000..d18f04d7ed
--- /dev/null
+++ b/Scripts/manual_finalize_translations.sh
@@ -0,0 +1,24 @@
+#!/bin/zsh
+
+set -e
+set -u
+
+# this script commits the changes to translations branch, pushes and opens PR
+
+source Scripts/define_common.sh
+
+for project in ${projects}; do
+ echo "Commiting $project"
+ IFS=":" read user dir branch <<< "$project"
+ echo "parts = $user $dir $branch"
+ cd $dir
+ git add .
+ # skip repositories with no changes
+ if git commit -F "../${message_file}"; then
+ git push --set-upstream origin ${translation_branch}
+ pr=$(gh pr create -B $branch -R $user/$dir --fill 2>&1 | grep http)
+ echo "PR = $pr"
+ open $pr
+ fi
+ cd -
+done
diff --git a/Scripts/manual_import_localizations.sh b/Scripts/manual_import_localizations.sh
index 46e58e0a1b..74f46e0ee7 100755
--- a/Scripts/manual_import_localizations.sh
+++ b/Scripts/manual_import_localizations.sh
@@ -1,37 +1,18 @@
#!/bin/zsh
-# manually download and put the xliff files in the xliff_in folder
-# this script imports the customization into the users local clone of LoopWorkspace
+# This script imports localizations from xliff files into the users local clone of LoopWorkspace
+# You must be in the LoopWorkspace folder
+
+# Fetch translations from lokalise before running this script
+# ./Scripts/manual_download_from_lokalise.sh
+
+# Then execute script:
+# ./Scripts/manual_import_localizations.sh
set -e
set -u
-date=`date`
-
-translation_dir="translations"
-
-# Fetch translations from Lokalise manually before running this script
-# They need to be in the xliff_in folder at the LoopWorkspace level
-
-projects=( \
- LoopKit:AmplitudeService:dev \
- LoopKit:CGMBLEKit:dev \
- LoopKit:dexcom-share-client-swift:dev \
- LoopKit:G7SensorKit:main \
- LoopKit:LibreTransmitter:main \
- LoopKit:LogglyService:dev \
- LoopKit:Loop:dev \
- LoopKit:LoopKit:dev \
- LoopKit:LoopOnboarding:dev \
- LoopKit:LoopSupport:dev \
- LoopKit:MinimedKit:main \
- LoopKit:NightscoutRemoteCGM:dev \
- LoopKit:NightscoutService:dev \
- LoopKit:OmniBLE:dev \
- LoopKit:OmniKit:main \
- LoopKit:RileyLinkKit:dev \
- LoopKit:TidepoolService:dev \
- )
+source Scripts/define_common.sh
for project in ${projects}; do
echo "Prepping $project"
@@ -40,8 +21,8 @@ for project in ${projects}; do
cd $dir
git checkout $branch
git pull
- git branch -D ${translation_dir} || true
- git checkout -b ${translation_dir} || true
+ git branch -D ${translation_branch} || true
+ git checkout -b ${translation_branch} || true
cd -
done
@@ -50,10 +31,12 @@ set -o pipefail && time xcodebuild -workspace LoopWorkspace.xcworkspace -scheme
# Apply translations
foreach file in xliff_in/*.xliff
- echo "**********************************"
+ section_divider
echo " importing ${file}"
- echo "**********************************"
+ section_divider
xcodebuild -workspace LoopWorkspace.xcworkspace -scheme "LoopWorkspace" -importLocalizations -localizationPath $file
end
-## examine diffs before using the next script
\ No newline at end of file
+echo ""
+echo "Continue by reviewing the differences for each submodule with command:"
+echo "./Scripts/manual_review_translations.sh"
\ No newline at end of file
diff --git a/Scripts/manual_review_translations.sh b/Scripts/manual_review_translations.sh
index 121d01637c..59a50e78b1 100755
--- a/Scripts/manual_review_translations.sh
+++ b/Scripts/manual_review_translations.sh
@@ -1,30 +1,15 @@
#!/bin/zsh
-# archive previously created translation branches as test_translations as a "reset" action
+# This script assists in reviewing translations for each submodule after running
+# ./Scripts/manual_import_localizations.sh
+# and before running
+# ./Scripts/manual_finalize_translations.sh
+# You must be in the LoopWorkspace folder
set -e
set -u
-translation_dir="translations"
-projects=( \
- LoopKit:AmplitudeService:dev \
- LoopKit:CGMBLEKit:dev \
- LoopKit:dexcom-share-client-swift:dev \
- LoopKit:G7SensorKit:main \
- LoopKit:LibreTransmitter:main \
- LoopKit:LogglyService:dev \
- LoopKit:Loop:dev \
- LoopKit:LoopKit:dev \
- LoopKit:LoopOnboarding:dev \
- LoopKit:LoopSupport:dev \
- LoopKit:MinimedKit:main \
- LoopKit:NightscoutRemoteCGM:dev \
- LoopKit:NightscoutService:dev \
- LoopKit:OmniBLE:dev \
- LoopKit:OmniKit:main \
- LoopKit:RileyLinkKit:dev \
- LoopKit:TidepoolService:dev \
- )
+source Scripts/define_common.sh
echo "Each submodule will have git status displayed"
echo " Use a separate terminal of a given folder if you want to make adjustments"
@@ -32,11 +17,11 @@ echo "Hit return when ready"
read query
for project in ${projects}; do
- echo "Review diffs for ${translation_dir} branch for $project"
+ echo "Review diffs for ${translation_branch} branch for $project"
IFS=":" read user dir branch <<< "$project"
echo "parts = $user $dir $branch"
cd $dir
- if git switch ${translation_dir}; then
+ if git switch ${translation_branch}; then
git status
folder_path="${PWD}"
echo ""
@@ -48,3 +33,7 @@ for project in ${projects}; do
done
echo "Done reviewing diffs"
+
+echo ""
+echo "Continue by committing the updates and creating PR with"
+echo "./Scripts/manual_finalize_translations.sh"
\ No newline at end of file
diff --git a/Scripts/manual_translations_finalize.sh b/Scripts/manual_translations_finalize.sh
deleted file mode 100755
index ef2c06bfaa..0000000000
--- a/Scripts/manual_translations_finalize.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/zsh
-
-set -e
-set -u
-
-# this script commits the changes to translations branch, pushes and opens PR
-translation_dir="translations"
-
-date="date"
-
-projects=( \
- LoopKit:AmplitudeService:dev \
- LoopKit:CGMBLEKit:dev \
- LoopKit:dexcom-share-client-swift:dev \
- LoopKit:G7SensorKit:main \
- LoopKit:LibreTransmitter:main
- LoopKit:LogglyService:dev \
- LoopKit:Loop:dev \
- LoopKit:LoopKit:dev \
- LoopKit:LoopOnboarding:dev \
- LoopKit:LoopSupport:dev \
- LoopKit:MinimedKit:main \
- LoopKit:NightscoutRemoteCGM:dev \
- LoopKit:NightscoutService:dev \
- LoopKit:OmniBLE:dev \
- LoopKit:OmniKit:main \
- LoopKit:RileyLinkKit:dev \
- LoopKit:TidepoolService:dev)
-
-for project in ${projects}; do
- echo "Commiting $project"
- IFS=":" read user dir branch <<< "$project"
- echo "parts = $user $dir $branch"
- cd $dir
- git add .
- # if block skips repositories with no changes
- if git commit -am "Updated translations from Lokalise on ${date}"; then
- git push --set-upstream origin ${translation_dir}
- pr=$(gh pr create -B $branch -R $user/$dir --fill 2>&1 | grep http)
- echo "PR = $pr"
- open $pr
- fi
- cd -
-done
diff --git a/Scripts/manual_upload_to_lokalise.sh b/Scripts/manual_upload_to_lokalise.sh
new file mode 100755
index 0000000000..3291b94a31
--- /dev/null
+++ b/Scripts/manual_upload_to_lokalise.sh
@@ -0,0 +1,52 @@
+#!/bin/zsh
+
+# This script will upload the xliff files from LoopWorkspace and submodules to lokalise
+
+# Install the lokalise command line tools from https://github.com/lokalise/lokalise-cli-2-go
+# Generate an API Token (not an SDK Token!) following the instructions here: https://docs.lokalise.com/en/articles/1929556-api-tokens
+# export LOKALISE_TOKEN=""
+
+# The token must have read/write access or this script will fail
+
+# This script should be run first:
+# ./Scripts/manual_export_localizations.sh
+
+# You must be in the LoopWorkspace folder before executing with:
+# ./Scripts/manual_upload_to_lokalise.sh
+
+set -e
+set -u
+
+: "$LOKALISE_TOKEN"
+
+source Scripts/define_common.sh
+
+echo "This will upload an xliff file for each language to lokalise"
+echo " Each uploaded file will be queued and processed"
+echo "Enter y to proceed, any other character exits"
+read query
+
+if [[ ${query} == "y" ]]; then
+
+ cd xliff_out
+
+ foreach lang in $LANGUAGES
+
+ # modify the hyphen to underscore to support lokalise lang-iso expectation
+ lang_iso=$(sed "s/zh-Hans/zh_Hans/g; s/pt-BR/pt_BR/g" <<<"$lang")
+
+ lokalise2 \
+ --token $LOKALISE_TOKEN \
+ --convert-placeholders=false \
+ --project-id 414338966417c70d7055e2.75119857 \
+ file upload \
+ --file ${lang}.xliff \
+ --cleanup-mode \
+ --lang-iso ${lang_iso}
+ end
+
+ echo "Reminder: At lokalise, wait until all uploaded files are processed"
+
+else;
+ echo "The upload to lokalise was skipped"
+fi
diff --git a/Scripts/update_submodule_refs.sh b/Scripts/update_submodule_refs.sh
index c221eb3a6e..51bc03fb5c 100755
--- a/Scripts/update_submodule_refs.sh
+++ b/Scripts/update_submodule_refs.sh
@@ -1,6 +1,6 @@
#!/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:NightscoutRemoteCGM:dev LoopKit:NightscoutService:dev LoopKit:OmniBLE:dev LoopKit:TidepoolService:dev LoopKit:dexcom-share-client-swift:dev ps2:RileyLinkKit:dev LoopKit:OmniKit:main LoopKit:MinimedKit:main LoopKit:LibreTransmitter:main LoopKit:MixpanelService:main)
+source Scripts/define_common.sh
for project in ${projects}; do
echo "Updating to $project"
diff --git a/TidepoolService b/TidepoolService
index 6e007cbde9..263d7f8e29 160000
--- a/TidepoolService
+++ b/TidepoolService
@@ -1 +1 @@
-Subproject commit 6e007cbde9920a9d8f25ae855deb36f989a2ce0f
+Subproject commit 263d7f8e297c4ef8f71c6416d58a8c1104c12955
diff --git a/VersionOverride.xcconfig b/VersionOverride.xcconfig
index 0ff12d1d9d..7f4543d551 100644
--- a/VersionOverride.xcconfig
+++ b/VersionOverride.xcconfig
@@ -8,5 +8,5 @@
// Version [for DIY Loop]
// configure the version number in LoopWorkspace
-LOOP_MARKETING_VERSION = 3.7.5
+LOOP_MARKETING_VERSION = 3.7.6
CURRENT_PROJECT_VERSION = 57
diff --git a/dexcom-share-client-swift b/dexcom-share-client-swift
index 21d8657d72..77f98ee4d1 160000
--- a/dexcom-share-client-swift
+++ b/dexcom-share-client-swift
@@ -1 +1 @@
-Subproject commit 21d8657d727f26df76342188e580022bf4884714
+Subproject commit 77f98ee4d155ea00e9bff6360c577f62c456f2c6