Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#4726 closed defect (bug) (duplicate)

Bad titles on directories pages (issue in bp_get_name_from_root_slug)

Reported by: slaFFik Owned by:
Priority: normal Milestone:
Component: Route Parser Version: 1.6.1
Severity: major Keywords: needs-patch
Cc: slava.abakumov@…

Description

If you create a page called Community (for example) and then create Activity, Members etc pages and assign them to appropriate directory - BuddyPress will work fine (I mean users/groups links etc).
But bp_get_name_from_root_slug() will return false.

Reason - $bp->{$component}->root_slug will use part of url (like community/activity), while bp_current_component() will return just $bp->{$component}->slug. They are not equal and {{{bp_get_name_from_root_slug()}} -> false.

This problem prevents from translating title on directories pages.

$title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug() );

This actually will be just Directory

Change History (7)

#1 @DJPaul
14 years ago

  • Component Corei18n
  • Keywords 1.8-early needs-patch added
  • Milestone Awaiting Review1.8

#3 @boonebgorges
13 years ago

  • Component i18nRewrite Rules
  • Keywords 1.8-early removed
  • Milestone 1.81.9

#4 @slaFFik
13 years ago

  • Cc slava.abakumov@… added

#5 @boonebgorges
13 years ago

  • Milestone 1.92.0

See also #4631.

#6 @boonebgorges
12 years ago

  • Milestone 2.0
  • Resolutionduplicate
  • Status newclosed

This is a duplicate of #4630.

#7 @boonebgorges
12 years ago

In 8090:

Improve strings used for <title> and header of directory pages

Our legacy method for creating directory titles involved concatenating the
component name into '% Directory', which did not work well in languages where
a term like 'Groups Directory' would be translated into a single word. In
addition, there was inconistency between the <title> element on directory pages
and the header element used in the page body.

This changeset introduces a 'directory_title' parameter to BP_Core_Component,
so that directories can register a fully localizable string as the title/
header for directories.

To avoid filter name conflicts, the filter names associated with the headers
on group and blog directory pages were changed to _directory_header. See r7942,

See #4726, #4630

Fixes #4631

Note: See TracTickets for help on using tickets.