Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Mar 6, 2024
2 parents 04e075a + 81e6578 commit 46acfd6
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ protected void onCreate(Bundle savedInstanceState) {
audioPath = getExtra(savedInstanceState, "audioPath" ,alertType.mp3_file);
alertMp3File.setText(shortPath(audioPath));

status = "editing " + (above ? "high" : "low") + " alert";
status = getString(R.string.editing)+" " + (above ? getString(R.string.high) : getString(R.string.low)) + " "+getString(R.string.alert);
startHour = AlertType.time2Hours(alertType.start_time_minutes);
startMinute = AlertType.time2Minutes(alertType.start_time_minutes);
endHour = AlertType.time2Hours(alertType.end_time_minutes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinut
setTimeRanges();
}
}, startHour, startMinute, DateFormat.is24HourFormat(mContext));
mTimePicker.setTitle("Select start time");
mTimePicker.setTitle(getString(R.string.select_start_time));
mTimePicker.show();

}
Expand All @@ -214,7 +214,7 @@ public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinut
setTimeRanges();
}
}, endHour, endMinute, DateFormat.is24HourFormat(mContext));
mTimePicker.setTitle("Select end time");
mTimePicker.setTitle(getString(R.string.select_end_time));
mTimePicker.show();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,10 +910,10 @@ public static void ob1SessionRestartRequested() {
}

public static void RisingAlert(Context context, boolean on) {
RiseDropAlert(context, on, "bg_rise_alert", "bg rising fast" + " (@" + JoH.hourMinuteString() + ")", riseAlertNotificationId);
RiseDropAlert(context, on, "bg_rise_alert", context.getString(R.string.bg_rising_fast) + " (@" + JoH.hourMinuteString() + ")", riseAlertNotificationId);
}
public static void DropAlert(Context context, boolean on) {
RiseDropAlert(context, on, "bg_fall_alert", "bg falling fast" + " (@" + JoH.hourMinuteString() + ")", failAlertNotificationId);
RiseDropAlert(context, on, "bg_fall_alert", context.getString(R.string.bg_falling_fast) + " (@" + JoH.hourMinuteString() + ")", failAlertNotificationId);
}

public static void lowPredictAlert(Context context, boolean on, String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
}


final Preference nsFollowDownload = findPreference("nsfollow_download_treatments");
final Preference nsFollowDownload = findPreference("nsfollow_download_treatments_screen");
final Preference nsFollowUrl = findPreference("nsfollow_url");
final Preference nsFollowLag = findPreference("nsfollow_lag"); // Show the Nightscout follow wake delay setting only when NS follow is the data source
bindPreferenceSummaryToValue(findPreference("nsfollow_lag")); // Show the selected value as summary
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/res/layout/activity_missed_readings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:id="@+id/missed_reading_enable_alert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enable Missed Reading Alert"
android:text="@string/enable_missed_reading_alert"
android:textSize="15sp"
android:padding="5dp"
android:layout_gravity="left"
Expand All @@ -39,7 +39,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:text="Alert if no data received in:"
android:text="@string/alert_if_no_data_received_in_colon"
android:textSize="15sp"
android:layout_gravity="left"
android:paddingLeft="15dp"
Expand Down Expand Up @@ -70,15 +70,15 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:paddingBottom="5dp"
android:text="minutes" />
android:text="@string/unit_minutes" />
</LinearLayout>

<TextView
android:id="@+id/missed_reading_text_select_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Select time for alert:"
android:text="@string/select_time_for_alert_colon"
android:textSize="15sp"
android:layout_gravity="left"
android:paddingLeft="15dp"
Expand All @@ -90,7 +90,7 @@
android:id="@+id/missed_reading_all_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="All Day"
android:text="@string/all_day"
android:textSize="15sp"
android:padding="5dp"
android:layout_gravity="left"
Expand Down Expand Up @@ -143,7 +143,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:text="(tap to change)"
android:text="@string/tap_to_change"
android:textSize="15sp"
android:paddingRight="25dp"
android:id="@+id/missed_reading_instructions_start"/>
Expand All @@ -153,7 +153,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:text="(tap to change)"
android:text="@string/tap_to_change"
android:textSize="15sp"
android:paddingLeft="25dp"
android:id="@+id/missed_reading_instructions_end"/>
Expand All @@ -170,7 +170,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:text="Wait before raising the same alert after snooze:"
android:text="@string/wait_before_raising_the_same_alert_after_snooze_colon"
android:textSize="15sp"
android:layout_gravity="left"
android:paddingRight="10dp"
Expand Down Expand Up @@ -201,14 +201,14 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:paddingBottom="5dp"
android:text="minutes" />
android:text="@string/unit_minutes" />
</LinearLayout>

<CheckBox
android:id="@+id/missed_reading_enable_alerts_reraise"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reraise alerts before snooze time"
android:text="@string/reraise_alerts_before_snooze_time"
android:textSize="15sp"
android:padding="5dp"
android:layout_gravity="left"
Expand All @@ -222,7 +222,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:text="Alert Reraise time:"
android:text="@string/alert_reraise_time_colon"
android:textSize="15sp"
android:layout_gravity="left"
android:paddingLeft="15dp"
Expand Down Expand Up @@ -254,7 +254,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:paddingBottom="5dp"
android:text="seconds" />
android:text="@string/unit_seconds" />
</LinearLayout>


Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<item>Companion App</item>
<item>GlucoRx/Aidex App</item>
<item>CareLink Follower</item>
<item>Disable Collection</item>
<item>@string/disable_collection</item>
</string-array>

