[buddypress-trac] [BuddyPress Trac] #5700: _x defect translations on each component loader
buddypress-trac
noreply at wordpress.org
Tue Jun 10 09:50:10 UTC 2014
#5700: _x defect translations on each component loader
----------------------------+-----------------
Reporter: danbp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: All Components | Version: 2.0
Severity: normal | Keywords:
----------------------------+-----------------
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 ?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5700>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list