WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 3 months ago

Last modified 3 months ago

#44360 closed task (blessed) (fixed)

Missing translators comment need to be added

Reported by: jrf Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: minor Version: 5.1
Component: I18N Keywords: good-first-bug has-patch
Focuses: coding-standards Cc:
PR Number:

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 (60)

44360.admin-footer.diff (497 bytes) - added by subrataemfluence 18 months ago.
Patch for admin-footer.php
44360.admin.php.diff (544 bytes) - added by subrataemfluence 18 months ago.
Patch for core file wp-admin/admin.php
44360.async-upload.php.diff (886 bytes) - added by subrataemfluence 18 months ago.
Core file: wp-admin/async-upload.php
44360.comment.php.diff (567 bytes) - added by subrataemfluence 18 months ago.
Core file: wp-admin/comment.php
44360-src.diff (3.9 KB) - added by GaryJ 18 months ago.
Fixes WordPress.WP.I18n violations in src/*.php files.
wp-admin_root_directory_1_of_2.diff (24.0 KB) - added by webdados 18 months ago.
First of two patch files for wp-admin/*
44360-src.2.diff (3.3 KB) - added by GaryJ 18 months 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 18 months ago.
Patch for about.php
44360.widgets.php (984 bytes) - added by Dency 18 months ago.
Patch for widgets.php
44360.about.php.diff (1.9 KB) - added by Dency 18 months ago.
44360.widgets.php.diff (984 bytes) - added by Dency 18 months ago.
44360.class-wp-widget-recent-comments.php.diff (834 bytes) - added by Dency 18 months ago.
Patch for class-wp-widget-recent-comments.php File
44360.wp-includes.diff (1.4 KB) - added by Dency 18 months ago.
Fixes WordPress.WP.I18n violations in wp-inlcudes files
44360.wp-includes_customize.patch (3.4 KB) - added by marcomartins 18 months ago.
Fix translators comments in wp-includes/customize folder
44360.wp-includes_customize.2.patch (3.4 KB) - added by marcomartins 18 months ago.
Fix translators comments in wp-includes/customize folder
44360.wp-includes_rest-api.patch (4.4 KB) - added by marcomartins 18 months ago.
Fix translators comments in wp-includes/rest-api folder
44360.wp-includes_theme_compat.patch (4.2 KB) - added by marcomartins 18 months ago.
Fix translators comments in wp-includes/theme-compat folder
wp-admin-network.diff (9.5 KB) - added by niq1982 18 months ago.
files in /wp-admin/network/ folder
wp-includes.diff (38.3 KB) - added by niq1982 18 months ago.
Fixes the translator comments in all files in /wp-includes/* root
wp-includes-widgets.diff (1.6 KB) - added by niq1982 18 months 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 18 months ago.
44360-wp-admin-includes-dir
44360.wp-includes_customize.3.patch (3.3 KB) - added by marcomartins 18 months ago.
Fix translators comments in wp-includes/customize folder
44360.wp-includes_rest-api.2.patch (4.4 KB) - added by marcomartins 18 months ago.
Fix translators comments in wp-includes/rest-api folder
44360.wp-includes_theme_compat.2.patch (4.2 KB) - added by marcomartins 18 months ago.
Fix translators comments in wp-includes/theme-compat folder
wp-admin-network.2.diff (9.5 KB) - added by niq1982 18 months ago.
Fixes to translator comments in /wp-admin/network/ folder
wp-admin_root.diff (64.8 KB) - added by webdados 18 months ago.
Replaces previous wp-admin_root_directory_1_of_2.diff
wp-admin_root.2.diff (64.8 KB) - added by webdados 18 months ago.
Replaces previous wp-admin_root.diff
44360-wp-admin-includes-dir-patch2.diff (16.0 KB) - added by flipkeijzer 18 months ago.
Second batch of admin/includes folder patches
44360.async-upload.php-2.diff (886 bytes) - added by subrataemfluence 16 months ago.
Corrected grammar error
44360.wp-includes.bookmark-template.php.patch (496 bytes) - added by chandrapatel 15 months ago.
Add translators comment in /wp-includes/bookmark-template.php file.
43360.class-wp-customize-nav-menus.php.patch (891 bytes) - added by thrijith 15 months ago.
tools.patch (2.7 KB) - added by joshuanoyce 15 months ago.
44360.class-wp-ms-users-list-table.php.diff (1.5 KB) - added by FesoVik 14 months ago.
diff src/wp-admin/includes/class-wp-ms-users-list-table.php
44360.class-wp-ms-users-list-table.php.2.diff (2.0 KB) - added by FesoVik 14 months ago.
44360.class-wp-posts-list-table.php.diff (1.5 KB) - added by FesoVik 14 months ago.
44360.class-wp-screen.php.diff (614 bytes) - added by FesoVik 14 months ago.
44360.class-wp-terms-list-table.php.diff (635 bytes) - added by FesoVik 14 months ago.
44360.class-wp-nav-menu-widget.php.patch (753 bytes) - added by tessak22 14 months ago.
Add a translator comment for a sprintf call
44360-about-added-missing-translation.php.patch (860 bytes) - added by bhaktirajdev 13 months ago.
Attached about.php with missing translation.
44360-about-added-missing-translation.php.2.patch (860 bytes) - added by cleancoded 11 months ago.
admin-bar.php.patch (534 bytes) - added by dhavalkasvala 11 months ago.
44360.class-wp-users-list-table.php.diff (812 bytes) - added by garrett-eclipse 11 months ago.
Adds translator comments to class-wp-users-list-table.php similar to those done by @FesoVik on class-wp-ms-users-list-table.php
wp-signup.php.patch (417 bytes) - added by dhavalkasvala 9 months ago.
44360.wp-admin-includes-image-edit.php.diff (847 bytes) - added by bibliofille 9 months ago.
Added translator comment in wp-admin/includes/image-edit.php
44360-wp-includes:embed.php.diff (495 bytes) - added by socalchristina 9 months ago.
Add translators comments to clarify their meaning of placeholders.
44360.custom-background.php.diff (1.4 KB) - added by priyankkpatel 7 months ago.
Patch for wp-admin/custom-background.php
44360.wp-admin_comment.diff (875 bytes) - added by priyankkpatel 7 months ago.
Patch for wp-admin/comment.php
44560.diff (529 bytes) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/admin-footer
44560-custom-header.diff (8.0 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/custom-header
44560-edit-form-advanced.diff (9.1 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/edit-form-advanced
44560-edit-link-form.diff (9.8 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/edit-link-form
44560-edit-tags.diff (12.0 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/edit-tags
44560-import.diff (12.8 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/import
44560-class-wp-links-list-table.diff (14.7 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/includes\class-wp-links-list-table
44560-class-wp-links-list-table.2.diff (1.9 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/includes/class-wp-links-list-table
44560-class-wp-media-list-table.diff (1.5 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/includes/class-wp-media-list-table
44560-class-wp-ms-sites-list-table.diff (833 bytes) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/includes/class-wp-ms-sites-list-table
44560-class-wp-ms-themes-list-table.diff (1.3 KB) - added by 5hel2l2y 7 months ago.
translator comment added in wp-admin/includes/class-wp-ms-themes-list-table
44360-translators-comments.patch (15.4 KB) - added by pierlo 4 months ago.
Add
44360-translators-comments.2.patch (15.4 KB) - added by pierlo 4 months ago.
Add some missing translators comments

Download all attachments as: .zip

Change History (121)

@subrataemfluence
18 months ago

Patch for admin-footer.php

@subrataemfluence
18 months ago

Patch for core file wp-admin/admin.php

@subrataemfluence
18 months ago

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

@subrataemfluence
18 months ago

Core file: wp-admin/comment.php

#1 @GaryJ
18 months 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
18 months ago

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

@webdados
18 months ago

First of two patch files for wp-admin/*

@GaryJ
18 months ago

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

@Dency
18 months ago

Patch for about.php

@Dency
18 months ago

Patch for widgets.php

#2 @swissspidy
18 months 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
18 months ago

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

@Dency
18 months ago

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

#3 @alvarogois
18 months ago

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

@marcomartins
18 months ago

Fix translators comments in wp-includes/customize folder

@marcomartins
18 months ago

Fix translators comments in wp-includes/customize folder

@marcomartins
18 months ago

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

@marcomartins
18 months ago

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

#4 @alvarogois
18 months ago

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

#5 @mihaiiceyro
18 months ago

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

#6 @vladwtz
18 months 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 are doing it.

Version 0, edited 18 months ago by vladwtz (next)

#7 @alvarogois
18 months 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
18 months ago

files in /wp-admin/network/ folder

@niq1982
18 months ago

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

@niq1982
18 months ago

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

@flipkeijzer
18 months ago

44360-wp-admin-includes-dir

#8 @mihaiiceyro
18 months 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
18 months ago

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

#10 @vladwtz
18 months 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
18 months ago

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

@marcomartins
18 months ago

Fix translators comments in wp-includes/customize folder

@marcomartins
18 months ago

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

@marcomartins
18 months ago

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

@niq1982
18 months ago

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

#12 @alvarogois
18 months ago

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

@webdados
18 months ago

Replaces previous wp-admin_root_directory_1_of_2.diff

#13 @alvarogois
18 months 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
18 months 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
18 months ago

Replaces previous wp-admin_root.diff

@flipkeijzer
18 months ago

Second batch of admin/includes folder patches

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


18 months ago

#16 @swissspidy
16 months ago

In the wp i18n make-pot command to create POT files for WordPress plugins and themes, but also WordPress core, I added a check to find strings with multiple different translator comments. I also added some other checks that I copied from WPCS (kudos!).

This is usually an indicator that these should be multiple strings with different contexts or that the translator comments should be unified. Otherwise translators will see multiple comments in GlotPress when trying to translate a string.

For example, the string More information about %s exists three times in WordPress core. Once, the translator comment is %s: plugin name and version, the second time it's %s: Importer name and in the third instance there's no comment at all.

Here are the current warnings for WordPress 4.9.8: https://gist.github.com/swissspidy/006e26b7ba53cdb68a5d10763d8fcc31

#17 @jrf
16 months ago

In 43595:

I18n: Improve translators comments [1].

  • Add missing translators comments.
  • Fix placement of some translators comments. Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various .pot file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Patch 44360-src.2.diff of the series.

Props garyj, alvarogois, michielatyoast
See #44360

#18 @jrf
16 months ago

In 43596:

I18n: Improve translators comments [2].

  • Add missing translators comments.
  • Fix placement of some translators comments. Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various .pot file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Patch 44360.wp-includes_customize.3.patch of the series.

Props marcomartins, mihaiiceyro, michielatyoast
See #44360

#19 @jrf
16 months ago

In 43598:

I18n: Improve translators comments [3].

  • Add missing translators comments.
  • Fix placement of some translators comments. Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various .pot file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Includes minor code layout fixes.

Patch 44360-wp-admin-includes-dir.patch of the series.

Props flipkeijzer, alvarogois, michielatyoast
See #44360

#20 @michielatyoast
16 months ago

Reviewed

by @subrataemfluence and all three seem fine

there is a grammar error in there:

/* translators: %s: Name of the file that was failed to upload. */

