From 169f5725a82e9021a955453a4ace58a61c8171c1 Mon Sep 17 00:00:00 2001 From: Navid Date: Mon, 26 Feb 2024 09:24:45 -0500 Subject: [PATCH 1/2] Show download treatment for nsfollow only --- .../main/java/com/eveningoutpost/dexdrip/utils/Preferences.java | 2 +- app/src/main/res/xml/pref_data_source.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java b/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java index db28e5d7e2..4faa7f6461 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java @@ -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 diff --git a/app/src/main/res/xml/pref_data_source.xml b/app/src/main/res/xml/pref_data_source.xml index 65d9f3c78d..585fbd58ee 100644 --- a/app/src/main/res/xml/pref_data_source.xml +++ b/app/src/main/res/xml/pref_data_source.xml @@ -193,7 +193,7 @@ android:summary="@string/summary_nsfollow_url" android:title="@string/title_nsfollow_url" /> Date: Wed, 6 Mar 2024 16:30:39 +0100 Subject: [PATCH 2/2] Add a few missing strings for translation in crowdin (#3252) * Add a few missing strings for translation in crowdin * Add a few missing strings for translation in crowdin * Update xdrip_plus_prefs.xml Removed typo * Add missing string for translating falling/rising bg * Adjust string name of Audio Focus options and remove bg falling/rising string from wear. --- .../dexdrip/EditAlertActivity.java | 2 +- .../dexdrip/MissedReadingActivity.java | 4 ++-- .../dexdrip/utilitymodels/Notifications.java | 4 ++-- .../res/layout/activity_missed_readings.xml | 24 +++++++++---------- app/src/main/res/values/arrays.xml | 10 ++++---- app/src/main/res/values/strings.xml | 21 ++++++++++++++++ .../main/res/xml/pref_advanced_settings.xml | 6 ++--- app/src/main/res/xml/pref_notifications.xml | 8 +++---- app/src/main/res/xml/xdrip_plus_prefs.xml | 2 +- 9 files changed, 51 insertions(+), 30 deletions(-) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/EditAlertActivity.java b/app/src/main/java/com/eveningoutpost/dexdrip/EditAlertActivity.java index aa658c8265..2781bf027b 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/EditAlertActivity.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/EditAlertActivity.java @@ -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); diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/MissedReadingActivity.java b/app/src/main/java/com/eveningoutpost/dexdrip/MissedReadingActivity.java index 0765597353..2026095bbd 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/MissedReadingActivity.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/MissedReadingActivity.java @@ -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(); } @@ -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(); } diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Notifications.java b/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Notifications.java index e3e6c9b038..12500de838 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Notifications.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Notifications.java @@ -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) { diff --git a/app/src/main/res/layout/activity_missed_readings.xml b/app/src/main/res/layout/activity_missed_readings.xml index 7e7ad60d67..dff801bb51 100644 --- a/app/src/main/res/layout/activity_missed_readings.xml +++ b/app/src/main/res/layout/activity_missed_readings.xml @@ -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" @@ -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" @@ -70,7 +70,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom" android:paddingBottom="5dp" - android:text="minutes" /> + android:text="@string/unit_minutes" /> @@ -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"/> @@ -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" @@ -201,14 +201,14 @@ android:layout_height="wrap_content" android:layout_gravity="bottom" android:paddingBottom="5dp" - android:text="minutes" /> + android:text="@string/unit_minutes" /> + android:text="@string/unit_seconds" /> diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 2b2c7a6dc6..7222b5530b 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -21,7 +21,7 @@ Companion App GlucoRx/Aidex App CareLink Follower - Disable Collection + @string/disable_collection @@ -234,10 +234,10 @@ - Don\'t adjust other app sounds - Lower volume of other apps - Pause other apps playing audio - Pause all other sounds + @string/audio_focus_dont_adjust_other_app_sounds + @string/audio_focus_lower_volume_of_other_apps + @string/audio_focus_pause_other_apps_playing_audio + @string/audio_focus_pause_all_other_sounds AUDIOFOCUS_NONE diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b20bc3b717..407600f987 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1876,4 +1876,25 @@ Access expired! Will refresh! Login expired! Please log in! Data Source: + Disable Collection + Insulin Pens + Editing + Enable Missed Reading Alert + Alert if no data received in: + Wait before raising the same alert after snooze: + Reraise alerts before snooze time + Alert Reraise time: + Select start time + Select end time + Accept Glucose + Process glucose data received from NSClient app + Use Health Connect + Audio Focus + Choose what to do with other apps while playing alerts and adjusting system volume levels + Don\'t adjust other app sounds + Lower volume of other apps + Pause other apps playing audio + Pause all other sounds + Use Camera Light + Flash camera light during alerts when connected to a charger diff --git a/app/src/main/res/xml/pref_advanced_settings.xml b/app/src/main/res/xml/pref_advanced_settings.xml index 1fb56d4075..b7ee5658eb 100644 --- a/app/src/main/res/xml/pref_advanced_settings.xml +++ b/app/src/main/res/xml/pref_advanced_settings.xml @@ -950,10 +950,10 @@ + android:summary="@string/process_glucose_data_received" /> + android:summary="@string/audio_focus_summary" + android:title="@string/audio_focus" /> + android:title="@string/use_camera_light" /> + android:title="@string/insulin_pens">