Questions tagged [pluralize]

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.

146 questions
3
votes
1 answer

How to add pluralization to weblate translations files?

I am trying out weblate self hosting package (MaxOs Docker, to test it out) to manage my translations for an iOS and Android app. I see that pluralisation is possible, but I haven't found a way to add these to a project. When clicking on start new…
3
votes
1 answer

Humanizer fails to singularize or pluralize an italian word in C#

I have managed to singularize/pluralize an English word using Humanizer, but when I set the CultureInfo to Italian, it just adds an extra 's' to the word. For example: "Man".Pluralize() => "Men" ----- correct, It works as…
Lorenzo Goldoni
  • 555
  • 6
  • 22
3
votes
4 answers

Can I use linq's method of pluralizing a term?

In .net 3.5 if I generate a linq to sql data context, it does some wonderful magic to pluralize names. In my code I need to pluralize some terms. Can I use whatever method Linq is using to generate my plurals?
Mr Bell
  • 9,228
  • 18
  • 84
  • 134
3
votes
1 answer

Rails path helper with singular controller names

First of all a warning: I am new to Ruby on Rails. I am creating an application and run into the problem creating a controller when the entity has the same name in plural and singular. In my case it's "fish", so I have a Fish model, a…
José Ramón
  • 162
  • 11
3
votes
2 answers

rails4 // pluralize do pluralize when count is at 0

I have a big problem with pluralize : when 0, it does pluralize the word pluralize(@posts.size,"post") if @posts.size equals 0 : 0 posts if @posts.size equals 1 : 1 post if @posts.size equals 2 or more : n posts As it should not add an s when 0…
Ben
  • 5,030
  • 6
  • 53
  • 94
3
votes
1 answer

Hibernate pluralization

I have A MySQL database currently in production use for a CakePHP application A Java SE application accessing the same database via Hibernate, currently in development. I'm using the Netbeans "automigrate" feature to create the POJO classes and…
matiasf
  • 1,098
  • 1
  • 9
  • 17
3
votes
1 answer

FOSRestBundle: How to Avoid Automatic Pluralization of POST /login Route?

I have this Action to handle the user login also via REST api call: /** * Login Action * * @param Request $request */ public function postLoginAction(Request $request) { This is what php app/console router:debug shows me: en__RG__post_login …
electronix384128
  • 6,625
  • 11
  • 45
  • 67
3
votes
3 answers

Django {% blocktrans %}: How to handle pluralization inside a for loop?

I have the following loop in my Django template: {% for item in state.list %}
HTML (CUSTOMERS BY STATE)
{% if forloop.last %}

{{ forloop.counter }} Valued…

pete
  • 2,739
  • 4
  • 32
  • 46
3
votes
1 answer

Weird behavior of Django translation of one word in plural and singular form

In our code, we have the word "Photo" marked for translation in singular. At a different position in the code, we have this word in pluralized translation "Photo" / "Photos", liek so: 1 {% trans 'Photo' %} 2 {% trans 'Photos' %} and {{ x }} {%…
Simon Steinberger
  • 6,605
  • 5
  • 55
  • 97
2
votes
2 answers

rails can`t pluralize word 'affiche'

I have a model called affiche and model user class User < ActiveRecord::Base has_many :affiches class Affiche < ActiveRecord::Base belongs_to :user And there i get an error, trying to fetch from db: uninitialized constant User::Affich if it…
M2_
  • 217
  • 4
  • 14
2
votes
1 answer

Make plural when quantity is greater than 1

i already have this code but it does not work as expected. the word "piece" should be changed to "pieces" when the quantity is greater than 1. 2