Fix additional pluralization issues

This commit is contained in:
Dave Nicolson
2025-12-07 22:04:00 +01:00
parent 2df41bc02c
commit d2ed73f1ea
5 changed files with 16 additions and 8 deletions

View File

@@ -209,8 +209,10 @@ public class ScalarSearchProvider extends ComponentProviderAdapter {
filter.setSecondaryFilter(new ScalarTableSecondaryFilter());
scalarModel.addTableModelListener(
e -> setSubTitle(primarySubTitle + ' ' + scalarModel.getRowCount() + " items"));
scalarModel.addTableModelListener(e -> {
int rowCount = scalarModel.getRowCount();
setSubTitle(primarySubTitle + ' ' + rowCount + " item" + (rowCount == 1 ? "" : "s"));
});
scalarTable.installNavigation(tool);

View File

@@ -253,7 +253,9 @@ public class DWARFImporter {
}
monitor.setIndeterminate(true);
monitor.setMessage("Sorting " + sourceInfo.size() + " entries");
int sourceInfoSize = sourceInfo.size();
monitor.setMessage("Sorting " + sourceInfoSize + " entr" +
(sourceInfoSize == 1 ? "y" : "ies"));
sourceInfo.sort((i, j) -> Long.compareUnsigned(i.address(), j.address()));
monitor.setIndeterminate(false);
monitor.initialize(sourceInfo.size(), "DWARF: Applying Source Map Info");

View File

@@ -69,9 +69,12 @@ public class GFileSystemExtractAllTask extends AbstractFileExtractorTask {
catch (UnsupportedOperationException | IOException e) {
Msg.showError(this, parentComponent, "Error extracting file", e.getMessage());
}
Msg.info(this,
"Exported " + getTotalFilesExportedCount() + " files, " + getTotalDirsExportedCount() +
" directories, " + getTotalBytesExportedCount() + " bytes");
long files = getTotalFilesExportedCount();
long dirs = getTotalDirsExportedCount();
long bytes = getTotalBytesExportedCount();
Msg.info(this, "Exported " + files + " file" + (files == 1 ? "" : "s") + ", " + dirs +
" director" + (dirs == 1 ? "y" : "ies") + ", " + bytes + " byte" +
(bytes == 1 ? "" : "s"));
long elapsed = System.currentTimeMillis() - start_ts;

View File

@@ -92,7 +92,7 @@ public class TaintLabelsTableProvider extends ComponentProviderAdapter {
int unfilteredCount = model.getUnfilteredRowCount();
model.getDataFrame().dumpTableToDebug();
setSubTitle("" + rowCount + " items" +
setSubTitle("" + rowCount + " item" + (rowCount == 1 ? "" : "s") +
(rowCount != unfilteredCount ? " (of " + unfilteredCount + ")" : ""));
filterTable.repaint();
});

View File

@@ -92,7 +92,8 @@ public class UserManager {
try {
readUserListIfNeeded();
clearExpiredPasswords();
log.info("User file contains " + userList.size() + " entries");
int size = userList.size();
log.info("User file contains " + size + " entr" + (size == 1 ? "y" : "ies"));
}
catch (FileNotFoundException e) {
log.error("Existing User file not found.");