Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

#2339 closed defect (bug) (wontfix)

Untranslatable strings in adminbar and template tags

Reported by: mercure's profile mercure Owned by:
Milestone: 1.2.4 Priority: normal
Severity: Version:
Component: Core Keywords: i10n, core, translation
Cc:

Description

Hello,

I found a few strings that do not translate correctly. I am using a patched version of qTranslate to work with BuddyPress in French and English. All is well except for a few strings. I had to add

__()

to fix the issue, I believe it should be included in the core code.

In file bp-core-templatetags.php:

- Function bp_get_loggedin_user_nav(), line 450
instead of $nav_item['name'], it should be __($nav_item['name'], 'buddypress')
- Function bp_get_displayed_user_nav(), line 490
instead of$user_nav_item['name'], it should be __($user_nav_item['name'], 'buddypress')
- Function bp_get_options_nav(), line 511
instead of $subnav_item['name'], it should be __($subnav_item['name'], 'buddypress')

In file bp-core-templatetags.php:

In function bp_adminbar_account_menu(), line 71 & 81,

Instead of $nav_item['name'], it should be __($nav_item['name'], 'buddypress' ) 
Instead of $name, it should be __($name, 'buddypress' ) 

Thank you! Keep up your amazing work!
Marc-Olivier

Change History (1)

#1 @johnjamesjacoby
14 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Sadly we can't translate variables. I went through something similar about a year ago when I was learning PO/MO's.

Since pomo's just do string to string conversions, they have no way to understand what a PHP variable means. While PHP is smart enough to be able to parse something like this just fine, any POMO program won't be able to make sense of it, which usually results in errors in the translation file.

It's frustrating, but you'll need to work this limitation.

Note: See TracTickets for help on using tickets.