Make WordPress Core

Opened 17 months ago

Closed 16 months ago

Last modified 16 months ago

#25667 closed enhancement (fixed)

Missing i18n on automatic upgrade notification email

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


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 17 months ago.
25667.2.diff (1.8 KB) - added by SergeyBiryukov 16 months ago.
25667.3.patch (1008 bytes) - added by dimadin 16 months ago.

Download all attachments as: .zip

Change History (16)

@Nao17 months ago

comment:1 @nacin17 months 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.

comment:2 @Nao17 months 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.

comment:3 @xibe17 months 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.

comment:4 @emanwebdev17 months 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 17 months ago by emanwebdev (previous) (diff)

comment:5 @xibe17 months ago

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

comment:6 @dd3216 months ago

In 26279:

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

comment:7 follow-up: @dd3216 months 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 :)

comment:8 @Nao16 months 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):

comment:9 @xibe16 months 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.

@SergeyBiryukov16 months ago

comment:10 in reply to: ↑ 7 @SergeyBiryukov16 months 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.

comment:11 @dd3216 months 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

@dimadin16 months ago

comment:12 @dimadin16 months ago

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

comment:13 @dd3216 months ago

In 26346:

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

Note: See TracTickets for help on using tickets.