“plural form” is not necessary in Chinese, how can I translate only in one form?
I had tried to copy the translation in “all forms” to “Form 1”, but it will not be saved, and the front-end is still in English not translated.
%1$s Reply to “%2$s”
%1$s Replies to “%2$s”
ExS theme exs-zh_TW.po
Thanks for reporting. There was indeed a bug. The “Form 1” tab should not have been displayed, but a further bug meant the field ended up empty in the saved files.
I’ve pushed a fix to the development branch.
As long as your PO file has the correct header showing
Plural-Forms: nplurals=1; plural=0;then only a single
msgstrfield will now be rendered.
I had planned to release a version later today anyway, but I’d be grateful of you could verify this fixes your issue before hand.
Thanks for quick response.
I had activated the development branch, there is no more “Form 1” for Chinese translation field, but it is still showing “4 Replies to…” instead of “%1$s 篇評論 >> “%2$s””
Have a nice weekend.
Did you re-save the PO file since installing the patched version?
If so, please post a link to the PO and MO files that were generated.
What do you mean “re-save the PO file”, I had checked the PO file header with “”Plural-Forms: nplurals=1; plural=0;\n””
Here are the PO and MO files
What do you mean “re-save the PO file”,
I mean open the PO file in the editor and save it again. This forces a re-compile of the MO file. If there was a problem with it due an earlier bug, nothing will change unless you compile it again. It looks from your files like you have done this already.
Here are the PO and MO files
Your PO file looks correct, although your MO file looks like it still has an empty
msgstrfield. That might be another bug (I’ll look into it) but it should make no difference because only the
msgstrfield should ever be selected as long as WordPress is using the correct plural rule and these seem correct in your file too.
I suspect any problem you have with translations not displaying is due to other factors.
All suggestions for things to check are in the FAQs.
Start here: https://wordpress.org/support/topic/translations-not-showing-4/
I had checked the FAQs but nothing really match the situation. Meanwhile, I also checked with my theme provider exs, they also can not find anything related.
Did you find anything as you mentioned
That might be another bug (I’ll look into it)
It looks like there is another bug that compiles an empty
msgstrfield in the MO file. I’ll fix this, but it’s actually harmless. As I said – This empty field should never be selected. I’ve validated this with your MO file. Selecting any quantity returns the
In summary: this is not the cause of translations not displaying.
However, in the process of checking this I spotted that your files contain an error: The context field for this string has a space at the end.
"comments title ". I can’t say if this is the cause, but it looks suspicious and should be fixed one way or the other.
You will have resolve this with the theme developer. I suggest you ask them to check this finding and ship a valid POT file if it needs amending. Then Sync your PO file with the POT to fix the error.
I took out the extra space in “comments title “, and it works, the translation is in Chinese now.
Thanks for your help!
Ok good. I’m marking this as resolved, as the originally reported issue was fixed in 2.5.6
I’m glad removing the erroneous space solved your problem, although I recommend you look into how that space got there in the first place, and ensure the error doesn’t repeat itself.
- The topic ‘plural translation for Chinese’ is closed to new replies.