Wrong format plural string in system admin (both are same):

// system.admin.inc:1032
$items[] = format_plural(count($info['depends']), 'The @module module is missing, so the following module will be disabled: @depends.', 'The @module module is missing, so the following module>>s<< will be disabled: @depends.', $t_argument);

Found by @my-family during translation session

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wojtha’s picture

Status: Active » Needs review
FileSize
922 bytes
wojtha’s picture

wojtha’s picture

Version: 7.0 » 8.x-dev
Issue tags: +Needs backport to D7

bumping to 8.x

wojtha’s picture

Status: Needs review » Needs work
Issue tags: +content translation, +format plural, +Needs backport to D7

The last submitted patch, d7_plural_system_admin_1047920.patch, failed testing.

wojtha’s picture

Status: Needs work » Closed (duplicate)
Issue tags: -Needs backport to D7

Hmm, fixed in #1099254: Typo in modules/system/system.admin.inc, so marking this as duplicate.

Damien Tournoud’s picture

Status: Closed (duplicate) » Needs work

Not really. format_plural() requires a @count in $plural. It is not optional: not having a @count would break all the languages that have more then 2 plural forms.

wojtha’s picture

@Damien: Ok, renaming the issue to match the problem accurately

The placeholder @count is now included in $plural.

Edit: this test fails because of the following test assertion, so if we want this variant we just need to edit this string too. But the next patch (singular unchanged) is better IMHO.

system.test:263
$this->assertText(t('The @module module is missing, so the following module will be disabled: @depends.', array('@module' => '_missing_dependency', '@depends' => 'system_dependencies_test')), t('The module missing dependencies will be disabled.'));
wojtha’s picture

Title: Wrong format plural string in system admin (both are same) » String in system admin - @count is required in $plural
Status: Needs work » Needs review
Issue tags: +Needs backport to D7
FileSize
938 bytes

Alternative patch which changes only the $plural form and leaves the $singular form unchanged.

wojtha’s picture

pillarsdotnet’s picture

pillarsdotnet’s picture

wojtha’s picture

@pillarsdotnet, passed again - RTBC please ;-)

pillarsdotnet’s picture

Status: Needs review » Reviewed & tested by the community

@wojtha -- Looks good to me, but I don't think I'm qualified to RTBC yet, as I've not had a patch of my own RTBC'd and accepted into core.

Marking RTBC anyway, as I doubt that it makes any difference while there are 16 criticals and 100 majors ahead of this in the queue.

wojtha’s picture

@pillarsdotnet thx, you don't need to remind me this... several of these criticals or majors are also "mine" ... but after 4 months of vacuum I feel that the core is finally moving again...

pillarsdotnet’s picture

webchick’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +String freeze

Committed to 8.x and 7.x, thanks!

Tagging as string freeze, since this will break existing translations (for the better, though).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drupal_was_my_past’s picture