mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-01 06:22:55 +01:00
Make some strings translatable
This commit is contained in:
parent
e75f4f84e1
commit
a941a6cd5f
@ -209,20 +209,20 @@ public class MiBandPairingActivity extends GBActivity {
|
|||||||
protected void performBluetoothPair(BluetoothDevice device) {
|
protected void performBluetoothPair(BluetoothDevice device) {
|
||||||
int bondState = device.getBondState();
|
int bondState = device.getBondState();
|
||||||
if (bondState == BluetoothDevice.BOND_BONDED) {
|
if (bondState == BluetoothDevice.BOND_BONDED) {
|
||||||
GB.toast("Already bonded with " + device.getName() + " (" + device.getAddress() + "), connecting...", Toast.LENGTH_SHORT, GB.INFO);
|
GB.toast(getString(R.string.miband_pairing_already_bonded, device.getName(), device.getAddress()), Toast.LENGTH_SHORT, GB.INFO);
|
||||||
performPair();
|
performPair();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bondingMacAddress = device.getAddress();
|
bondingMacAddress = device.getAddress();
|
||||||
if (bondState == BluetoothDevice.BOND_BONDING) {
|
if (bondState == BluetoothDevice.BOND_BONDING) {
|
||||||
GB.toast(this, "Bonding in progress: " + bondingMacAddress, Toast.LENGTH_LONG, GB.INFO);
|
GB.toast(this, getString(R.string.miband_pairing_in_progress, device.getName(), bondingMacAddress), Toast.LENGTH_LONG, GB.INFO);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GB.toast(this, "Creating bond with" + bondingMacAddress, Toast.LENGTH_LONG, GB.INFO);
|
GB.toast(this, getString(R.string.miband_pairing_creating_bond_with, device.getName(), bondingMacAddress), Toast.LENGTH_LONG, GB.INFO);
|
||||||
if (!device.createBond()) {
|
if (!device.createBond()) {
|
||||||
GB.toast(this, "Unable to pair with " + bondingMacAddress, Toast.LENGTH_LONG, GB.ERROR);
|
GB.toast(this, getString(R.string.miband_pairing_unable_to_pair_with, device.getName(), bondingMacAddress), Toast.LENGTH_LONG, GB.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,4 +338,8 @@
|
|||||||
|
|
||||||
<!-- Strings related to Vibration Activity -->
|
<!-- Strings related to Vibration Activity -->
|
||||||
<string name="title_activity_vibration">Vibration</string>
|
<string name="title_activity_vibration">Vibration</string>
|
||||||
|
<string name="miband_pairing_creating_bond_with">"Creating bond with %1$s (%2$s)"</string>
|
||||||
|
<string name="miband_pairing_unable_to_pair_with">"Unable to pair with %1$s (%s$s)"</string>
|
||||||
|
<string name="miband_pairing_in_progress">Bonding in progress: %1$s (%2$s)</string>
|
||||||
|
<string name="miband_pairing_already_bonded">"Already bonded with %1$s (%2$s), connecting…"</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user