Hi folks,
I use BuddyPress as part of a company intranet. Our BuddyPress Groups are used as a quick way to find who works in a particular department or location.
For our purposes, it makes sense for any staff member to be able to use any groups’ activity stream and bbPress forums, without having to join that group. The only exceptions would be for hidden groups, such as our Management group; they should still be invisible to non-members.
I’ve already solved half the problem by creating a plugin that allows any member to participate in any group’s bbPress forum: Read forum topic.
The next challenge is to allow anyone to post on any group’s activity stream (i.e. Home page).
There are two parts:
Show the “What’s new?” form to non-members
To do this, we can modify the template for /groups/single/activity.php
.
If we change line 52 from: <?php if ( is_user_logged_in() && bp_group_is_member() ) : ?>
to: <?php if ( is_user_logged_in() ) : ?>
, the template will no longer check if the user is a member anymore, so the “What’s new?” form will show up for everyone.
At this point, if a non-member tries to write an activity post, the following error message appears:
There was a problem posting your update. Please try again.
I’d guess the action of posting checks if the user has permission to do so. Since they don’t, the post fails.
Allow users to write activity posts without joining the group
This is where I’m stuck.
I’ve tried to use the translation file to track down the function that’s throwing the error. The There was a problem posting your update. Please try again.
line reference points to bp-templates/bp-legacy/buddypress-functions.php:950
(this is actually line 962 now). If I change the error message directly on that line, the change isn’t reflected on the page. That tells me the error is coming from somewhere else.
I would love a bit of insight on which files are involved once the user clicks “Post”.
As always, I’ll report back with my full solution if I figure this out.
Thanks for any help you can provide!
I have been searching topics and trying everything but can’t seem to find out how to translate buddypress properly.
I’ve downloaded the dutch translation files and made it as my main language in wordpress. But buddypress only shows the english text.
I put the .po and .mo files in wp-content/languages/plugins/
Also I used Loco Translate to sync it with the .pot file but that also didn’t help eventough it shows the dutch files and 100% translated.
How can I fix this? I’m kind of stuck.
Hi,
2 – define (‘WPLANG’, ‘en_US’); in wp-config
3 – Dashboard >> Settings >> General >> Site Language (buuddpress-en_US is not in the list)
2 is no more necessary since WP 4.0. Remove it.
3 is not intended to show in that list. General settings are for WordPress language, not for plugins.
WP’s language files use only the domain name (en_UK.mo, en_US.mo, be_BE.mo, etc)
Plugin language files like BuddyPress use their name in addition to the domain (buddypress-fr_FR.mo, buddypress-en_US.mo, and so on)
In your case, you can use WP default language setting (english) and a more specific lang for BP, en_US. It is an avantage for you, as there are only few difference beetwen US and GB, and you can even omit BP translation, as it is coded in english. The situation is much more annoying for all other non english languages!
https://codex.wordpress.org/Installing_WordPress_in_Your_Language
Hi!
I have just updated BuddyPress 2.7.4 to 2.8.1 (Skipped 2.8.0). My translation (po/mo) has stopped working.
My translation files have been living at wp-content/languages/plugins/buddypress-en_US.mo and wp-content/languages/plugins/buddypress-en_US.po
I have now tried
1 – to save files to wp-content/languages/buddypress/buddypress-en_US.mo and wp-content/languages/buddypress/buddypress-en_US.po
2 – define (‘WPLANG’, ‘en_US’); in wp-config
3 – Dashboard >> Settings >> General >> Site Language (buuddpress-en_US is not in the list)
I am not using any cache method / cache plugin. I had a few customized phrases defined by my po/mo files. One of them for example is following
“Your profile photo will be used on your profile and throughout the site. If there is a Gravatar associated with your account email we will use that, or you can upload an image from your computer.”
I am using :
WordPress 4.7.3
BudduPress 2.8.1
Please help
Yep, BP has replaced my changes and the changes that I did in *.po (so, eventually in *.mo) files. Is there a way to disable Buddypress from updating translation file with the broken ones? I don’t need poorly translated versions on my site.
There isn’t a filter for that text but you can use the buddypress
textdomain to add a translation.
Customizing Labels, Messages, and URLs
Fr translation has no issue, nor german one.
The issue may be in your language selector or multilingual plugin…
Hello,
I upgraded buddypress plugin to the BuddyPress 2.7.3 version.
After the migration, I have noticed that in the Members page:
– http://www.potoclips.com/mypotoclips-whois/
the “% ago” below the name of each member lately connected,
now refers, when French language is selected, to the German Translation.
– http://www.potoclips.com/fr/mypotoclips-whois/
I have of course that the BuddyPress translation file for French contains “il y a” instead of “vor”.
Any feedback about this issue ?
Thanks
Potoman
Hi,
We are having the problem that if buddypress is active and BP_ROOT_BLOG is defined that translations aren’t saved.
Does anybody have the same problem?, of has any idea why buddypress would affect this?
Thanks,
Jeroen
translations still not working correctly. Can someone have a look at this issue? Been waiting a while now. Thanks a lot.
May I ask, would this be a multi-lingual site?
I think what you want done with the profiles is doable, you could configure the profile to display the families profile information and then ave a section for comments below that data. It would take a bit of coding but is achieveable.
The multi-lingual aspect worries me as some translation plugins can be really complex and tend to slow down the site too much, but it depends how far you are looking to go with that translation.
How are you going to handle these payments? Will they be managed through the site or completely separate from it?
Hello,
Thank you for answering shanebp.
I did it with translation files, so simple and dumb for someone like me who knows very very little about PHP.
Anyway, thank you! Your suggestion lead me to the right track and I did it.
For anyone wondering how to do it:
Overload (search in forum) a template for profile.php and add wherever you need the following:
<?php if ( bp_is_my_profile() )
echo "Your custom text with HTML code or whatever"
?>
Thanks again! 😀
@r-a-y The danish locale for moment.js use “da” extension. As you ask for check, i assume it is confusing when BP translation is using “da_DK” ? 🙂
https://github.com/moment/moment/blob/develop/locale/da.js
BP 2.7 introduced dynamic timestamps using livestamp.js and moment.js.
For dynamic timestamp localization to work correctly, we try to load the moment.js localization file.
It is quite possible that moment.js does not come with a Danish translation.
@adjunkten – Can you check to see if there is a Danish translation here?
https://github.com/moment/moment/tree/develop/locale
If so, can you output your WordPress locale using get_locale()
? There might be a bug in how we are checking for the moment.js locale file.
Your time stamps looks correct, I’m guessing you mean the Danish translation isn’t working correctly?
You can grab the newest Danish Buddypress translation here https://translate.wordpress.org/locale/da/default/wp-plugins/buddypress followed by merging your current buddypress-da_DK.po file in poedit like this http://www.marketpressthemes.com/blog/how-to-merge-two-po-files-using-poedit/, translate the words you needs to translate, save it as both buddypress-da_DK.po and buddypress-da_DK.mo – and reupload it to your server in your language folder.
Hello,
So I found a source on here, how to rename the menu bars in the profile section of buddypress.
I downloaded a plugin called Buddypress User Blog, and I want to rename the tab header “Blog” to “Posts” or “Articles”. I have downloaded the PO file that comes with this plugin and then made the translation from en_US to en_UK. and uploaded it to the server, under the BP-User-Blog/Languages folder, but still no changes.
How do I activate the new PO and MO file?
Or is there another way to change the wordings on the profile Tab?
Here is a screenshot of the tab:
Regards
Kelvin
Hi,
first of all I want to congratulate you for an amazing improved Profile date field! Great job! Thank you!
Now to my issue. My goal is to show “Age” of my members using your date selector. By default when I chose Time elapsed, the Age field in user’s profile is showing: age ( for example 38 ) years ago. I would like to change wording “years ago” to “years old” by using loco translate plugin. Here is the result of the translations:
source text: %s ago
-> no translation made: outcome: 38 years ago
-> translated to: %s old = outcome: 38 years
-> translated to: %s = outcome: 38 years
-> translated to: %s years old = outcome: 38 years
-> translated to: % years old = outcome: ears old
Is it a bug or am I doing something wrong? Any idea?
Thanks
Petra
Using WordPress 4.6.1 running Sweetdate Child theme, BuddyPress 2.7.0
I have translation file in wp-content/languages/buddypress-zh_CN.po, some string will take effect, some are not( CHANGE COVER IMAGE for example), here(http://ww4.sinaimg.cn/large/801b780agw1f8ywml6m9fj213s054abt.jpg) is my translation pic, and here(http://ww3.sinaimg.cn/large/801b780agw1f8ywmgezhbj21kw0vu78d.jpg) is what is on the front-end.
I guess that means that when a user registers on one of the multi-sites he can use his account on all the other websites of the Multi-site installation, right ?
Yes, but understand that you have to give that user access to those other sites (in wp-admin) to write blog posts, for example. If a user does not have explicit permissions to a specific multisite site, they won’t have any special access; they’ll only be able to read the content as if they were another normal visitor. You can test this right now, without BuddyPress, and see how it works.
meaning it takes him out of the French Website to put him onto the English on
You seem to be using multisite to have your content localised into different languages. This is a common approach for WordPress multisite, but BuddyPress does not work the way you want it to in this situation.
You can activate BuddyPress in a few different ways. Simply, on multisite, you can activate the plugin on a specific site, or network-wide. There is lots more detail at https://codex.buddypress.org/getting-started/installation-in-wordpress-multisite/ but if BuddyPress is activated network-wide, all the BuddyPress content will only appear on one site (we call this the “root blog”). We use redirects to support this, exactly as you’ve found.
You can’t have BuddyPress active on a multisite that uses the sub-sites as different languages, and have the BuddyPress social network appear on all of them and work in the same way, except with different translations. It doesn’t work that way out the box…
…however here is an advanced setting you can use to make BuddyPress behave like this: BP_ENABLE_MULTIBLOG
See https://codex.buddypress.org/getting-started/customizing/bp_enable_multiblog/
I would encourage you fully test this setting out if you enable it, before you start building the rest of your site, just to understand and confirm its behaviour.
🙂
Check your theme files. You need to find the “ago” part and modify it (via child theme) to what BP use for it.
Or maybe you can get a german version for your theme or search the string in the existing theme translation.
Eventually ask for help on the theme support, as it is not a BP issue.
@danbp Thank you for your help. I could not find a mistake in the translation. “% S” is used correctly everywhere. Any online status has not been translated (Not just “ago”), I downloaded the official version. It is about the page “Side-Wide – activity”. I have installed a Buddypress independent theme.
Hi,
check the code you used for “16 minutes ago”. You will find it in the buddypress-de_DE.po file. Normally, you should have %s ago -> vor %s
. If you omit % or s, the string won’t be translated.
If it’s not a typo error of yours:
– where is this untranslated “ago” string showing ? Site activity, profile, widget, other ?
– do you use a specific “buddypress” theme ?
– does the issue remain when using the “official” translation file ? If not, download it here (po & mo). Don’t forget to remove your version before adding the original one into wp-content/languages/plugins/
Hi
How can i translate the xprofile fields i add, because the title and default content of my custom fields does not appear in WPML string translation …
OB
hi,
it’s because you didn’t right.
The translation, or word change, use a msg ID which contains the original string and a msg string, for the new wording.
In your case, you should use
msgid "Site Wide Activity RSS Feed" // the original string
msgstr "Rich Site Summary" // the custom string
Note also to get this to work, you need to compile the po file to mo file.
And if you don’t want to redo that after each BP update, i recommand you use this plugin, so your custom language file remain untouched, while the default language will be updated.
– I know nothing about Loco translate as i never used it. And i can’t read chinese, so i can’t help you with this specific translation.
– I never seen a error 500 after modifying a translation.
– The only thing i’m sure (because of the error messages) is that it is Loco who doesn’t find a file or can’t access to it properly.
– Re-check Loco Settings and try another path option… Or maybe use a custom path called MyTranslation and use the plugin only to translate. Once done, deactivate Loco and move the mo file manually to the right folder. By doing this you eliminate the eventual plugin issue and still have a mo file you can use (hopefully).
– Ensure your BP’s po/mo files have correct file extension and use the correct path to file:
/wp-content/languages/plugins/buddypress-zh_CN.mo & buddypress-zh_CN.po
Personnaly, i use poEdit and only on my computer and never directly on a site.