Plurals fixed in GLS and CGMS

This commit is contained in:
Aleksander Nowakowski
2018-06-26 11:15:45 +02:00
parent aad8536f0f
commit 26003ab03b
3 changed files with 11 additions and 3 deletions

View File

@@ -275,7 +275,11 @@ public class CGMService extends BleProfileService implements CGMSManagerCallback
@Override
public void onNumberOfRecordsRequested(@NonNull final BluetoothDevice device, final int value) {
if (value == 0)
showToast(R.string.gls_progress_zero);
else
showToast(getResources().getQuantityString(R.plurals.gls_progress, value, value));
}
@Override

View File

@@ -191,6 +191,9 @@ public class GlucoseActivity extends BleProfileExpandableListActivity implements
@Override
public void onNumberOfRecordsRequested(final BluetoothDevice device, final int value) {
if (value == 0)
showToast(R.string.gls_progress_zero);
else
showToast(getResources().getQuantityString(R.plurals.gls_progress, value, value));
}

View File

@@ -162,6 +162,7 @@
<string name="gls_context_hba1c_title">HbA1c</string>
<string name="gls_context_hba1c">%f%%</string>
<string name="gls_progress_zero">No records found</string>
<plurals name="gls_progress">
<item quantity="zero">No records found</item>
<item quantity="one">Downloading %d record</item>