Don’t hack core files. (never !) Which language do you use ?
Where have you done this ?
I’ve took a look at the files and found out that the working ones are using __( "Foo %s", "buddypress" )
and the wrong ones are using _x( "Foo %s", "Blah blah blah", "buddypress" )
.
Actually all BP strings are working. If you need custom translation, you have to do that in po/mo and to use preferably the original strings. For example, if you build a template and want to use the notification count on it, you copy the original string to your work. If you don’t do that, you nedd 2 po/mo ! One for BP and one for your custom work. Which is certainly not the best and easiest solution.
The notification count is defined in wp-content/plugins/buddypress/bp-notifications/classes/class-bp-notification-component.php
The counter itself is inside a span and is defined separately.
/* translators: %s: Unread notification count for the current user */
_x( 'Notifications %s', 'Profile screen nav', 'buddypress' ),
sprintf(
'<span class="%s">%s</span>',
The bla bla bla part you mention is a comment for translators who indicates him the context. This comment appears in the pot file like: Notification %s [Profile screen nav]
That’s BP’s default coding. You haven’t to modify this. Use it as is.
If you have difficulty to translate such a string, you have to check your theme or any custom function you added (by hand or another plugin).
The corresponding custom string should reflect the original one as gettext function wouldn’t translate a string which is not identic.
__( "Foo %s", "buddypress" )
and _x( "Foo %s", "Blah blah blah", "buddypress" )
are both working, and do technicaly the same thing (foo = something) which let you modify “foo” in both case, but as the original string is _x( "Foo %s", "Blah blah blah", "buddypress" ),
you couldn’t replace it with __( "Foo %s", "buddypress" )
. It is the translation prefix (_x or __) which is the important thing here.
Hope to be clear. And you’re right, unfortunately your changes will be overwriten at next BP update as you hacked core files.