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

Support multiple plural forms #16

Open
Biont opened this issue Jan 16, 2020 · 3 comments
Open

Support multiple plural forms #16

Biont opened this issue Jan 16, 2020 · 3 comments

Comments

@Biont
Copy link

Biont commented Jan 16, 2020

This mu-plugin assumes that only one plural form exists. This is known and described in comments here

However, this breaks translations for some locales, for example slovak/hungarian.

What would it take to make this work?

@TeemuSuoranta
Copy link
Member

TeemuSuoranta commented Jan 16, 2020

We have also found out that this plugin cannot for some reason handle plural formats. In the code there is some handeling of plurals but it doesn't seem to be working correctly (not sure if it ever has).

We went and tried to fix this before 1798e37 but it ended up causing other bigger bugs and had to revert it back to how it was before.

If you or anyone wants to try to solve this issue, I'll gladly take a PR but if not, it will take time before I give it another shot. Also referenced in here #12

Edit: Examples of existing plural code are in functions like https://github.com/aucor/dynamic-mo-loader/blob/master/inc/mo_dynamic.php#L513 (like you linked)

@Biont
Copy link
Author

Biont commented Jan 17, 2020

I knew I saw something in my feed about a bugfix for plurals and found myself a bit puzzled when I went in to check.

I would like to try and fix it, but the reality is that I intended to do that for almost a full year now and the best thing I managed to do was create this issue. There's currently only one site we're having trouble with because of locales with multiple plural forms and I have not been able to justify spending the time to work on a fix yet.

On the other hand, I simply do not understand the code by looking at it, so I am certain that it would take a decent amount of time for me to get used to, debug and test (especially since it's probably pretty hard to set up automated testing)

@TeemuSuoranta
Copy link
Member

Ain't that the truth. The base of this plugin was years ago part of another optimization plugin that has not been maintained for years. My ex-colleague extracted the MO optimization part toan independent plugin (this one) and has since moved to doing non-WordPress related things. So here I am, too, trying to maintain and keep this thing running.

I'll probably take a look into this issue again in future or will think of some long term solution as the code is very complicated and hardly documented so trying to change anything is a great adventure. In your case with only one site, I'd probably disable this plugin because the effect is not that critical.

nturbanov pushed a commit to Vincit/wordpress that referenced this issue Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants