1
Vote

Default Pluralization Culture

description

As described in this issue: http://mvcscaffolding.codeplex.com/workitem/9, there is no way to set a default pluralization culture to Get-PluralizedWord and Get-SingularizedWord commands, even if the programmer desire is writing an application in English, when the Windows installation is any non-English one. In my specific case, a Brazilian Portuguese installation.

To solve this, I suggest:
  • Make Scaffolding use English pluralization by default (Get-PluralizedWord and Get-SingularizedWord can receive an additional parameter, such as -Culture:en-US).
  • Allow MvcScaffolding to receive pluralization rules when user desire it. The community will implement the rules afterwards, as soon they need.

comments

SoftwareShinobi wrote Jul 28, 2012 at 5:00 PM

THIS WORKS!!!!

Thank you...I've got a team-mate in the Ukraine that will be very happy about this...

LeonelSanches wrote Sep 28, 2012 at 6:52 PM

Testing Custom Scaffold, I've found a curious (and weird) workaround:
  • Generate a Custom Scaffold from the Controller (I used ControllerWithContext)
Scaffold CustomTemplate MvcScaffolding.Controller ControllerWithContext
  • (Optional) Generate All Views Custom Scaffolds:
Scaffold CustomTemplate MvcScaffolding.RazorView _CreateOrEdit
Scaffold CustomTemplate MvcScaffolding.RazorView Create
Scaffold CustomTemplate MvcScaffolding.RazorView Delete
Scaffold CustomTemplate MvcScaffolding.RazorView Details
Scaffold CustomTemplate MvcScaffolding.RazorView Edit
Scaffold CustomTemplate MvcScaffolding.RazorView Empty
Scaffold CustomTemplate MvcScaffolding.RazorView Index
  • Try to generate your controller by the Model
Scaffold Controller YourModel
  • If you are intended to write your application in English, the Controllers and Views Folder Names will be pluralized correctly.
Well, this solves the problem for me, finally.