WordPress.org

Make WordPress Core

Opened 10 days ago

Last modified 8 days ago

#44360 new enhancement

Missing translators comment need to be added

Reported by: jrf Owned by:
Milestone: 5.0 Priority: normal
Severity: minor Version: trunk
Component: General Keywords: good-first-bug needs-patch
Focuses: coding-standards Cc:

Description

There are a large number of translatable strings in WP Core which contain placeholders, but do not have a /* translators: ... */ comment.

For some, it may be obvious what string is expected if you know the code and/or are a native English speaker, but for a lot of translators, neither is the case, so all those strings should be accompanied by a translators comment.

The list of issues as per June 11th 2018 can be found here: https://gist.github.com/jrfnl/2eb01256bc8548af14df719bdc168fcb

Patches against this ticket should be uploaded one patch per fixed core file.

This ticket is a focus area for the WCEU 2018 contributors day.

Attachments (28)

44360.admin-footer.diff (497 bytes) - added by subrataemfluence 10 days ago.
Patch for admin-footer.php
44360.admin.php.diff (544 bytes) - added by subrataemfluence 10 days ago.
Patch for core file wp-admin/admin.php
44360.async-upload.php.diff (886 bytes) - added by subrataemfluence 10 days ago.
Core file: wp-admin/async-upload.php
44360.comment.php.diff (567 bytes) - added by subrataemfluence 10 days ago.
Core file: wp-admin/comment.php
44360-src.diff (3.9 KB) - added by GaryJ 10 days ago.
Fixes WordPress.WP.I18n violations in src/*.php files.
wp-admin_root_directory_1_of_2.diff (24.0 KB) - added by webdados 10 days ago.
First of two patch files for wp-admin/*
44360-src.2.diff (3.3 KB) - added by GaryJ 10 days ago.
Fixes WordPress.WP.I18n violations in src/*.php files - replacement that excludes wp-admin/update.php
44360.about.php (1.9 KB) - added by Dency 10 days ago.
Patch for about.php
44360.widgets.php (984 bytes) - added by Dency 10 days ago.
Patch for widgets.php
44360.about.php.diff (1.9 KB) - added by Dency 10 days ago.
44360.widgets.php.diff (984 bytes) - added by Dency 10 days ago.
44360.class-wp-widget-recent-comments.php.diff (834 bytes) - added by Dency 10 days ago.
Patch for class-wp-widget-recent-comments.php File
44360.wp-includes.diff (1.4 KB) - added by Dency 10 days ago.
Fixes WordPress.WP.I18n violations in wp-inlcudes files
44360.wp-includes_customize.patch (3.4 KB) - added by marcomartins 10 days ago.
Fix translators comments in wp-includes/customize folder
44360.wp-includes_customize.2.patch (3.4 KB) - added by marcomartins 10 days ago.
Fix translators comments in wp-includes/customize folder
44360.wp-includes_rest-api.patch (4.4 KB) - added by marcomartins 10 days ago.
Fix translators comments in wp-includes/rest-api folder
44360.wp-includes_theme_compat.patch (4.2 KB) - added by marcomartins 10 days ago.
Fix translators comments in wp-includes/theme-compat folder
wp-admin-network.diff (9.5 KB) - added by niq1982 10 days ago.
files in /wp-admin/network/ folder
wp-includes.diff (38.3 KB) - added by niq1982 10 days ago.
Fixes the translator comments in all files in /wp-includes/* root
wp-includes-widgets.diff (1.6 KB) - added by niq1982 10 days ago.
Fixes the translator comments in all files in /wp-includes/widgets/ folder
44360-wp-admin-includes-dir.patch (21.3 KB) - added by flipkeijzer 10 days ago.
44360-wp-admin-includes-dir
44360.wp-includes_customize.3.patch (3.3 KB) - added by marcomartins 10 days ago.
Fix translators comments in wp-includes/customize folder
44360.wp-includes_rest-api.2.patch (4.4 KB) - added by marcomartins 10 days ago.
Fix translators comments in wp-includes/rest-api folder
44360.wp-includes_theme_compat.2.patch (4.2 KB) - added by marcomartins 10 days ago.
Fix translators comments in wp-includes/theme-compat folder
wp-admin-network.2.diff (9.5 KB) - added by niq1982 10 days ago.
Fixes to translator comments in /wp-admin/network/ folder
wp-admin_root.diff (64.8 KB) - added by webdados 10 days ago.
Replaces previous wp-admin_root_directory_1_of_2.diff
wp-admin_root.2.diff (64.8 KB) - added by webdados 8 days ago.
Replaces previous wp-admin_root.diff
44360-wp-admin-includes-dir-patch2.diff (16.0 KB) - added by flipkeijzer 8 days ago.
Second batch of admin/includes folder patches

Download all attachments as: .zip

Change History (43)

@subrataemfluence
10 days ago

Patch for admin-footer.php

@subrataemfluence
10 days ago

Patch for core file wp-admin/admin.php

@subrataemfluence
10 days ago

Core file: wp-admin/async-upload.php

@subrataemfluence
10 days ago

Core file: wp-admin/comment.php

#1 @GaryJ
10 days ago

@subrataemfluence Thanks for those patches. Be aware that we have a coordinated effort here at WCEU Contributor Day - please see the #core-coding-standards channel on Slack for who is doing which batch of files.

@GaryJ
10 days ago

Fixes WordPress.WP.I18n violations in src/*.php files.

@webdados
10 days ago

First of two patch files for wp-admin/*

@GaryJ
10 days ago

Fixes WordPress.WP.I18n violations in src/*.php files - replacement that excludes wp-admin/update.php

@Dency
10 days ago

Patch for about.php

@Dency
10 days ago

Patch for widgets.php

#2 @swissspidy
10 days ago

Some of the translator comments are inconsistent.

For example, there's translators: %s: search keywords and also translators: %s is the WordPress version number.

IIRC core only uses the former style everywhere, so translators: %s is the WordPress version number should really be translators: %s: WordPress version number.

Also, some of the newer patches are already covered by the ones covering multiple directories.

@Dency
10 days ago

Patch for class-wp-widget-recent-comments.php File

@Dency
10 days ago

Fixes WordPress.WP.I18n violations in wp-inlcudes files

#3 @alvarogois
10 days ago

I've reviewed 44360-src.diff​ by @GaryJ and it seems to be OK.

@marcomartins
10 days ago

Fix translators comments in wp-includes/customize folder

@marcomartins
10 days ago

Fix translators comments in wp-includes/customize folder

@marcomartins
10 days ago

Fix translators comments in wp-includes/rest-api folder

@marcomartins
10 days ago

Fix translators comments in wp-includes/theme-compat folder

#4 @alvarogois
10 days ago

I've reviewed 44360-src.2.diff by @GaryJ and it seems to be OK.

#5 @mihaiiceyro
10 days ago

I've reviewed the 44360.wp-includes_theme_compat.patch by @marcomartins, it seems to be ok.

#6 @vladwtz
10 days ago

I reviewed the comitted files in wp-admin_root_directory_1_of_2.diff of @webdados and I noted some comments to fix. I agree with @swissspidy about the standard, and @webdados is doing it.

Last edited 10 days ago by vladwtz (previous) (diff)

#7 @alvarogois
10 days ago

I've reviewed 44360.wp-includes_rest-api.patch by @marcomartins and suggest the following changes:

class-wp-rest-request.php
lines 806, 888: /* translators: %s: list of invalid parameters */
line 852: /* translators: %s: list of required parameters */

