Skip to:

[Resolved] Certain Words Don’t Have Translations

  • kairei


    I’m using BP (v2.7.4) on a Japanese WordPress (4.7.1) site and Notifications, Messages, Friends, and Groups tab headings are not translated. I found a bunch of people with this issue and a ticket here:

    The resolution was just that the translations were incomplete. @slaFFik mentioned if it was Japanese that he could ping the translators. The ticket above was for Chinese so I don’t think the Japanese team was notified. I’m not sure if you’re still out there @slaFFik but if so, could you please do this? Otherwise, is there some way I can do this?

    Also, I’m not 100% sure it is just the translation issue. I put a function in my theme while investigating and filtered gettext_with_context. I found that $text was “Notifications <span class=”no-count”>0</span>” and I don’t see such a msgid in any po file (including ones downloaded that were supposedly 100% complete). I’m new to BuddyPress and WordPress and PHP, so it is entirely possible I’m just missing something but I manually modified my local po file to test. I put this in it:

    msgctxt "Profile screen nav"
    msgid "Notifications <span class=\"no-count\">0</span>"
    msgstr "通知 <span class=\"no-count\">0</span>"

    Still no luck even though that is the exact $text being intercepted by the filter. The context matches too. I saw this in the Japanese po file:

    msgctxt "Profile screen nav"
    msgid "Notifications <span class=\"%s\">%s</span>"
    msgstr "通知 <span class=\"%s\">%s</span>"

    Seems close but %s wouldn’t match no-count AND 0 would it? What am I missing?

Viewing 3 replies - 1 through 3 (of 3 total)

  • danbp


    The html used by your Notification example is wrong. This could be possible from within an old BP translation or because of a theme or child theme using not updated html markup, or rarely, because of a notification plugin.

    But whatever, actually, you should see Notifications %s in the source code and in pot & po file. The span containing the counter is no more used since a while.

    You can also control this in 2.8 beta (trunk version), which use the same output.

    You can adjust this by loading the correct BP version first (probably already done), and by controling your po (not pot) file. Once you found the expression, you can replace it by what you get in the trunk version.

    Or you donwload the trunk pot and you ajust your whole po to BP 2.8. By the way you will have a brand new Japanese translation for the upcoming BP version planed in february.



    Thanks for the info. Yes, I sort of accidentally discovered that Notifications %s is what I needed. I was just trying random stuff and noticed that on my prod site, adding a translation for Notifications %s fixed the issue even though on dev (which was a copy of prod) it didn’t work. Anyway, hopefully I can just upgrade to 2.8 next month and everything will be cleanly working in prod and dev. Thanks again.



    You’re welcome.
    FYI, it’s important to ensure that the .po file contains the exact same string as the BP string.
    It is also important when you make such adjustments, that you have the right translation on your site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Certain Words Don’t Have Translations’ is closed to new replies.
Skip to toolbar