mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +00:00
Fixed string formatting warnings.
This commit is contained in:
parent
3779b311fd
commit
5733d95fa5
3 changed files with 8 additions and 4 deletions
|
@ -69,8 +69,8 @@ public class DevicesAdapter extends ArrayAdapter<RestApi.Device>
|
||||||
upload.setText(RestApi.readableTransferRate(getContext(), conn.outBits));
|
upload.setText(RestApi.readableTransferRate(getContext(), conn.outBits));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
download.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
|
download.setText(RestApi.readableTransferRate(getContext(), 0));
|
||||||
upload.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
|
upload.setText(RestApi.readableTransferRate(getContext(), 0));
|
||||||
status.setText(r.getString(R.string.device_disconnected));
|
status.setText(r.getString(R.string.device_disconnected));
|
||||||
status.setTextColor(r.getColor(R.color.text_red));
|
status.setTextColor(r.getColor(R.color.text_red));
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,8 +68,9 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
|
||||||
items.setText(getContext()
|
items.setText(getContext()
|
||||||
.getString(R.string.files, model.inSyncFiles, model.globalFiles));
|
.getString(R.string.files, model.inSyncFiles, model.globalFiles));
|
||||||
size.setVisibility(VISIBLE);
|
size.setVisibility(VISIBLE);
|
||||||
size.setText(readableFileSize(getContext(), model.inSyncBytes) + " / " +
|
size.setText(getContext().getString(R.string.folder_size_format,
|
||||||
readableFileSize(getContext(), model.globalBytes));
|
readableFileSize(getContext(), model.inSyncBytes),
|
||||||
|
readableFileSize(getContext(), model.globalBytes)));
|
||||||
if (TextUtils.isEmpty(folder.invalid)) {
|
if (TextUtils.isEmpty(folder.invalid)) {
|
||||||
setTextOrHide(invalid, model.invalid);
|
setTextOrHide(invalid, model.invalid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -463,4 +463,7 @@ Please report any problems you encounter via Github.</string>
|
||||||
<string name="state_error">Error</string>
|
<string name="state_error">Error</string>
|
||||||
<string name="state_unknown">Unknown</string>
|
<string name="state_unknown">Unknown</string>
|
||||||
|
|
||||||
|
<!-- Format string for folder size, eg "500 MiB / 1 GiB" -->
|
||||||
|
<string name="folder_size_format">%1$s / %2$s</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue