Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some plural forms seam to be hardcoded #1983

Closed
XioR112 opened this issue Mar 29, 2024 · 13 comments · Fixed by #2074
Closed

Some plural forms seam to be hardcoded #1983

XioR112 opened this issue Mar 29, 2024 · 13 comments · Fixed by #2074
Labels
bug Something isn't working

Comments

@XioR112
Copy link
Contributor

XioR112 commented Mar 29, 2024

Some text uses singular form + s witch doesn't work in other languages.

For example:
obraz

obraz

@Floppy
Copy link
Collaborator

Floppy commented Mar 29, 2024

Thanks, I've probably missed a pluralize() or two around the place.

@Floppy Floppy moved this from Maybe to Soon in Manyfold Development Apr 12, 2024
@Floppy
Copy link
Collaborator

Floppy commented Apr 21, 2024

The app should know how to properly pluralize things via https://github.com/svenfuchs/rails-i18n. Perhaps I'm not calling things right.

@Floppy
Copy link
Collaborator

Floppy commented Apr 21, 2024

@XioR112 could you give me an example of how you'd pluralize, say, Models? Like, "1 model", "10 models", "100 models"? Rails has a way to represent these things (including many-clause pluralizations like one/few/many/other), so if you can pop me an example, I'll make sure it works then add it to the translation instructions.

@XioR112
Copy link
Contributor Author

XioR112 commented Apr 21, 2024

singular form - model
ending with 2, 3, 4 with exception of 12, 13, 14 - modele
the rest - modeli

singular form - twórca
ending with 2, 3, 4 with exception of 12, 13, 14 - twórców
the rest - twórców

singular form - biblioteka
ending with 2, 3, 4 with exception of 12, 13, 14 - biblioteki
the rest - bibliotek

@XioR112
Copy link
Contributor Author

XioR112 commented Apr 21, 2024

Grammatical cases

singular form - mianownik, singular
ending with 2, 3, 4 with exception of 12, 13, 14 - biernik, plural
the rest - dopełniacz, plural

obraz

@Floppy
Copy link
Collaborator

Floppy commented Apr 21, 2024

Fantastic, thanks, I will have a poke around with the translation files and see if can make that work.

@XioR112
Copy link
Contributor Author

XioR112 commented Apr 22, 2024

I wanted to clarify we use dopełniacz with not only 12, 13 and 14 but every number ending with them.

@Floppy
Copy link
Collaborator

Floppy commented Apr 23, 2024

OK, I think I've resolved this in #2074. There are new keys added to the model names for one and other pluralizations in german and french, and one few and other for polish. few is used for your 2,3,4 case as you can see at https://github.com/svenfuchs/rails-i18n/blob/master/rails/pluralization/pl.rb.

I've added the pluralisations I was sure about, but it will be best to check them over. @Andreaj42 and @ToasterUwU, might you be able to check the translations for your preferred languages? Search for "one" and "other" in the translation.io interface to check the new stuff.

@github-project-automation github-project-automation bot moved this from Soon to Done in Manyfold Development Apr 23, 2024
@github-project-automation github-project-automation bot moved this from Maybe to Done in Manyfold Roadmap Apr 23, 2024
@XioR112
Copy link
Contributor Author

XioR112 commented Apr 23, 2024

I checked and they aren't available in translation.io interface.

@Floppy
Copy link
Collaborator

Floppy commented Apr 23, 2024

I forgot to add them to English; oops. I'd do that, then hopefully they will turn up. I'll post back when I've done that.

@Floppy
Copy link
Collaborator

Floppy commented Apr 23, 2024

OK, done a sync, and one and other forms are there now. It's only added the ones that are in the English translation file though, so the few form isn't showing up (because English doesn't have it). I'll look at the configuration and check with translation.io how I should be doing that...

@Floppy Floppy reopened this Apr 23, 2024
@github-project-automation github-project-automation bot moved this from Done to Now in Manyfold Roadmap Apr 23, 2024
@github-project-automation github-project-automation bot moved this from Done to Now in Manyfold Development Apr 23, 2024
@Floppy
Copy link
Collaborator

Floppy commented Apr 23, 2024

Right, I found translation/rails#40 which says that I should have all the pluralization forms in the English file. So, I'll add those.

@Floppy
Copy link
Collaborator

Floppy commented Apr 23, 2024

OK, all models now have keys up on translation.io for all known plural forms. That means there's some redundancy, all languages get all of them, but at least it's all possible. Without changing to gettext translations, that's the best we can do.

@Floppy Floppy closed this as completed Apr 23, 2024
@github-project-automation github-project-automation bot moved this from Now to Done in Manyfold Development Apr 23, 2024
@github-project-automation github-project-automation bot moved this from Now to Done in Manyfold Roadmap Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants