[buddypress-trac] [BuddyPress] #934: Friends with Bears Patch 1.0
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Wed Aug 26 01:48:50 UTC 2009
#934: Friends with Bears Patch 1.0
------------------------------+---------------------------------------------
Reporter: johnjamesjacoby | Owner: johnjamesjacoby
Type: defect | Status: closed
Priority: major | Milestone: 1.1
Resolution: fixed | Keywords: has-patch
------------------------------+---------------------------------------------
Comment(by johnjamesjacoby):
Thanks for the heads up on that stuff. I've got a few better patches I can
apply to more specific tickets now that there's been another trunk update.
The work around for home.php is good too. Nice catch.
I am really scratching my head at the xprofile fields and translating them
however. I need a way to run those group and field names through the
gettext to translate them for the set users language. The way I have
outlined in this patch seems to work perfectly as long as those variables
are in the theme's po/mo files and load_theme_textdomain('theme'); is
called in functions.php.
If I name the default name field "Display Name" and in my functions.php I
have __('Display Name', 'theme_name'); then I can use a program like
Poedit to snag "Display Name" and make a translation file out of it, which
I can then translate to any language I choose and save and load like
above. It works, really well.
On the other hand, if there is no po/mo for the theme, then the gettext
just returns the variable without any failure and it gets spit out as
"Display Name" regardless of the chosen language.
If this isn't correct, can you think of any other way to run the xprofile
field names and group names through the __ or _e functions?
--
Ticket URL: <http://trac.buddypress.org/ticket/934#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list