class-wp-rest-comments-controller.php
line 158: /* translators: %s: list of forbidden parameters */

class-wp-rest-settings-controller.php
line 193: /* translators: %s: property name */

@niq1982
10 days ago

files in /wp-admin/network/ folder

@niq1982
10 days ago

Fixes the translator comments in all files in /wp-includes/* root

@niq1982
10 days ago

Fixes the translator comments in all files in /wp-includes/widgets/ folder

@flipkeijzer
10 days ago

44360-wp-admin-includes-dir

#8 @mihaiiceyro
10 days ago

I've reviewed /44360.wp-includes_customize.2.patch by @marcomartins and suggest the following changes:

class-wp-customize-header-image-control.php

line 182: /* translators: %s: is the header size in pixels */

class-wp-customize-nav-menu-locations-control.php

line 78: /* translators: %s: is the menu name */

class-wp-customize-themes-section.php

line 91: /* translators: %s: is the "Search WordPress.org themes" button text */

#9 @mihaiiceyro
10 days ago

I've reviewed the wp-includes.diff by @niq1982. It looks OK for me.

#10 @vladwtz
10 days ago

I've reviewed @niq1982 wp-admin-network.diff and I suggest to remove the point from the end of the translators comment.

#11 @vladwtz
10 days ago

wp-includes-widgets.diff seems to be ok.

@marcomartins
10 days ago

Fix translators comments in wp-includes/customize folder

@marcomartins
10 days ago

Fix translators comments in wp-includes/rest-api folder

@marcomartins
10 days ago

Fix translators comments in wp-includes/theme-compat folder

@niq1982
10 days ago

Fixes to translator comments in /wp-admin/network/ folder

#12 @alvarogois
10 days ago

I've reviewed 44360-wp-admin-includes-dir.patch by @flipkeijzer and it seems to be OK.

@webdados
10 days ago

Replaces previous wp-admin_root_directory_1_of_2.diff

#13 @alvarogois
9 days ago

I've reviewed 44360/wp-admin_root.diff by @webdados and suggest the following changes:

wp-admin/async-upload.php
Line 95: /* translators: %s: name of file that failed to upload. */

wp-admin/edit-form-advanced.php
Lines 172, 187: /* translators: %s: date the page is scheduled to be published */

wp-admin/edit-link-form.php
Lines 15, 21: /* translators: %s: link to the Links Manager */

wp-admin/freedoms.php
Line 44: /* translators: %s: link to the stats page on wordpress.org */
Line 47: /* translators: %s: link to the privacy page on wordpress.org */
Line 53: /* translators: %s: link to the license page on wordpress.org */

wp-admin/import.php
Line 219: /* translators: %s: link to the plugin directory */

wp-admin/link-manager.php
Line 55: /* translators: %s: link to the widgets page */

wp-admin/plugin-install.php
Line 86: /* translators: %s: link to the plugin directory on wordpress.org */

wp-admin/plugins.php
Line 482: /* translators: %d: number of unexpected outputed characters */

wp-admin/widgets.php
Line 296: /* translators: %s: widget name */

#14 @webdados
8 days ago

@alvarogois Although most suggested changes are merely semantic, I'll upload a new diff file with the suggested changes

Thanks for the review

@webdados
8 days ago

Replaces previous wp-admin_root.diff

@flipkeijzer
8 days ago

Second batch of admin/includes folder patches

This ticket was mentioned in Slack in #core-coding-standards by flipkeijzer. View the logs.


8 days ago

Note: See TracTickets for help on using tickets.