webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Language specific pluralization for de-de

Open ProjectDocHelp opened this issue 3 years ago • 8 comments

Version

v5.24.0

Operating System

all

Browser

all

What steps will reproduce the bug?

Set-Up a new Webiny. Choose the locale "de-DE"

Create a model - let's say one called "Artikel" (German for article) and one "Aufgabe" (German for To-Do)

What is the expected behavior?

I expect to see "Artikel" and "Aufgaben" in the admin ui.

What do you see instead?

I see "Artikels" and "Aufgabes" in the admin ui.

Additional information

The eight possible plural endings in de-de language

plural ending Example (singular -> plural) -e Tisch -> Tische -"e (with umlaut) Hand -> Hände -(e)n Tante -> Tanten -er Kind -> Kinder "er (with Umlaut) Haus -> Häuser Ø (null ending) Tiger -> Tiger -"Ø (with umlaut) Apfel -> Äpfel -s Auto -> Autos

There's a good sum of this here, it is in German language, but the table on the last page sums it up pretty well and will lead to correct results in 95% of the cases (the document was made to teach imigrants the German language) http://www.atesman.info/wp-content/uploads/2015/10/Plural-Q1-Info.pdf

Possible solution

Either implement no plural ending at all (at least in the admin panel), or correct them per language.

Quick fix idea

As an admin I could live with seeing the technical used plural s, but I at least want to be able to coinfigure it for editors/authors in a way they don't see the wrong "s" ending. The home turf of these people is language, they will instantly think low of a system making such an obvious mistake, but they won't mind seeing singular everywhere.

ProjectDocHelp avatar Mar 04 '22 07:03 ProjectDocHelp

Thanks! A very important issue 👍

Another solution brought up by @brunozoric is to simply use 2 inputs, 1 for singular, and 1 for plural forms. I personally saw this approach in one of the headless CMS-es out there, can't remember which one.

Pavel910 avatar Mar 04 '22 08:03 Pavel910

Another solution brought up by @brunozoric is to simply use 2 inputs, 1 for singular, and 1 for plural forms. I personally saw this approach in one of the headless CMS-es out there, can't remember which one.

I definitely have used that function in the Wordpress internationalisation tool, WPML (https://wpml.org). I could spin up an example if that's helpful?

endymion1818 avatar Mar 04 '22 09:03 endymion1818

I'm sure I saw it in some other system, not Wordpress. Thanks @endymion1818 no need to spend time on that, it's enough to know that it's not a wild idea, but is actually used in other systems out there.

Pavel910 avatar Mar 04 '22 09:03 Pavel910

Maybe use this: https://www.npmjs.com/package/plural-rules

Pavel910 avatar Mar 09 '22 07:03 Pavel910

Just for reference, here's how it works in Strapi:

image

SvenAlHamad avatar Mar 14 '22 15:03 SvenAlHamad

This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.

webiny-bot avatar Jul 13 '22 07:07 webiny-bot

This one is about to get closed and I can't remove the label. A pity. 😭

ProjectDocHelp avatar Jul 14 '22 17:07 ProjectDocHelp

@HOKComics there, removed :) Thanks for chiming in 👍

Pavel910 avatar Jul 14 '22 18:07 Pavel910