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
1
vote
2 answers

How to pluralize two words in one sentence

I want to pluralize "prohibio" that is defined in my file reflections.rb: ActiveSupport::Inflector.inflections(:en) do |inflect| inflect.irregular 'estadistica', 'estadisticas' inflect.irregular 'error', 'errores' inflect.irregular…
Pepper 92
  • 211
  • 1
  • 11
1
vote
1 answer

Symfony pluralization ignoring floats

I'm using Symfony Translations ported into my framework. I found this in docs: '{0} There are no apples|{1} There is one apple|]1,19] There are %count% apples|[20,Inf[ There are many apples' The above string specifies four different intervals:…
simPod
  • 11,498
  • 17
  • 86
  • 139
1
vote
1 answer

Changing pluralized endpoint in SailsJS

Currently i have all my routes in Sails to be pluralized because im using ember. However i have an issue where Sails is not pluralizing a word properly. I have a quiz model, and when i do a findAll on quiz it returns nothing. Come to find out after…
NodeDad
  • 1,519
  • 2
  • 19
  • 48
1
vote
1 answer

Django admin model plural mode global settings, not adding suffix 's'

We're now using Django. And our Language is Chinese. While you know, In Chinese grammar, the plural case is usually the same as the single case. At least, not just adding an English letter 's' after the word. So, Since we've set the verbose_name of…
Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
1
vote
0 answers

Pluralize method for different language in Ruby on Rails

I am using the pluralize method in HTML files to dynamic value which the user can set as per their locale. i.e. If the user sets label department with the German word "Abteilung", it will append 's' as per current Rails Inflection rules for…
dipesh
  • 11
  • 1
1
vote
0 answers

Entity Framework 6 Custom Pluralization in VB.Net

I would like to take advantage of the new ability to customize pluralization with EF6. I've searched the entire intertwangles but can't find a decent example. I generate my model from the database (SQL Server) and I use custom T4 templates to…
whistle britches
  • 137
  • 2
  • 10
1
vote
2 answers

CSS to make phrase plural

Is it possible to transform a phrase to plural using just CSS, based on the number within the element? I'm guessing this breaks a presentation/data separation boundary philosophy, but just wondering if it's possible. It's easy with JavaScript, but…
Dave Sumter
  • 2,926
  • 1
  • 21
  • 29
1
vote
0 answers

Creating a three table joint table

I am trying to create a three table joint table. I have three tables, teacher, subject, and period. They would join into one table that is a combination of the three. I am trying to accomplish this by doing the following: combination table: class…
matthew
  • 467
  • 8
  • 23
1
vote
2 answers

ng-pluralize with translations Error:"TypeError"

Hi I am trying to localize the strings for pluralization in Angular. I am using ng-pluralize directive to handle pluralization and for localizations I am passing the strings to the directive at runtime based on user locale. But I am getting error…
shailbenq
  • 1,440
  • 1
  • 14
  • 25
1
vote
1 answer

Human readable fractional numbers in Rails?

I love the pluralize method in Rails. I'm hoping there's a similar mechanism for fractional numbers where they can be more human readable. For example, this would be ideal: > include ActionView::Helpers::TextHelper > pluralize(2.0, 'donut') => "2.0…
at.
  • 50,922
  • 104
  • 292
  • 461
1
vote
2 answers

Method for Pluralizing in Java

Does Java have a straightforward method for pluralizing a word? If not, I am wondering why it is not available when Rails has one. Any specific reasons?
Slowcoder
  • 2,060
  • 3
  • 16
  • 21
1
vote
1 answer

Pluralization with default_locale not working in Rails4 Beta1

I am just trying to setup an application in Rails 4, Beta 1. The application in (exclusively) in German and therefore also the URLs should be German. I want to create a controller and model for an entity called "Region"; Rails pluralizes that to…
Daniel
  • 2,409
  • 2
  • 26
  • 42
1
vote
0 answers

Why does Symfony 2 appear to require pluralization of translated messages?

Given a constraint on an object using message placeholders, e.g. /** * @Assert\MaxLength(limit = 25, message = "name.length.invalid") */ public $name; where name.length.invalid: 'Please enter a shorter name.' Why does Symfony by default force…
Sean Quinn
  • 2,131
  • 1
  • 18
  • 48
1
vote
1 answer

Using Code First and pluralizing ONLY `DbSet Entities` entries

I want to disable pluralization for database tables which is easy enough. However, I use reflection and T4 templates to generate my context class. public DbSet User { get; set; } public DbSet Department { get; set; } Is there any…
Raheel Khan
  • 14,205
  • 13
  • 80
  • 168
1
vote
0 answers

Find out which culture is used by ResourceLoader.GetString

I'm planning to develop a localized Windows 8 Store App. Microsoft recommends using resource files in tagged directories and the ResourceLoader class, so –for now– that's what I'm planning to do. For simple translations this works fine, e.g.: var…
Sebastian Negraszus
  • 11,915
  • 7
  • 43
  • 70