Wrong pluralization for non-english languages #356

Closed
opened 2026-02-04 18:58:35 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @jonas-koeritz on GitHub (Jun 14, 2017).

For Bug Reports

  • BookStack Version: v0.16.3
  • PHP Version: irrelevant
  • MySQL Version: irrelevant
Expected Behavior

Correct pluralization of terms for non-english languages.

Actual Behavior

The profile view uses str_plural() to pluralize terms. This only works for english nouns. German nouns get pluralized the wrong way.

Proposed fix

Switch to trans_choice() to provide localized pluralizations.

Originally created by @jonas-koeritz on GitHub (Jun 14, 2017). ### For Bug Reports * BookStack Version: v0.16.3 * PHP Version: irrelevant * MySQL Version: irrelevant ##### Expected Behavior Correct pluralization of terms for non-english languages. ##### Actual Behavior The profile view uses str_plural() to pluralize terms. This only works for english nouns. German nouns get pluralized the wrong way. ##### Proposed fix Switch to [`trans_choice()`](https://laravel.com/docs/master/localization#pluralization) to provide localized pluralizations.
OVERLORD added the 🐛 Bug label 2026-02-04 18:58:35 +03:00
Author
Owner

@timoschwarzer commented on GitHub (Aug 16, 2017):

+1

@timoschwarzer commented on GitHub (Aug 16, 2017): +1
Author
Owner

@ssddanbrown commented on GitHub (Sep 10, 2017):

@jonas-koeritz Thanks for creating this issue. View now updated, for v0.18 release, to use trans_choice. Lang files will need to be updated.

Relevant strings can be found under the keys: entities.x_books, entities.x_chapters, entities.x_pages.

@ssddanbrown commented on GitHub (Sep 10, 2017): @jonas-koeritz Thanks for creating this issue. View now updated, for v0.18 release, to use trans_choice. Lang files will need to be updated. Relevant strings can be found under the keys: `entities.x_books`, `entities.x_chapters`, `entities.x_pages`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#356