should be

/* translators: %s: Name of the file that has failed to upload. */

@subrataemfluence
16 months ago

Corrected grammar error

#22 @michielatyoast
16 months ago

Reviewed https://core.trac.wordpress.org/attachment/ticket/44360/44360.wp-includes_theme_compat.patch and following @swissspidy 's comment I suggest these change:

wp-includes/theme-compat/sidebar.php
line 45 /* translators: %s: the category name */

#23 @michielatyoast
16 months ago

@marcomartins is https://core.trac.wordpress.org/attachment/ticket/44360/44360.wp-includes_theme_compat.2.patch the successor of https://core.trac.wordpress.org/attachment/ticket/44360/44360.wp-includes_theme_compat.patch

https://core.trac.wordpress.org/attachment/ticket/44360/44360.wp-includes_theme_compat.2.patch suggested change add line 106 to wp-includes/theme-compat/sidebar.php
106 /* translators: 1: URL to blog; 2: Name of blog. */
107 sprintf( '<a href="%1$s/">%2$s</a>', get_bloginfo( 'url' ), get_bloginfo( 'name' ) )

@chandrapatel
15 months ago

Add translators comment in /wp-includes/bookmark-template.php file.

@joshuanoyce
15 months ago

@FesoVik
14 months ago

diff src/wp-admin/includes/class-wp-ms-users-list-table.php

