Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#6908 closed defect (bug) (fixed)

Avoid using HTML tags in translation strings (bp-core/admin/bp-core-admin-functions.php)

Reported by: ramiy Owned by: boonebgorges
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Cc:

Description

Old strings:

  • Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them: %2$s. <a href="%1$s">Repair</a>
  • The following active BuddyPress Components do not have associated WordPress Pages: %2$s. <a href="%1$s">Repair</a>'

New strings:

  • Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them:
  • The following active BuddyPress Components do not have associated WordPress Pages:
  • Repair

Attachments (3)

6908.patch (2.0 KB) - added by ramiy 5 years ago.
6908.1.patch (2.1 KB) - added by ramiy 5 years ago.
6908.2.patch (2.1 KB) - added by ramiy 5 years ago.

Download all attachments as: .zip

Change History (10)

@ramiy
5 years ago

#1 @DJPaul
5 years ago

  • Milestone changed from Awaiting Review to 2.5

#2 @DJPaul
5 years ago

  • Milestone changed from 2.5 to Under Consideration

This is another tricky one. I don't like this patch because it splits a complicated block into multiple phrases. I expect there may be languages where people want to re-order the sentences, or continue to have just one.

#3 @ramiy
5 years ago

@DJPaul

This patch is splitting the call-to-action link (the "Repair" string) into a separate strings.

Both of those strings has "Repair" link in the end. I just wanted to remove the repair link to avoide using HTML tags in the translation string.

@ramiy
5 years ago

@ramiy
5 years ago

#4 @ramiy
5 years ago

The last patch (6908.2.patch) is better.

Old strings:

  • Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them: %2$s. <a href="%1$s">Repair</a>
  • The following active BuddyPress Components do not have associated WordPress Pages: %2$s. <a href="%1$s">Repair</a>'

New strings:

  • Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them: %s.
  • The following active BuddyPress Components do not have associated WordPress Pages: %s.
  • Repair

#5 @boonebgorges
5 years ago

  • Milestone changed from Under Consideration to 2.6

Splitting 'Repair' into its own string seems OK to me in this context. This patch had a number of syntax errors that make me think you patched blind. Afraid to install BuddyPress? :)

#6 @boonebgorges
5 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 10681:

Remove markup from translatable strings on Pages admin tab.

Props ramiy.
Fixes #6908.

#7 @DJPaul
4 years ago

  • Component changed from Locale - i18n to I18N
Note: See TracTickets for help on using tickets.