• Resolved mubiesam

    (@mubiesam)


    Hi,

    “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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Tim W

    (@timwhitlock)

    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 msgstr[0] field 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.

    Thread Starter mubiesam

    (@mubiesam)

    Hi @timwhitlock

    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.

    Plugin Author Tim W

    (@timwhitlock)

    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.

    Thread Starter mubiesam

    (@mubiesam)

    Hi @timwhitlock

    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
    https://drive.google.com/drive/folders/1HZuceCx-fCKl_FMY-2QzoCRr6dWOUacL?usp=sharing

    Thanks

    Plugin Author Tim W

    (@timwhitlock)

    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 msgstr[1] field. That might be another bug (I’ll look into it) but it should make no difference because only the msgstr[0] field 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.

    Thread Starter mubiesam

    (@mubiesam)

    I suspect any problem you have with translations not displaying is due to other factors.

    Anything I should check from my side?

    • This reply was modified 3 years, 1 month ago by mubiesam.
    • This reply was modified 3 years, 1 month ago by mubiesam.
    Plugin Author Tim W

    (@timwhitlock)

    All suggestions for things to check are in the FAQs.
    Start here: https://www.ads-software.com/support/topic/translations-not-showing-4/

    Thread Starter mubiesam

    (@mubiesam)

    Hi @timwhitlock

    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)

    Thanks

    Plugin Author Tim W

    (@timwhitlock)

    It looks like there is another bug that compiles an empty msgstr[1] field 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 [0] form.

    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.

    Thread Starter mubiesam

    (@mubiesam)

    Hi @timwhitlock

    I took out the extra space in “comments title “, and it works, the translation is in Chinese now.

    Thanks for your help!

    Plugin Author Tim W

    (@timwhitlock)

    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.

    Thread Starter mubiesam

    (@mubiesam)

    Ok, thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘plural translation for Chinese’ is closed to new replies.