#25 follow-up: @jrf
14 months ago

@FesoVik I appreciate your enthousiasm to contribute to this ticket.
The existing patches cover most files already. Please check that you're not doing double work before creating a patch.

#26 in reply to: ↑ 25 @FesoVik
14 months ago

Replying to jrf:

@FesoVik I appreciate your enthousiasm to contribute to this ticket.
The existing patches cover most files already. Please check that you're not doing double work before creating a patch.

Thank you for the reply. I am following the gist file and only doing those that are not yet done.

#27 follow-up: @jrf
14 months ago

@FesoVik That gist is from June and does not contain the patches which have been uploaded here...

#28 in reply to: ↑ 27 @FesoVik
14 months ago

Replying to jrf:

@FesoVik That gist is from June and does not contain the patches which have been uploaded here...

Yes, I am aware. I did not find any submitted patches for the files I just uploaded.

#29 @pento
14 months ago

  • Milestone changed from 5.0 to 5.1

@tessak22
14 months ago

Add a translator comment for a sprintf call

#30 @bhaktirajdev
13 months ago

Added a translator comment for src/wp-admin/about.php file.

@bhaktirajdev
13 months ago

Attached about.php with missing translation.

#31 follow-up: @swissspidy
12 months ago

@tessak22 The "menus widget:" part is not needed in the translator comment.

