1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-24 09:13:04 +02:00

escaped correctly percent symbol on low battery message, see issue #570

This commit is contained in:
oliexdev
2020-04-18 06:28:38 +02:00
parent 167d17b70d
commit 57d8f2a8a8
6 changed files with 27 additions and 22 deletions

View File

@@ -565,8 +565,13 @@ public class MainActivity extends BaseAppCompatActivity
Timber.e("Bluetooth unexpected error: %s", msg.obj);
break;
case SCALE_MESSAGE:
try {
String toastMessage = String.format(getResources().getString(msg.arg1), msg.obj);
Toast.makeText(getApplicationContext(), toastMessage, Toast.LENGTH_LONG).show();
Timber.d("Bluetooth scale message: " + toastMessage);
} catch (Exception ex) {
Timber.e("Bluetooth scale message error: " + ex);
}
break;
}
}

View File

@@ -212,7 +212,7 @@
<string name="label_year_view">Roční pohled</string>
<string name="label_measurement_bar">Panel měření</string>
<string name="action_donation">Darovat</string>
<string name="info_scale_low_battery">Baterie ve váze je téměř vybitá (%d%), prosím nabijte váhu</string>
<string name="info_scale_low_battery">Baterie ve váze je téměř vybitá (%d\\%%), prosím nabijte váhu</string>
<string name="info_bluetooth_connection_error_scale_offline">Nemohu se připojit k váze. Ujistěte se prosím, že je zapnutá.</string>
<string name="label_empty">prázdný</string>
<string name="label_age">Věk</string>

View File

@@ -237,7 +237,7 @@
<string name="label_is_on_right_axis">Auf der rechten Achse</string>
<string name="label_upgrade_to_openScale_pro">Bitte upgraden Sie auf openScale pro für Bluetooth-Unterstützung</string>
<string name="action_donation">Spende</string>
<string name="info_scale_low_battery">Niedriger Batteriestand (%d%), bitte aufladen oder Batterien der Waage austauschen</string>
<string name="info_scale_low_battery">Niedriger Batteriestand (%d\\%%), bitte aufladen oder Batterien der Waage austauschen</string>
<string name="info_bluetooth_connection_error_scale_offline">Keine Verbindung zur Waage, bitte überprüfen, ob sie eingeschaltet ist.</string>
<string name="label_empty">leer</string>
<string name="label_age">Alter</string>

View File

@@ -237,6 +237,6 @@
<string name="label_is_on_right_axis">Είναι στον δεξιό άξονα</string>
<string name="label_upgrade_to_openScale_pro">Παρακαλώ αναβαθμίστε σε openScale pro για υποστήριξη Bluetooth</string>
<string name="action_donation">Δωρεά</string>
<string name="info_scale_low_battery">Χαμηλό επίπεδο μπαταρίας (%d%), παρακαλώ αλλάξτε τις μπαταρίες της ζυγαριάς</string>
<string name="info_scale_low_battery">Χαμηλό επίπεδο μπαταρίας (%d\\%%), παρακαλώ αλλάξτε τις μπαταρίες της ζυγαριάς</string>
<string name="info_bluetooth_connection_error_scale_offline">Δεν μπορεί να γίνει σύνδεση με την ζυγαριά, παρακαλώ σιγουρευτείτε ότι η ζυγαριά είναι αναμμένη</string>
</resources>

View File

@@ -243,7 +243,7 @@
<string name="label_calories">Kaloriler</string>
<string name="label_upgrade_to_openScale_pro">Bluetooth desteği için openScale paralı sürüme yükseltin</string>
<string name="action_donation">Bağış</string>
<string name="info_scale_low_battery">Düşük pil düzeyi (%d%), lütfen tartının pilini değiştirin veya doldurun</string>
<string name="info_scale_low_battery">Düşük pil düzeyi (%d\\%%), lütfen tartının pilini değiştirin veya doldurun</string>
<string name="info_bluetooth_connection_error_scale_offline">Tartı ile bağlantı kurulamıyor, lütfen açık olduğundan emin olun.</string>
<string name="label_empty">boş</string>
<string name="label_age">Yaş</string>