Error

Permalink 2 users found helpful
Hi everyone! I'm using Concrete 5.7.5.2 Always get this error, when I try to use Translate Site Interface after saving file: "Plural rule of merging text domain is not compatible with the current one". English version of site works fine, but Russian shows me this error. If I reset all translations, this error disappears. WAIDW???? Please, need help!

2 Attachments

bbrody
 
bbrody replied on at Permalink Reply 1 Attachment
bbrody
I've managed to solve this issue. It's some kind of bug or something, I don't know, but my solution works for me and may be helpful for someone else. The error was an exception of Zend Internationalization Module, and I just commented 3 lines of code that threw that exception. Look at the screenshot in attachment for details.
mlocati replied on at Permalink Reply
mlocati
The problem is that the platform we use to translate the core strings (Transifex -https://www.transifex.com/concrete5/concrete5/... ) contains a wrong definition for the Russian rules used by programs to determine the plural.

Transifex thinks that there are 4 different plural forms for integer numbers, whereas actually there are only 3 forms.

Tecnically, here's what Transifex says:
nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3)


but here's what it should be:
nplurals=3; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)


I've just contacted Transifex to ask them if they could fix this problem on their side.
mlocati replied on at Permalink Best Answer Reply 1 Attachment
mlocati
The next release of concrete5 won't suffer of this problem.

In the meanwhile, you can revert your edit to zend framework and save the attached file to
[webroot]/application/languages/ru_RU/LC_MESSAGES/messages.mo

PS: relevant change to the core:https://github.com/concrete5/concrete5/pull/3088...
bbrody replied on at Permalink Reply
bbrody
Thank you for your assistance. Your fix solved the problem. I knew that commenting those lines wasn't the right solution, but it helped me to continue my work on my project. Marked your answer as the best.
jacobs83 replied on at Permalink Reply
This same issue is happening in the Turkey Language. Has there been a global fix posted anywhere that I am missing?
mlocati replied on at Permalink Reply
mlocati
Turkish language shouldn't have this problem.

Could you post a reply with an attached zip archive containing the contents of your "languages" directories (the /application/languages and the languages directories of every package)?
linuxoid replied on at Permalink Reply
linuxoid
Don't know what happened but now I have the same problem. I've reverted to English, updated the languages, set the interface language to Russian and it throws the error "Plural rule of merging text domain is not compatible with the current one". I'm on 8.4.2!
linuxoid replied on at Permalink Reply
linuxoid
I've uninstalled all packages, reinstalled and the error is gone.

What could it be?
linuxoid replied on at Permalink Reply
linuxoid
No, the error has not gone away. I've it's gone from saving the interface language, but it remains when I visit the Extend concrete5 page in the Dashboard.
mlocati replied on at Permalink Reply
mlocati
The problem is that the localization system is trying to load two or more language files that have different plural rules for the same language.

To determine why this error occurs, I'd need to have all the language files loaded by concrete5.

This can be done by looking at the value of the variable
[code]
$this->files
[code]

at the line 692 of the file /concrete/vendor/zendframework/zend-i18n/src/Translator/Translator.php
mlocati replied on at Permalink Reply
mlocati
PS: I submitted a pull request (https://github.com/concrete5/concrete5/pull/7204... ) that, if accepted by the core team, could help solving such problems.