Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocCards incorrectly pluralise the number of elements within them when only one is present #10098

Closed
6 of 7 tasks
olijeffers0n opened this issue May 2, 2024 · 2 comments · Fixed by #10118
Closed
6 of 7 tasks
Labels
bug An error in the Docusaurus core causing instability or issues with its execution difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan.

Comments

@olijeffers0n
Copy link

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

When a categories contain only a single item, it is correctly pluralised. See https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx#L35 - There appears to be some reference to pluralisation, however i get 1 items

Reproducible demo

No response

Steps to reproduce

https://github.com/PaperMC/docs Repo, and look at our Misc Project with the Tools category

Expected behavior

1 Item

Actual behavior

1 Items

Your environment

Self-service

  • I'd be willing to fix this bug myself.
@olijeffers0n olijeffers0n added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels May 2, 2024
@Josh-Cena
Copy link
Collaborator

Yes... I think the English version needs plural categories too.

@Josh-Cena Josh-Cena added difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. and removed status: needs triage This issue has not been triaged by maintainers labels May 5, 2024
@slorber
Copy link
Collaborator

slorber commented May 9, 2024

Hmmm yes, I actually just noticed that as well as part of this other PR: #10111 (review)

Sadly, all the theme-translation languages have a single plural form too. I'll do my best to fix them with google translate, but there will probably be mistakes for some languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan.
Projects
None yet
3 participants