Does not translate the Top-Navigation (slug)

Hi there,

im using the BP Social Theme and already installed german-Language for WPMU and BP. All works fine! Except: It does not translate the Top-Navigation (slugs). Among with some more, but most important now is Top-Navigation.

In navigation.php:
<?php _e( 'Members','bp-corp' ) ?>

In PO-File, downloaded from http://i18n.svn.buddypress.org/de_DE/trunk/ the needed lines are there
msgid "Members"
msgstr "Mitglieder"

My guess is, that the 'bp-corp' messes up the whole thing. Am I right with that? And what can I do, to make it work?

Thanks,
Rainer.

    Richie_KS

    the theme text domain are different for bp-corporate.
    the bp default used 'buddypress' theme domain and bp-corporate used 'bp-corp' theme domain.

    so the translation will not work in most part that tag with 'bp-corp' theme domain.
    you could replace any text string 'bp-corp' to 'buddypress'....the string should take effect on
    buddypress po or mo file.

    sample

    <?php _e('home', 'bp-corp'); ?>

    change to

    <?php _e('home', 'buddypress'); ?>

    we used our own theme domain 'bp-corp' since most user like to translate their own version of
    theme rather than follow the i80 repo translation..of coz this apply to theme text string only..any core
    translation should ok with buddypress po and mo file.

    did you try translate the bp-social/languages into your own language and uncomment the add_filter in theme functions.php..the instruction should be inside functions.php...just a simple replace your languge code en_EN and uncomment the add_filter..

    cheers

    Rainer Kormann

    Thanks Richie,

    replacement of 'bp-corp' to 'buddypress' did the job!

    But on important question for me: I did that in the file navigation.php, after i put a copie of it in the child-theme directory. But that had no effect. I had to edit the file in the parent-theme.

    One thing i have to correct: i'm using the community-Theme - not the social-Theme, as mentioned first. To many projects at once, sorry...

    Last: i did not translate the files in bp-community/languages on my own.
    Do i have to put some language-Files there too...? Are these files kind of additional to the de_DE.mo and buddypress-de_DE.mo files?

    Richie_KS

    did you rename the parent-theme?
    i mean the bp-community folder name....the child theme followed the parent theme 'template' in stylesheet so that may be the cause.

    @bp-community/languages
    this is for theme translation purpose...some text string that are not translate in either wpmu languange or buddypress languange..

    like if in bp-community had a text string like 'Get Ready And Post Your Comment Now'..now this
    definately not ready translate in repositiy .po and .mo files..

    all you need to do is just rename the file in bp-community/languages
    default.po -> en_EN.po
    default.mo -> en_EN.mo

    of coz the language code are your choice.
    open en_EN.po with poedit and find the text string that did not get translate with wpmu/bp ready translate file...after that save and remember also to add_filter

    you can add_filter by open up functions.php..there should be commented line like


    //function test_localization( $locale ) {
    //return "my_MY";
    //}
    //add_filter('locale','test_localization');

    uncomment it to


    function test_localization( $locale ) {
    return "en_EN";
    }
    add_filter('locale','test_localization');

    the bold are language code you need to set the same as the file name in your bp-community/languages/

    and now check if the untranslate string are now translated.

    cheers

    Rainer Kormann

    Many thanks for the language explanation in deep!
    I got it now

    But the parent/child-thing is still not working in the way i would expected it. Maybe my fault...
    I thought, that if i make any customizations, i first copy the originale file from parent theme at correct place in child-theme, if not already there. Then make my changes in child theme.
    But that did not work for the changes (replacement of 'bp-corp') in navigation.php.
    Am i on wrong path...?

    You're big help, thanks a lot,
    Rainer.

    Richie_KS

    hi Rainer
    it works on my end tho
    using bp-corporate-child and copy new header.php from bp-corporate and edit some line and it reflect well in child theme.

    can you confimed the following...folder name

    bp-corporate
    bp-corporate-child

    folder name are essential to parent theme and child theme connection.
    also in child theme style.css, check if this value exist at top

    Template: bp-corporate

    as you can it used the folder parent bp-corporate to reflect the child theme

    cheers

    Rainer Kormann

    I did not rename the Folder and the value "Template" in style.css is in place and correct spelled (as directory). That means: speaking of the Child Theme... style.css of Parent Theme has this value no set. Is that okay or problem?

    But still changes to navigaton.php in folder /wp-content/themes/bp-community-child have no effect.

    I dont get it...
    When i find out, i will tell. Or do you have any further idea?

    Thanks for your help!
    Rainer.