<string-array name="DexCollectionMethodValues">
Expand Down Expand Up @@ -234,10 +234,10 @@
</string-array>

<string-array name="AudioFocus">
<item>Don\'t adjust other app sounds</item>
<item>Lower volume of other apps</item>
<item>Pause other apps playing audio</item>
<item>Pause all other sounds</item>
<item>@string/audio_focus_dont_adjust_other_app_sounds</item>
<item>@string/audio_focus_lower_volume_of_other_apps</item>
<item>@string/audio_focus_pause_other_apps_playing_audio</item>
<item>@string/audio_focus_pause_all_other_sounds</item>
</string-array>
<string-array name="AudioFocusValues">
<item>AUDIOFOCUS_NONE</item>
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1876,4 +1876,25 @@
<string name="carelink_credential_status_access_expired">Access expired! Will refresh!</string>
<string name="carelink_credential_status_refresh_expired">Login expired! Please log in!</string>
<string name="data_source">Data Source:</string>
<string name="disable_collection">Disable Collection</string>
<string name="insulin_pens">Insulin Pens</string>
<string name="editing">Editing</string>
<string name="enable_missed_reading_alert">Enable Missed Reading Alert</string>
<string name="alert_if_no_data_received_in_colon">Alert if no data received in:</string>
<string name="wait_before_raising_the_same_alert_after_snooze_colon">Wait before raising the same alert after snooze:</string>
<string name="reraise_alerts_before_snooze_time">Reraise alerts before snooze time</string>
<string name="alert_reraise_time_colon">Alert Reraise time:</string>
<string name="select_start_time">Select start time</string>
<string name="select_end_time">Select end time</string>
<string name="accept_glucose">Accept Glucose</string>
<string name="process_glucose_data_received">Process glucose data received from NSClient app</string>
<string name="use_health_connect">Use Health Connect</string>
<string name="audio_focus">Audio Focus</string>
<string name="audio_focus_summary">Choose what to do with other apps while playing alerts and adjusting system volume levels</string>
<string name="audio_focus_dont_adjust_other_app_sounds">Don\'t adjust other app sounds</string>
<string name="audio_focus_lower_volume_of_other_apps">Lower volume of other apps</string>
<string name="audio_focus_pause_other_apps_playing_audio">Pause other apps playing audio</string>
<string name="audio_focus_pause_all_other_sounds">Pause all other sounds</string>
<string name="use_camera_light">Use Camera Light</string>
<string name="use_camera_light_summary">Flash camera light during alerts when connected to a charger</string>
</resources>
6 changes: 3 additions & 3 deletions app/src/main/res/xml/pref_advanced_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -950,10 +950,10 @@
<SwitchPreference
android:defaultValue="true"
android:key="accept_nsclient_sgv"
android:title="Accept Glucose"
android:title="@string/accept_glucose"
android:switchTextOff="@string/short_off_text_for_switches"
android:switchTextOn="@string/short_on_text_for_switches"
android:summary="Process glucose data received from NSClient app" />
android:summary="@string/process_glucose_data_received" />
<SwitchPreference
android:defaultValue="true"
android:key="accept_nsclient_treatments"
Expand Down Expand Up @@ -1022,7 +1022,7 @@

<SwitchPreference
android:key="health_connect_enable"
android:title="Use Health Connect"
android:title="@string/use_health_connect"
android:summary="@string/requires_android_8_and_google_companion_application_or_android_14"
/>
<SwitchPreference
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/pref_data_source.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
android:summary="@string/summary_nsfollow_url"
android:title="@string/title_nsfollow_url" />
<PreferenceScreen
android:key="_nsfollow_download_treatments_screen"
android:key="nsfollow_download_treatments_screen"
android:title="@string/title_nsfollow_download_treatments">
<CheckBoxPreference
android:defaultValue="false"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/xml/pref_notifications.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
android:entries="@array/AudioFocus"
android:entryValues="@array/AudioFocusValues"
android:key="alert_audio_focus"
android:summary="Choose what to do with other apps while playing alerts and adjusting system volume levels"
android:title="Audio Focus" />
android:summary="@string/audio_focus_summary"
android:title="@string/audio_focus" />

<CheckBoxPreference
android:defaultValue="true"
Expand Down Expand Up @@ -82,10 +82,10 @@
<SwitchPreference
android:defaultValue="false"
android:key="flash_torch_alerts_charging"
android:summary="Flash camera light during alerts when connected to a charger"
android:summary="@string/use_camera_light_summary"
android:switchTextOff="@string/short_off_text_for_switches"
android:switchTextOn="@string/short_on_text_for_switches"
android:title="Use Camera Light" />
android:title="@string/use_camera_light" />

<CheckBoxPreference
android:defaultValue="false"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/xdrip_plus_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@
<PreferenceScreen
android:icon="@drawable/ic_mode_edit_grey_600_48dp"
android:key="pens_screen"
android:title="Insulin Pens">
android:title="@string/insulin_pens">
<PreferenceScreen
android:icon="@drawable/ic_mode_edit_grey_600_48dp"
android:key="opennov_screen"
Expand Down

0 comments on commit 46acfd6

Please sign in to comment.