BuddyBoss Home – Web › Support Forums › Plugins › BuddyBoss Wall › How change tab label "New Feed"?
Tagged: customization, language, tab lable, translation, wall
- This topic has 36 replies, 5 contibutors, and was last updated 9 years, 11 months ago by Milena.
Question
September 24, 2014 at 9:44 pm #31984@
Anonymous@milena “wall” and “my likes” and “news feed” should be translating correctly now, in v1.0.4
See: https://www.buddyboss.com/release-notes/buddyboss-wall-1-0-4/
Answers
September 28, 2014 at 5:09 pm #32073@milenaHi @Michael, thanks. It worked.
I still have a problem with the slug “%s posted an update”.
When the wall plugin is turned on- the translated slug is being cut – and all that shows up is “s”.
If I turn the wall plugin off- I get the buddypress translation – and it’s all good.
I think it is connected to the fact that the wall plugin is trying to say “You posted this” and the buddypress says “Milena posted this”. There is a mismatch.
For my language purposes “Milena posted this” is more coherent. Can this be fixed?
I would like to use the wall plugin in the site.all the 3 examples are in the 3 last status updates. the 3rd one- the one that works and looks right was posted with the wall plugin off.
September 29, 2014 at 2:03 pm #32111@milena@tjchester- can you take a look at this too?
October 1, 2014 at 7:38 am #32145@milena@tjchester, @michael- did anyone see my last comment? I am sure this is a bug, I tested it over and over again. It looks too weird for me just to let it be- or I have to not use the wall – and then what was all this hard work for ?
TJ – just let me know which line to erase in the php. I can do without this slug within the wall plugin- the buddypress translation is fine.
I don’t want it to say- you posted this. I think- hope deleting this part will solve the “s” bug.October 1, 2014 at 10:23 am #32154@alyssa-buddyboss
AlyssaParticipant@milena sorry, I did not see your mention of me. Line 129 of buddyboss-media/includes/wall-hooks.php
October 24, 2014 at 8:36 am #32891@milenaHi @tjchester,
I found the file – it’s in buddyboss-wall/includes/wall-hooks.php
I think it is more a function issue than a string. I found this code (line 45 of wall-hooks.php) and I think I need it to be the OLD way : “Without this formatting it would say:
// [username] posted an update to [group name]”Can you help me- and tell me which part exactly to remove? And where do I put the file in the child theme,
just general folder buddyboss-child/wall-hooks.php
of same path as in the plugin
buddyboss-child/plugins/buddyboss-wall/includes/wall-hooks.php ?/ This section formats a group status update // // If you're looking at your own activity it should say: // You posted an update to [group name] // // Without this formatting it would say: // [username] posted an update to [group name] // // That doesn't make sense when you're looking at your own activity stream if ( bp_is_my_profile() && $current_activity->component === 'groups' && (int)$current_activity->user_id === bp_loggedin_user_id() ) { $to_replace = bp_core_get_userlink( bp_loggedin_user_id() ); $you_text = sprintf( '<span class="buddyboss-you-text">%s</span>', __( 'You', 'buddyboss-wall' ) ); $bbwall_action = str_replace( $to_replace, $you_text, $action );
October 24, 2014 at 1:23 pm #32896@milenaA photo of what I mean and a new bug.
I need “you” to be a link to a user’s profile again (it is not translatable otherwise)
and for some reason the time shows up twice.
October 25, 2014 at 12:45 pm #32934@alyssa-buddyboss
AlyssaParticipant@milena it doesn’t make sense to link to a users own profile so I can’t classify this as a bug, but you can try this code to replace the username with You, however, I cannot support this. I’m not sure if it works.
Replace this:
$bbwall_action = str_replace( $to_replace, $you_text, $action );
with this:
$bbwall_action = str_replace( bp_core_get_userlink( bp_loggedin_user_id(), $no_anchor = true ), $you_text, $action );
There may be formattign errors, or it may not work at all.October 25, 2014 at 12:54 pm #32935@milenaI just want to go back to the buddypress way of doing it. They don’t have “you” just the “username”. So I need to remove the special code buddyboss added to “make sense”. For the language that I am using – “you” – followed by a general “posted something” slug doesn’t work grammatically. “He posted” is different from “you posted”. So I am screwed, and this is a minor thing. I’ll try what you suggested. Please read my comment- maybe you can just ask the developers what to remove. Thank you.
October 25, 2014 at 1:50 pm #32938@milenaHi @tjchester, I tried that, messed up the site. I also tried removing this file all together, site went blank. I understand you can’t support this. Maybe @michael can help us out? I need to remove the php part that changes “user” posted this to “you” posted this. (wall-hooks.php) This buddyboss wall add-on is generally a good idea and makes more sense, but doesn’t work grammatically in my language. I can’t leave it like and launch. Hope there is something to be done. Thank you
October 25, 2014 at 5:42 pm #32942@alyssa-buddyboss
AlyssaParticipant@milena to go back to BP way then replace this line:
$bbwall_action = str_replace( $to_replace, $you_text, $action );
with this:
$bbwall_action = $action;
October 26, 2014 at 8:16 am #32953@milenaThat works awesomely ! Thank you @tjchester!!
Now how do I save the file from future updates?
I tried placing it in
1. buddyboss-child
2. buddyboss-child/plugins/buddyboss-wall/includes
3. buddyboss-child/buddyboss-wall/includesnothing has effect. just the original file in the plugin
wp-content/plugins/buddyboss-wall/includesOctober 26, 2014 at 8:49 am #32955@alyssa-buddyboss
AlyssaParticipant@milena further down in the same file find this text:
$action = str_replace($myprofile_link, __( 'You', 'buddyboss-wall
‘ ), $action);`
replace with:
$action = $action;
Further down this:
$action = str_replace( '%INITIATOR%', __( 'You', 'buddyboss-wall
‘ ), $action);`
with this:
$action = str_replace( '%INITIATOR%', $myprofile_link, $action);
PS: These are for the regular wall and not just groups like the other text.
I’ll have to get back to you on the child theme location to be upgrade safe
October 27, 2014 at 4:49 am #32963@milenaHi @tjchester,
the last two code edits come out like this (photo attached)
%INITIATOR% mentioned 2 people 23 minutes ago
October 27, 2014 at 11:07 am #32971
- The question ‘How change tab label "New Feed"?’ is closed to new replies.