1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00

Make some strings translatable

This commit is contained in:
cpfeiffer 2016-10-28 23:47:39 +02:00
parent e75f4f84e1
commit a941a6cd5f
2 changed files with 8 additions and 4 deletions

View File

@ -209,20 +209,20 @@ public class MiBandPairingActivity extends GBActivity {
protected void performBluetoothPair(BluetoothDevice device) {
int bondState = device.getBondState();
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();
return;
}
bondingMacAddress = device.getAddress();
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;
}
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()) {
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);
}
}

View File

@ -338,4 +338,8 @@
<!-- Strings related to Vibration Activity -->
<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>