@bhaktirajdev Please note that your patch is incorrect in a few ways.

First of all, /* translators: %s: Welcome message */ and /* translators: %s: Thank You message for latest version updation */ are wrong. The translator comment should describe the placeholder. Adding a comment like "Welcome message" to "Welcome to WordPress&nbsp;%s" is not really helpful :-) I think everyone gets that it's a welcome message.

Second, the comments need to be in the PHP part of file and directly precede the line of the __() function calls. See 44360.about.php.diff for a correct example.

#32 in reply to: ↑ 31 @bhaktirajdev
12 months ago

Replying to swissspidy:

@swissspidy Thank you for your guidance. It should be in PHP part of the file - completely overlooked it in excitement of contributing first time. Also noted the point - comment should describe the placeholder. Thanks for the help :)

@tessak22 The "menus widget:" part is not needed in the translator comment.

@bhaktirajdev Please note that your patch is incorrect in a few ways.

First of all, /* translators: %s: Welcome message */ and /* translators: %s: Thank You message for latest version updation */ are wrong. The translator comment should describe the placeholder. Adding a comment like "Welcome message" to "Welcome to WordPress&nbsp;%s" is not really helpful :-) I think everyone gets that it's a welcome message.

Second, the comments need to be in the PHP part of file and directly precede the line of the __() function calls. See 44360.about.php.diff for a correct example.

#33 @swissspidy
11 months ago

#45809 was marked as a duplicate.

#34 @swissspidy
11 months ago

Note that the latest two patches for about.php are incorrect. The translator comments should describe the %s placeholders in the message, not the message itself.

#35 @SergeyBiryukov
11 months ago

  • Component changed from General to I18N

#36 @desrosj
11 months ago

@jrf @swissspidy Are you able to summarize what is left or commit the rest here for 5.1?

This ticket was mentioned in Slack in #core by paolacantadore2018. View the logs.


11 months ago

#38 @jrf
11 months ago

  • Owner set to jrf
  • Status changed from new to assigned

@desrosj Status summary:

  • All patches created at WCEU have been reviewed for i18n correctness. Those patches have priority.
  • They do still need to be reviewed for CS in general and where necessary updated.
  • I had only just started updating and committing the WCEU patches when trunk got closed.
  • Now trunk is open again, I expect a lot of patches won't go in clean anymore, aside from chances being that new patches for newly introduced issues may be needed.
  • It's on my things to list, but what with all the updates needed, it's not a small job, so trying to find the time.
  • All other patches should only be reviewed once the WCEU patches have gone in to see if they are still needed.

For my planning: What's the cut-off date for WP 5.1 ?

#39 @pento
11 months ago

  • Type changed from enhancement to task (blessed)

February 7 is the hard string freeze for 5.1, that's the latest possible date for committing these. As they're translator comments, I'm fine with them being committed across the beta period.

I've converted this ticket to a task to reflect that.

#40 @pento
11 months ago

@jrf: The soft string freeze is January 29, are you likely to be able to work on this before then?

#41 @swissspidy
11 months ago

As long as only the translator comments are changed and not the strings themselves, this shouldn‘t be a problem for string freeze because no translations should get fuzzied that way.

#42 @jrf
11 months ago

@pento @swissspidy It's on my radar and I'll try to get to it before the end of the month.
Most of my focus is currently on a major code refactor for PHPCS 3.5.0 which has some time pressure too, so trying to juggle things.

#43 @ocean90
11 months ago

I'd like to help committing the patches but it's unclear what patches need to be committed. I think a spreadsheet might help here which for example marks WCEU patches as such. Does something like this already exist somewhere?

@garrett-eclipse
11 months ago

Adds translator comments to class-wp-users-list-table.php similar to those done by @FesoVik on class-wp-ms-users-list-table.php

#44 @pento
10 months ago

  • Milestone changed from 5.1 to 5.2

With RC1 approaching, I'm moving this to 5.2 for continued work.

@bibliofille
9 months ago

Added translator comment in wp-admin/includes/image-edit.php

@socalchristina
9 months ago

Add translators comments to clarify their meaning of placeholders.

#45 @socalchristina
9 months ago

