#5700 closed defect (bug)
_x defect translations on each component loader
Reported by: | danbp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0 |
Component: | I18N | Keywords: | |
Cc: | @…, @… |
Description
the use of gettext's _x is defect for *some* translation of the array value directory_title.
As example, bp-activity:109 use actually
'directory_title' => _x( 'Sitewide Activity', 'component directory title', 'buddypress' ),
This example is not translated when using pt_BR po/mo (however the translation is ok)
By using fr_FR po/mo the directory title is translated.
This discussion gives you more details:
http://buddypress.org/support/topic/translation-fails-only-at-sitewide-activity/
To reproduce this strange behaviour:
WPLANG is set to pt_BR
WP language file is pt_BR
Theme language is pt_BR
I tested first with the (stated in the above topic) Mesocolumn theme in pt_BR. No luck.
Then reverted to english and used a fr WP. Works.
Changed for 4 different themes (2014 et 3 other wp themes), each time with WP in portugese then WP in french.
Frenc is working, portugese is not. So it's clearly not a theme issue and certainly not a missing translation.
So i twicked the php code and put it back to the old stylish code
'directory_title' => __( 'Sitewide Activity', 'buddypress' ),
This will work but we loose the helper text. That's not cool ! ;-)
Apparently it's seems not to be a bug, _ x is used in many other places without any problem.
The only weird thing is that the directory_title array is really affected and not handled correctly by gettext.
Perhaps because a directory title is also used as page title witch maybe cause a difference during the loading of a component ?
Change History (5)
#2
@
10 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
Please I have a question. Please how can I delete sitewide activity, I want to change the name.
#4
@
9 years ago
- Status changed from reopened to closed
derock299 - You can use a language pack to change the Sitewide Activity string. Here's a helpful guide: http://premium.wpmudev.org/blog/basic-guide-to-creating-a-buddypress-language-file-for-sitewide-label-and-message-editing/
Thanks for the report. I'm marking this as a duplicate of #5655, and will continue discussion there.