Pluralization

Hello, I have a huge trial project with non english entities (german) and the pluralization goes completely wrong. Is there any way to change the way radzen does the pluralization? Is there a way to pass a dictionary with singular and plural forms that migth get used by the code generator? Otherwise is makes no sense using Radzen when you have to change all occurences to the correct pluralization form manually.

Marc

2 Likes

Hi Marc,

You are right! We will provide an option to stop that in our next release:

Best Regards,
Vladimir

1 Like

Hi Marc,

We’ve just published Radzen 2.3.3 with optional pluralize/singularize.

Best Regards,
Vladimir

Thanks for the info.
This probably will solve the issues partly, but still leaves you alone if you have to do none english pluralization.

How about letting you pass in a dictionary with singular / plural names so that radzen could pick up the plural name from the dictionary? Or even let radzen automatically build a csv/json file with all singular entity names where the user migth add the corresponding plural names?

pluralization{{projectName}}.csv:
singular;plural
author;authors
book;books
publisher;publishers

Hi Marc,

Are you looking to localize your app in different language? The UI of the generated application is fully localizable:
https://www.radzen.com/documentation/internationalization/
You can change everything, from navigation menus and page titles to buttons text, labels, etc.

Best Regards,
Vladimir

Hi Vladimir. No, definitely not. I just would like to have plural names at UI level for entities with singular names in the database and would like to avoid the mess to rename every wrong plural name to the correct one. All the table names are german names, so the pluralization fails on nearly all tables.

Kind regards,

Marc

Hi Marc,

Using our new option you can stop pluralization when naming pages during code generation. In this case the CRUD pages will look like this:

  • [TABLE]
  • Add [TABLE]
  • Edit [TABLE]

Having different dictionaries for pluralization in other languages will require significant development effort and is not in our present roadmap.

Best Regards,
Vladimir

Hi Vladimir,

thanks for your reply. Unfortunately I am still not happy with this even though I appreciate your solution. It is not about localizing plural forms. I just don’t what to have ugly plural namings in my code. So to stay with the simple sample provided, I don’t want to have functions named like ‘getBuchs’ (wrong!) when it should be ‘getBuecher’ (= getBooks in english) . There are so many places in code where these not correctly generated plural forms appear that it is not very pleasing to work with! So, even when I indicate not to use pluralization, functions to fetch entities are still named with a wrong plural form. If you would provide a chance to provide a dictionary file or structure (json, csv, or whatever) with the structure singular:plural, you could just fetch the proper plural form for code generation. You don’t have to worry about localization as this is not the topic in this scenario.

And another suggestion:
Pluralize or singularize database table/view names as page names” unfortunately doesn’t tell you now whether Radzen is going to pluralize or singularize the names. You have to find it out by trial and error (chances that you are right the first time are 50/50 ;-)) You should better only mention one of these two possibilities:

  • Pluralize database table/view names as page namesor
  • Singularize database table/view names as page names

Kind regards,
Marc

Are there any new insights on this feature? I think many germans are looking forward to this. Pluralization is a mess in most RAD Tools for German Language

Regards
Thomas

We haven’t done anything with regards to pluralization rules for other languages as there doesn’t seem to be any working library capable of doing that. On the other hand maintaining a custom pluralization dictionary per application seems cumbersome. What we can do some day is to stop pluralization altogether - right now that checkbox only handles page names. We can do the same for the service methods and API controllers.

Hi!

Radzen 2.42.3 - "Edit Data Source"

Unchecked the option Pluralize or singularize ..., with the intention of generating the model exactly like the one in the database, but the model is changed, do you have any option to not change table names, keeping it exactly as in the database?