Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#16130 closed defect (bug) (fixed)

Deleted themes number is not translated

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

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 16 years ago.

Download all attachments as: .zip

Change History (8)

#1 @nacin
16 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
16 years ago

  • Keywords i18n-change removed
  • Resolution → invalid
  • Status new → closed

Got it, thanks.

#3 @nbachiyski
16 years ago

  • Resolution invalid
  • Status closed → 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
16 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review → 3.1

Works for me. Nice catch Nikolay. :-)

#5 @SergeyBiryukov
16 years ago

  • Keywords i18n-change added

#6 @nacin
16 years ago

  • Keywords commit added

#7 @ryan
16 years ago

  • Resolution → fixed
  • Status reopened → closed

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

Note: See TracTickets for help on using tickets.