Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25667 closed enhancement (fixed)

Missing i18n on automatic upgrade notification email

Reported by: nao's profile Nao Owned by: dd32's profile dd32
Milestone: 3.8 Priority: normal
Severity: minor Version: 3.8
Component: I18N Keywords: 2nd-opinion
Focuses: Cc:

Description

The email notification for automatic upgrade is missing i18n in some parts.

Attached patch adds the following fixes in wp-admin/includes/class-wp-upgrader.php:

  • email subject
  • message for beta testers
  • update log header

This change will add new strings in GlotPress. Non-beta users will not see the email until 3.7.1 upgrade, so translators should be able to finish translating before then.

Attachments (3)

25667.diff (2.6 KB) - added by Nao 11 years ago.
25667.2.diff (1.8 KB) - added by SergeyBiryukov 11 years ago.
25667.3.patch (1008 bytes) - added by dimadin 11 years ago.

Download all attachments as: .zip

Change History (16)

@Nao
11 years ago

#1 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.8

This is just the debugging email, not the actual user notifications. Those are in the send_email() method, versus the send_debug_email() method. The user-facing emails are less technical and all of them are internationalized.

Should this debug email be translated anyway? Yeah, for sure. But it is only sent when you are running a development version. Let's add these to the POT in 3.8.

#2 @Nao
11 years ago

  • Severity changed from normal to minor
  • Type changed from defect (bug) to enhancement

Including these in 3.8 sounds good.

I think it's nice to receive a localized notification, so that we know the upgrade for the language was successful. I've been receiving English email recently, and I'm not seeing updated translation files (also on Polyglots P2).

Since the email language depends on wp-config.php, it may be better to receive a message like "SUCCESS: WordPress was successfully updated to WordPress 3.7.1 (ja)" if translation files were updated. Either way, information about language pack update is useful.

#3 @xibe
11 years ago

Agreed. When using a non-English install, the e-mail sent mixes English strings with local strings (namely, the update log, which is translated). It would make sense to have the whole thing translated.

#4 @emanwebdev
11 years ago

Similarily, mix of English & locale sentences when manually updating the core or any extension.

Sure, it might be due to the lack of the sought translated sentences. French locale is used.

? How to contribute? as I spotted a few others oddities in the french translations.

Last edited 11 years ago by emanwebdev (previous) (diff)

#5 @xibe
11 years ago

@emanwebdev Please report the oddities here: http://fr.wordpress.org/contact/ . Thanks!

#6 @dd32
11 years ago

In 26279:

Translate the debug update email for development installs. Props Nao for initial patch. See #25667

#7 follow-up: @dd32
11 years ago

  • Keywords 2nd-opinion added; has-patch removed

Added some extra strings that were missed in the patch, and had this ugly one to translate:

/* translators: %s singular/plural form of 'plugin', 'theme', or, 'translation' */
$body[] = sprintf( __( 'The following %ss were successfully updated:' ), $type );

obviously this is not ideal, as we shouldn't be inserting it into the string like this.. however, without having 3 separate strings (by 2) with _n() I couldn't see a better way around it.

Can we just leave it as-is as it's for development-only installs, or should we fix that by including all permutations of the string?
Personally, I'd just translate it as a generic static "Items" text, or include "plugin" in brackets or something.. but I'm not a translator :)

#8 @Nao
11 years ago

I'd just translate it as a generic static "Items" text

This makes sense, at least for Japanese. Or maybe one of these (to avoid was/were):

  • Successfully updated the following item(s):
  • We successfully updated the following item(s):

#9 @xibe
11 years ago

Since it is difficult to tell if the generic way would work for every language, I suggest we ping the good people at Make/Polyglots.

#10 in reply to: ↑ 7 @SergeyBiryukov
11 years ago

Replying to dd32:

obviously this is not ideal, as we shouldn't be inserting it into the string like this.. however, without having 3 separate strings (by 2) with _n() I couldn't see a better way around it.

Yeah, the current string isn't really localizable. I don't think _n() is necessary here though, we just need six distinct strings for maximum clarity: 25667.2.diff.

#11 @dd32
11 years ago

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

In 26313:

Use static strings instead of a impossible-to-translate string in the Automatic updates debug email. Props SergeyBiryukov. Fixes #25667

@dimadin
11 years ago

#12 @dimadin
11 years ago

When there is more than one placeholder in a string, we should use argument swapping.

#13 @dd32
11 years ago

In 26346:

Use numbered string replacements in 2 new strings. Props dimadin. Fixes #25667

Note: See TracTickets for help on using tickets.