Skip to content

Pluralise the counts in the list summary - #91

Merged
bmxcode merged 1 commit into
mainfrom
pluralize-list-summary
Sep 5, 2026
Merged

bmxcode merged 1 commit into
mainfrom
pluralize-list-summary

Conversation

@bmxcode

@bmxcode bmxcode commented Sep 5, 2026

Copy link
Copy Markdown
Owner

What

samplerdisc list printed count nouns without a plural: "5 sample", and "1 volumes" / "1 file" for the singular cases. This adds a small _plural(count, noun) helper and applies it to the volume, file, partition, and kind counts.

The kind word stays the backend's own vocabulary — AKAI says sample and program (ADR-0023) — the fix only adds the missing -s. Every noun involved (volume, file, partition, sample, program, wav, aiff) pluralises with a plain -s, so nothing cleverer is needed.

Before / after:

2 volumes, 5 sample      ->  2 volumes, 5 samples
1 volumes, 1 sample      ->  1 volume, 1 sample
  VOL 2  (block 4, 1 files)  ->  VOL 2  (block 4, 1 file)

Test

Adds the first coverage of the list summary line — both the plural case (2 volumes / 3 samples / a 2-file and a 1-file volume) and the singular case (1 volume / 1 sample). list had no output test before.

Why now

Spotted while building the README demo GIF (#90), where the glitch was about to be immortalised. This lands first so the GIF can be regenerated on top of it.

🤖 Generated with Claude Code

`samplerdisc list` printed "5 sample" and "1 volumes" -- the count nouns
were never pluralised. The kind word stays the backend's own (AKAI says
sample and program, ADR-0023); only the plural -s was missing. A small
_plural helper now handles the volume, file, partition and kind counts,
so "1 volume, 1 sample" and "2 volumes, 3 samples" both read correctly.
Adds the first test of the list summary output, singular and plural.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bmxcode
bmxcode merged commit b937698 into main Sep 5, 2026
2 checks passed
@bmxcode
bmxcode deleted the pluralize-list-summary branch September 5, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant