[Question]plural and singular implementation #413

Closed
opened 2026-02-04 19:43:05 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @msaus on GitHub (Aug 24, 2017).

Dear sir,

I have a question regarding the plural and singular implementation.

In Japanese, we do not have a such a grammar and so we do not put "s" to the right-most.

Is there any function to remove that "s"?

I know that following source code is putting "s" to the right-most.

vendor/laravel/framework/src/Illuminate/Support/helpers.php

Possibly... can we add some logic to view files?

Or controller side?

I guess I can fix it myself.

  • BookStack Version: v0.17.4

Regards,

Originally created by @msaus on GitHub (Aug 24, 2017). Dear sir, I have a question regarding the plural and singular implementation. In Japanese, we do not have a such a grammar and so we do not put "s" to the right-most. Is there any function to remove that "s"? I know that following source code is putting "s" to the right-most. vendor/laravel/framework/src/Illuminate/Support/helpers.php Possibly... can we add some logic to view files? Or controller side? I guess I can fix it myself. - BookStack Version: v0.17.4 Regards,
Author
Owner

@msaus commented on GitHub (Aug 24, 2017):

image
We do not need this red rectangle one.

@msaus commented on GitHub (Aug 24, 2017): ![image](https://user-images.githubusercontent.com/3432876/29657482-c3028d84-88f2-11e7-936e-df90a832a45d.png) We do not need this red rectangle one.
Author
Owner

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

Hi @msaus, Sorry for my late reply. This was also picked up by other users under #417.

I've now changed it to use the built in Laravel's trans_choice() function. This means pluralization can be manually set for each language now.

The changes for this and the added translation strings can be seen on this commit: 874386ceab

I'll close this issue now a solution has been implemented but if you need further help on this feel free to open a new issue or comment further on this one.

@ssddanbrown commented on GitHub (Sep 11, 2017): Hi @msaus, Sorry for my late reply. This was also picked up by other users under #417. I've now changed it to use the built in [Laravel's `trans_choice()`](https://laravel.com/docs/5.4/localization#pluralization) function. This means pluralization can be manually set for each language now. The changes for this and the added translation strings can be seen on this commit: 874386ceabe51692fdc5161bf0614d2bee086aff I'll close this issue now a solution has been implemented but if you need further help on this feel free to open a new issue or comment further on this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#413