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
0
votes
1 answer

Are the CLDR pluralization rules predefined in Rails 3 or do you have to manually define them?

And if you do have to add the rules manually, where and how do you add them? I was trying with :locale => "fr" and according to http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html , everything within 0..2 should be…
randomguy
  • 12,042
  • 16
  • 71
  • 101
0
votes
1 answer

pluralize results if plural in symfony (good practice)

I have a filter bar that let me search some results within my database. I have a flash message that shows how many results are found when I enter a word inside it. this is my controller if ($filter != '') { …
chicken burger
  • 774
  • 2
  • 12
  • 32
0
votes
1 answer

Using plural in Zend_Translate (Array adapter)

Can anybody show me example of using Zend_Translate with Array Adapter when I need to make more than one plural forms for a word. For 1 entity first, for 2 - 4 entities second, for 5 and more - third form.
0
votes
1 answer

How to remove or edit the pluralization for comments and likes in rails

I am new to rails, and i am working on a rtl website! I am trying to fix the pluralization in comment.count and get_upvotes.size to be replaced by the other language words. I have heard that I can do it with Rails Internationalization (I18n) but I…
0
votes
3 answers

Entity Framework 6, Database-First & Custom Pluralization

To the point; is there any way to customize the pluralization service for database-first EF models? Specifically, I'd like to use the *Set suffix notation, wherein the entity sets and collection navigation properties are named accordingly: User to…
Dan Lugg
  • 20,192
  • 19
  • 110
  • 174
0
votes
0 answers

Angular, NG-pluralize with 2 counters

I have a challenge, I am building somewhat of a library which containts folders and files, when selecting these I want the proper messages to pop up, like: 1 file and 1 folder selected -or- 3 files and 2 folders selected I figured this would be easy…
B.Wesselink
  • 63
  • 12
0
votes
1 answer

How to prevent i18n to pluralize models in Rails?

After coding the app in English, I updated the language file (pt-BR.yml), the 'config/application.rb' (setting the default to pt-BR), and the 'inflections.rb'in order to have the error messages in my local language. However, Rails now does not find…
alainbex
  • 396
  • 4
  • 11
0
votes
1 answer

Pluralize text in function

I'm looking to be able to pluralize "Slide" in the below function: // Changes the default download button text function ps_download_button($args) { $download_text = 'Download ' . '(' . get_field('no_slides') . ' Slide)'; $args['text'] =…
Teege
  • 101
  • 6
0
votes
1 answer

Find if a word is plural of another

I am writing a program in Go to generate a report of crimes in my University. I have run into a roadblock where I need to find if one word is a plural of another. I am making a map of crimes first crimes := make(map[string]int) then, adding crimes…
Hasit Mistry
  • 329
  • 1
  • 4
  • 18
0
votes
1 answer

AngularJs ng-pluralize into component

AngularJs ng-pluralize into component didn't updated on model changes. ng-pluralize without component works fine On model update pluralize into index.html updated properly, and plural into component didn't update, although varaible into component…
0
votes
3 answers

Why does entity framework pluralize and capitalize entity class names?

Why does entity framework pluralize all the class names and capitalize the first letters by default? What are the advantages of doing this ? Probably a stupid question...but just out of curiosity?
Vishal
  • 12,133
  • 17
  • 82
  • 128
0
votes
1 answer

Rails Capitalization/Pluralization Rules

When dealing with resources (e.g. users) different parts of the rails app refer to them in one of several ways, some capitalized/singular, some lowercase/plural etc. At times this seems logical (e.g. a method for several resources vs. just one) but…
Diz
  • 61
  • 1
  • 7
0
votes
0 answers

Weird rails pluralization issue

I have a ruby on rails application that recently started giving me issues. I believe there may be a weird bug/feature in the way rails is pluralizing model names for the database. For example, I have a model called DiagExerciceWeekFive. The table…
0
votes
1 answer

Weird route behaivor for show view

I am making an application with all the model names in spanish. I am having some strange issues related with the singularization. My model: class Artista < ActiveRecord::Base attr_accessible :fecha, :foto, :instrumento, :nombre end My model name…
Zumwan
  • 1
  • 1
  • 4
0
votes
1 answer

i18n pluralization with ruby on rails 3.2

irb(main):023:0> article.impressions_count => 26 In the article show view I have: <%= t(".impressions", :impressions => @article.impressions_count) %> I would like pluralize with something like this on my es.yml file: impressions: one:…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
1 2 3
9
10