Hi, WordPress community. I made a spreadsheet (using @ocean90 's suggestion) while I sorted through the submitted and reviewed patches trying to determine what still remains. You can find it here if you're interested: https://github.com/SoCalChristina/DjcdUOR26wAZUIuPcdIyAO
Cheers

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 months ago

#47 @JeffPaul
8 months ago

  • Milestone changed from 5.2 to 5.3

Per input from @jrf in Slack, we're going to punt this to 5.3 to work through remaining updates then.

@priyankkpatel
7 months ago

Patch for wp-admin/custom-background.php

@priyankkpatel
7 months ago

Patch for wp-admin/comment.php

#49 @johnbillion
7 months ago

#38882 was marked as a duplicate.

This ticket was mentioned in Slack in #core by 5hel2l2y. View the logs.


7 months ago

This ticket was mentioned in Slack in #core-i18n by 5hel2l2y. View the logs.


7 months ago

@5hel2l2y
7 months ago

translator comment added in wp-admin/admin-footer

@5hel2l2y
7 months ago

translator comment added in wp-admin/custom-header

@5hel2l2y
7 months ago

translator comment added in wp-admin/edit-form-advanced

@5hel2l2y
7 months ago

translator comment added in wp-admin/edit-link-form

@5hel2l2y
7 months ago

translator comment added in wp-admin/edit-tags

@5hel2l2y
7 months ago

translator comment added in wp-admin/import

@5hel2l2y
7 months ago

translator comment added in wp-admin/includes\class-wp-links-list-table

@5hel2l2y
7 months ago

translator comment added in wp-admin/includes/class-wp-links-list-table

@5hel2l2y
7 months ago

translator comment added in wp-admin/includes/class-wp-media-list-table

@5hel2l2y
7 months ago

translator comment added in wp-admin/includes/class-wp-ms-sites-list-table

@5hel2l2y
7 months ago

translator comment added in wp-admin/includes/class-wp-ms-themes-list-table

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


5 months ago

#53 @adamsilverstein
5 months ago

I regenerated the list of issues with PHPCS to help in the effort to align with patches:

Summary: https://gist.github.com/adamsilverstein/f8e3b84902d8452b6e6e2a3c0f618331
Complete report: https://gist.github.com/adamsilverstein/969ab73a5a0c18de60c6c83eeeb3b0c7

I used the following commands to generate thes, hope thats right:

./vendor/bin/phpcs src/*.php src/**/*.php --standard=WordPress --sniffs=WordPress.WP.I18n --report=summary

./vendor/bin/phpcs src/*.php src/**/*.php --standard=WordPress --sniffs=WordPress.WP.I18n

#54 @JeffPaul
5 months ago

Thanks for the updated output noting remaining issues to fix @adamsilverstein!

I've gone updated the spreadsheet that @socalchristina created, turned it into a Google Sheet, and brought it current with the list of issues that @adamsilverstein pulled above and with the lastest patches.

Notes on the Google Sheet:
1) Core file links to the specific output for each core file
2) .patch/.diff file links to any existing patches for that core file
3) Committed notes whether said patch has been committed
4) Contributor notes who contributed said patch
5) Review/Reply columns note who's reviewed said patch and which comment on this ticket the review came from

Note for folks looking to contribute additional patches:

  • Please focus on rows where the .patch/.diff file column is empty as that means no one else has submitted a patch for that core file yet

Note for folks looking to review patches:

  • Please focus on rows where there is an existing .patch/.diff file but the Review/Reply is empty

Note for committers:

  • Please focus on patches in rows where there is an existing Review/Reply noted, though you'll want to double check the linked review comment to ensure the patch was marked as "OK" and not a comment requesting a refresh

I've given @jrf and @socalchristina edit rights to the Google Sheet (and can grant others as well), but I'll attempt to update the Google Sheet so that its current for any contributors, reviewers, or committers looking for a current status on this ticket.

@pierlo
4 months ago

Add some missing translators comments

#55 @Mista-Flo
4 months ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #core by sergey. View the logs.


3 months ago

#57 @SergeyBiryukov
3 months ago

  • Owner changed from jrf to SergeyBiryukov
  • Status changed from assigned to reviewing

#58 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 45926:

I18N: Improve translator comments.

  • Add missing translator comments.
  • Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various .pot file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.

#59 @SergeyBiryukov
3 months ago

In 45927:

I18N: Split translatable strings located on the same line preceded with a translator comment, where the first string needs that comment, but the second does not.

Props johnbillion.
See #44360.

#60 @SergeyBiryukov
3 months ago

In 45932:

I18N: Capitalize translator comments consistently, add trailing punctuation.

Includes minor code layout fixes.

See #44360.

#61 @SergeyBiryukov
3 months ago

In 45933:

I18N: Fix typo in a function name in [45932].

See #44360.

Note: See TracTickets for help on using tickets.