Pluralize stands for an automate script process, that checks a word (for example, english word "box") and adds its plural end "es", so it comes "boxes", when it is needed to be plural. Term is used in many programming languages.
Questions tagged [pluralize]
146 questions
1
vote
2 answers
pluralize and decapitalize nouns in Ruby
I am implementing a view count feature for particular web pages in Ruby on Rails. I use haml lists to achieve my end. (The JavaScript library takes the list and render it as dropdowns.)
Here is the code snippet:
%li.action
= link_to…

Sandah Aung
- 6,156
- 15
- 56
- 98
1
vote
0 answers
Issue with PluralizationServices (c#)
I was just playing with System.Data.Entity.Design.PluralizationServices.PluralizationService.
Have you experienced issues with this function?
If I have a string var with value "ducks" and run
string noun = "ducks";
noun =…

matt.whitby
- 47
- 10
0
votes
1 answer
Pluralizing rails 3 controller manually
I have a Rails 3 controller which is not pluralized (IphoneUser) - it already has some controller methods, and a model generated.
However I'd like now rather than when it gets too late into the game, to pluralize it.
What's the best way to pluralize…

1dayitwillmake
- 2,269
- 3
- 26
- 35
0
votes
1 answer
rails singularize to a / an
Is there a method that works similar to singularize to prepend "a" or "an according to the word?
like f(apple) # => an apple
f(carpet) #=> a carpet

Nick Ginanto
- 31,090
- 47
- 134
- 244
0
votes
1 answer
SwiftUI previews not working with pluralization using stringsdict files
Has anyone successfully gotten plurals to preview in SwiftUI?
Apple uses a .stringsdict file for handling pluralization. However, when attempting to render that string in a preview, for example:
Text("days \(1)", tableName: "Pluralized", bundle:…

esilver
- 27,713
- 23
- 122
- 168
0
votes
0 answers
How do you get plural currency name with JS?
I know I can use Intl.DisplayNames to get the singular form (e.g. US Dollar).
const currencyNameEnUs = new Intl.DisplayNames( 'en-US', { type: 'currency' } );
const currencyCode = 'USD';
console.log( currencyNameEnUs.of( currencyCode ) );
//…

Scott
- 45
- 5
0
votes
0 answers
Using more than one conditions on placeholder (JS)
I'm starting to learn JS and one of my tasks is to create a simple code to give the system time. I also wanted to increment it so it would give hour or hours based on what value the variable had (if it was 1, then the text is "hour"... if it was 2,…

Rodhis
- 19
- 6
0
votes
0 answers
Plurals in rails mailer don't work with TextHelper
I'm trying to pluralize a word in the subject of a rails mailer :
these two don't working :
subject: "Réservation pour #{pluralize(@step.number_of_people.to_i, "personne")}"
subject: "Réservation pour #{pluralize(@step.number_of_people.to_i,…

Ben
- 660
- 5
- 25
0
votes
0 answers
How to pluralize a label based on a number input
I have a number input controlled by (+) and (-) buttons. I added a unit label after the number with a span following the input, but now am having trouble figuring out how to pluralize the unit when you increase the number from 1 item --> 2 items
Is…

dungoroos
- 3
- 1
0
votes
0 answers
How to display "0" when using 'pluralize' in Django templates?
Edit: The issue isn't related to pluralize. See comment.
How do I make pluralize to display 0? In the database are 2 book listings ('books'), 6 physical copies ('book_instances'), and 0 available for borrowing ('bookinstance_available'). In the code…

YCode
- 1,192
- 1
- 12
- 28
0
votes
1 answer
Adding string pluralization to amCharts tooltip
I'm using an amCharts v4 Pie chart and currently I have this tooltip that appears when hovering on the slices:
series.slices.template.tooltipText = "{category}: {value.percent.formatNumber('#.')}% ({value} hours)
However, I would like to have the…

virtualdj
- 413
- 6
- 18
0
votes
1 answer
Entity Framework do not Pluralize my SQLServer database
I'm using .NET Framework 3.5. So I think the EF is also 3.5.
I saw something here: EF3.5 don't Singularize or Pluralize names.
Unfortunately in the current version of the Entity Framework, which ships in .NET 3.5 SP1, we don't make any attempt to…

hbrls
- 2,110
- 5
- 32
- 53
0
votes
1 answer
pluralization formats with django localisation
Iam just putting localization into a django project. I want to pluralize a sentence, what looks like this:
{% blocktrans count count=rows.count %}
in {{ count }} row
{% plural %}
in {{ count }} rows
{% endblocktrans %}
not very pretty, but ok,…

Asara
- 2,791
- 3
- 26
- 55
0
votes
1 answer
Pluralize/singularize a sentence using the compromise library in javascript
I'm trying to use the compromise library to pluralize/singularize sentences that take these forms:
const str1 = "10 dog";
const str2 = "a man and 3 cat";
const str3 = "a bear";
If I use the pluralize method from compromise, it returns the list of…

Kevin Whitaker
- 12,435
- 12
- 51
- 89
0
votes
1 answer
String pluralizer with NSNumberFormatter
I want to display a nicely formatted integer value via the usual pluralization technology .stringsdict file. (Apple docs here.)
So if I have one thing, I want my output to read
1 thing
But if I have two thousand, three hundred sixty-four things, I…

QED
- 9,803
- 7
- 50
- 87