Make WordPress Core

Opened 9 months ago

Closed 6 months ago

Last modified 6 months ago

#59347 closed enhancement (fixed)

Typo on the Gettext_Translations class

Reported by: tohincoderex's profile tohincoderex Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.5 Priority: normal
Severity: normal Version: 6.3.1
Component: I18N Keywords: has-patch
Focuses: coding-standards Cc:


There appears to be a typo in the function name and PHPDoc comments within the file located at src/wp-includes/pomo/translations.php

Line -

Change History (6)

This ticket was mentioned in PR #5213 on WordPress/wordpress-develop by @tohincoderex.

9 months ago

Trac ticket:

Description: Typo on the Gettext_Translations class

  • changeparenthesize_plural_exression function name toparenthesize_plural_expression
  • change oerators word tooperators

#2 @jrf
9 months ago

  • Focuses php-compatibility removed
  • Keywords close added

@tohincoderex Thanks for opening this ticket and bringing this to our attention.

This file is regarded as a file from an external dependency and should for that reason not be changed without due cause.

Renaming the function would break every single function call to that function and would cause fatal errors. Breaking changes like that are not acceptable.

The typo has been in the original external dependency since (at least) 2009.
Of course, the function could be deprecated, a new function without the typo introduced and calls to the function could be updated, but as this is an external dependency, that is the kind of change we normally do not do for those kind of files (at least, not unless the change has first been made in the externally maintained code first).

#3 @SergeyBiryukov
6 months ago

  • Component changed from General to I18N
  • Keywords close removed
  • Milestone changed from Awaiting Review to 6.5

Hi there, welcome to WordPress Trac! Thanks for the ticket.

The affected method is unused by core as of WordPress 4.9, [41722] / #41562. It should be fine to deprecate it.

#4 @SergeyBiryukov
6 months ago

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

In 57161:

I18N: Deprecate Gettext_Translations::parenthesize_plural_exression().

Aside from having a typo in the name, the method is unused by core as of WordPress 4.9.

Follow-up to [10584], [12079], [41722].

Props tohincoderex, jrf.
Fixes #59347.

#5 @SergeyBiryukov
6 months ago

In 57162:

Docs: Fix typo in Gettext_Translations::parenthesize_plural_exression() description.

Follow-up to [10584], [12079], [41722], [57161].

Props tohincoderex.
See #59347.

@SergeyBiryukov commented on PR #5213:

6 months ago

Thanks for the PR! The method was deprecated in r57161, and a typo in the description was fixed in r57162.

Note: See TracTickets for help on using tickets.