Skip to content

Commit

Permalink
4.1.7 Fix issues with default activity name for portuguese.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel_liedke committed Aug 18, 2022
1 parent 6cf17ac commit 9218d2a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
5 changes: 0 additions & 5 deletions Meditate/resources-eng/properties/properties.xml

This file was deleted.

5 changes: 0 additions & 5 deletions Meditate/resources-por/properties/properties.xml

This file was deleted.

1 change: 1 addition & 0 deletions Meditate/resources-por/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<string id="meditateYogaActivityName">Meditação</string>
<string id="meditateBreathActivityName">Meditação</string>
<string id="activityName">Nome da atividade (use [time] para substituir pelo tempo da sessão e mantenha pequeno o nome):</string>
<string id="mediateActivityName">Meditação [time] 🙏</string>
<string id="pickMMSS">Escolha MM:SS</string>
<string id="pickHMM">Escolha H:MM</string>
<string id="waitingHRV">Aguardando VFC</string>
Expand Down
2 changes: 1 addition & 1 deletion Meditate/resources/properties/properties.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<properties>
<property id="activityName" type="string">Meditating [time] 🙏</property>
<property id="activityName" type="string"></property>
</properties>
</resources>
1 change: 1 addition & 0 deletions Meditate/resources/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<string id="meditateYogaActivityName">Meditating</string>
<string id="meditateBreathActivityName">Meditating</string>
<string id="activityName">Activity Name (use [time] to be replaced by session time and also keep name short):</string>
<string id="mediateActivityName">Meditating [time] 🙏</string>
<string id="pickMMSS">Pick MM:SS</string>
<string id="pickHMM">Pick H:MM</string>
<string id="waitingHRV">Waiting HRV</string>
Expand Down
5 changes: 3 additions & 2 deletions Meditate/source/activity/MeditateActivity.mc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ class MediteActivity extends HrvAlgorithms.HrvAndStressActivity {
// Retrieve activity name property from Garmin Express/Connect IQ
var activityNameProperty = Application.Properties.getValue("activityName");

// If it is empty, use default name
// If it is empty, use default name and save the property
if (activityNameProperty == null || activityNameProperty.length() == 0) {
activityNameProperty = Ui.loadResource(Rez.Strings.meditateYogaActivityName);
activityNameProperty = Ui.loadResource(Rez.Strings.mediateActivityName);
Application.Properties.setValue("activityName", activityNameProperty);
}

if (meditateModel.getActivityType() == ActivityType.Yoga) {
Expand Down

0 comments on commit 9218d2a

Please sign in to comment.