Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#16130 closed defect (bug) (fixed)

Deleted themes number is not translated

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: I18N Keywords: has-patch i18n-change commit
Focuses: Cc:

Description

As reported by Rasheed on WP Polyglots:

I can’t find this string which indicates how many network themes had been deleted.

Snapshot: http://img818.imageshack.us/img818/5735/60493706.jpg
Location: wp-admin/network/themes.php?deleted=2

Looks like _n( 'Theme deleted.', '%s themes deleted.', $_GET['deleted'] ) string from [17130] didn't make it into wordpress-ms.pot for some reason.

Attachments (1)

deleted-themes-context.diff (1.1 KB) - added by nbachiyski 14 years ago.

Download all attachments as: .zip

Change History (8)

#1 @nacin
14 years ago

This should remain on wppolyglots. There's nothing we can do from the code side to ensure this makes it into the pot file.

#2 @SergeyBiryukov
14 years ago

  • Keywords i18n-change removed
  • Resolution set to invalid
  • Status changed from new to closed

Got it, thanks.

#3 @nbachiyski
14 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Actually we can.

Gettext doesn't allow a plural string to have the same singular as another string, because the unique key for a string is built from the singular only (+ context if there).

We need to preserve that behaviour, because that's in the MO format specification.

In our case the string doesn't show up, because we have the string Theme deleted. in wp-admin/themes.php. Although one of them is in the core WP set of strings and the other is in the MS strings, in order to make sure the coinciding strings are present only in the WP pot I put all the strings in one structure and that's where the plural one from MS is lost.

We can fix that by adding context to one of the strings. The context will change the unique key and both strings will appear.

#4 @nacin
14 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.1

Works for me. Nice catch Nikolay. :-)

#5 @SergeyBiryukov
14 years ago

  • Keywords i18n-change added

#6 @nacin
14 years ago

  • Keywords commit added

#7 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [17233]) Add context to string. Props nbachiyski. fixes #16130

Note: See TracTickets for help on using tickets.