Questions tagged [plural]

Pertaining to handling text that must change depending on the number of items involved, according to the rules of different languages.

Pertaining to handling text that must change depending on the number of items involved, according to the rules of different languages.

English only has two forms: "singular" and "plural":

  • You have 1 file
  • You have 2 files

Some languages have more complicated rules, however, and several different categories.

Suggested Reading

110 questions
1
vote
1 answer

getQuantityString not working on real device

I got an odd problem. The getQuantityString() method working on android studio simulator, but not working on the real device. This is my code in strings.xml:
archerLj
  • 199
  • 1
  • 2
  • 14
1
vote
2 answers

Routing trouble on Rails 3 (related to singular/plural)

I've read around the resources on how routing in Rails 3 works, but am running into some difficulties. In my app there are Blogs and my routes.rb contains: resources :blogs root :to => "home#index" URLs containing 'blogs' are work fine. However…
Space
  • 2,022
  • 1
  • 19
  • 29
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
1 answer

How to handle plurals in localisation objective-c iOS

I'm going through this page to see how to handle plurals. https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html#//apple_ref/doc/uid/10000171i-CH5-SW10 I've added an…
user1898829
  • 3,437
  • 6
  • 34
  • 62
1
vote
1 answer

Rails controller method going to plural form

I'm new to rails! Ok, I am trying to set up a user signup form. It is mapped as a singular resource in the routes map.resource :user And trying to create the user through the console works fine. the controller code for user's signup is as follows: …
Jty.tan
  • 808
  • 9
  • 25
1
vote
1 answer

Ruby on Rails - Define plural name of Model or Table

I have this model class Oferta < ActiveRecord::Base belongs_to :entidade has_many :candidatos, :through => :interesses has_many :interesses, foreign_key: "oferta_id", dependent: :destroy basically I have this model and model Interesse and its…
João Cunha
  • 9,929
  • 4
  • 40
  • 61
1
vote
1 answer

How to add inflections while app is running?

We've got an app that deals with crops like tomatoes, beans, and squash. One bean, many beans One tomato, many tomatoes One squash, many squash Some of the crops have very weird plural forms, eg. you never pick "one garlic" you pick "one head of…
Skud
  • 238
  • 2
  • 7
1
vote
0 answers

Context-sensitive pluralized model name translation in the Django admin?

I've got a Django app with the following model: from django.utils.translation import ugettext_lazy as _ class Student(models.Model): # a bunch of fields class Meta(object): verbose_name = _('student') verbose_name_plural =…
JK Laiho
  • 3,538
  • 6
  • 35
  • 42
1
vote
2 answers

Symfony2 plural translation with specific rules (when number ends in specific digit)

I'm trying to translate results count to Lithuanian and there are some specific rules. I'll try to explain them: All counts ending with zero (0, 10, 20 ... 1050, 1060...) and between 12 & 19 inclusive (12...19) All counts ending with one, except…
Karmalakas
  • 1,143
  • 2
  • 19
  • 39
1
vote
1 answer

Gettext wont parse plural forms when singular exists

Here is my case: I use gettext via Poedit to translate a PHP application. And I have a custom function for plurals: function ListOutput($result,$column_names,$singular='.',$plural='.',$link=false,$group=array(),$options=array()) Which is referenced…
Francois J
  • 31
  • 4
1
vote
2 answers

Naming of overloaded methods - singular or plural?

This question is about conventions. Let's say I have an object Basket that store various items in some private property (Basket._items). Now, I want to have a couple of methods for adding, removing and getting items. Each method can take either a…
dalgard
  • 3,614
  • 2
  • 22
  • 28
1
vote
2 answers

Rails 3: Routing and pluralization issue for has_one

I created a scaffold for Etho, where I am attempting to have a User get 1 single "ethos" to edit. Ethos was working but on the User model it was only working with has_many :ethos The user should only get 1 so I can create better associations. But…
Patrick A.
  • 103
  • 9
0
votes
3 answers

Mysql select on word (plural, singular)

In my Mysql DB I have a list of terms like (With First letters Capital and most of the time plurals) Hairdressers Restaurants Beauty Salons Fournitures For Restaurants On my website I have a searchbar where the user can search for those word (my…
Johny19
  • 5,364
  • 14
  • 61
  • 99
0
votes
0 answers

Does SwiftUI's inflection parameter really only work if used in directly in a Text widget?

When using SwiftUI's inflect parameter like this: import SwiftUI struct ContentView: View { @State var count = 1 var body: some View { VStack { VStack{ Text("^[\(count)…
Nerdy Bunz
  • 6,040
  • 10
  • 41
  • 100
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