Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem with german translation of navigation on profile pages


  • Mathuseo
    Participant

    @mathuseo

    Hey there,

    I have read lots about the problems if german translation and po-file with buddypress. Unfortunately nothing helped me to solve my problem.

    Everything would be translated but not the navigation elements on profile pages like “Activity”, “Notifications”, “Messages” and some more.

    In php-file buddypress/bp-notifications/bp-notifications-loader.php I found this line here:

    $nav_name = sprintf( _x( 'Notifications <span class="%s">%s</span>', 'Profile screen nav', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) );

    In .po-file I found:
    Source: Notifications <span class=\”count\”>%s</span>
    Translation: Benachrichtigungen <span class=\”count\”>%s</span>

    I’m stumped and hope you can help me!

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

  • danbp
    Moderator

    @danbp

    As you can see in the BP source (2.1),
    $nav_name = sprintf( _x( 'Notifications <span class="%s">%s</span>', 'Profile screen nav', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) );

    This string in po. is outdated: Notifications <span class=\”count\”>%s</span>

    You have to open your actual po file with poEdit (or similar translation tool) and update it with the pot file comming with latest BP version. (/buddypress/buddypress.pot)

    Once updated the string to translate will be:
    Notifications <span class=\"%s\">%s</span>
    who should be translated to:
    Benachrichtigung <span class=\"%s\">%s</span>

    Be aware that poEdit uses different colors to indicate you the translated strings, the untranslated strings AND the fuzzy strings wich are approximative translation. These fuzzy strings must be double checked and validated or modified to work.

    Example: difficult to see sometimes the subtle difference between “%s” and “count” when reading too fast ! 😉


    Mathuseo
    Participant

    @mathuseo

    @danbp: Thanks for your help. But it’s still not working. What I have done:

    (1) Downloaded newest version of buddypress (2.1.1).
    (2) Replaced my current buddypress.pot on webserver with the newest version (buddypress/buddypress.pot).
    (3) Open the file with poedit.
    (4) Looked for Notifications <span class=\"%s\">%s</span>
    (5) Added the translation Benachrichtigung <span class=\"%s\">%s</span>
    (6) Upload the buddypress.pot again.

    Is there any mistake in my way to fix that problem? I’m using a child theme if this is important to you.

    Thank you for helping me!


    danbp
    Moderator

    @danbp

    The pot file doesn’t contain the translation, only the strings you can translate.

    The translation is done in po (not pot) file and compiled to a mo file. buddypress-de_DE.mo is the file you have to use.


    Mathuseo
    Participant

    @mathuseo

    Ok thanks. So I probably have problems to unterstand your answer before. The state of play is:

    In .pot-file there is: Notifications <span class=\"%s\">%s</span>
    In .po-file buddypress-de_DE.po there is: Notifications <span class=\"%s\">%s</span>
    In .po-file buddypress-de_DE.po there is the translation: Benachrichtigungen <span class=\"%s\">%s</span>

    That should working I think. But it do not.


    Mathuseo
    Participant

    @mathuseo

    Anyone with an idea how to solve the problem?


    danbp
    Moderator

    @danbp

    Is your site using german language ?(dashboard > setting > general)
    See if you have define (‘WP_LANG’,’de_DE’) in wp-config. If yes, remove it as it it is no more used by WP 4.x


    Mathuseo
    Participant

    @mathuseo

    Because I’m using german language in general settings I have removed define (‘WP_LANG’,’de_DE’) in wp-config. Unfortunately it did not work.


    Mathuseo
    Participant

    @mathuseo

    @danbp: Do you habe another idea how to fix that?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problem with german translation of navigation on profile pages’ is closed to new replies.
Skip to toolbar