LOCALIZATION NOTICE: Issue and solution


Recommended Posts

  • Developer

There is an error in how some plurals are handled from the po files.  We will fix it in our code for the future, but that won't help you guys till the next update. Good news is there is a way you can fix it in the po file yourselves.


The Issue

There is a line of code to handle plurals. It always needs to return a number for it to work with our code. 

 

This line in the po file is returning a boolean (true/false) instead:

 

        "Plural-Forms: nplurals=2; plural=(n != 1);\n"

Specifically this statement: 

 

        plural=(n != 1)

The solution

You can change it to something like this to convert it into a number:  

 

       plural=((n != 1)? 1 : 2) 

This would be the complete new line:

        "Plural-Forms: nplurals=2; plural=((n != 1)? 1 : 2);\n"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.