Make WordPress Core

Opened 11 months ago

Closed 8 months ago

Last modified 8 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:

Description

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 - https://github.com/WordPress/wordpress-develop/blob/943e2b95511794417d545ca06fa22c0167391267/src/wp-includes/pomo/translations.php#L255

Change History (6)

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


11 months ago
#1

Trac ticket: https://core.trac.wordpress.org/ticket/59347

Description: Typo on the Gettext_Translations class

  • changeparenthesize_plural_exression function name toparenthesize_plural_expression
  • change oerators word tooperators

#2 @jrf
11 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
8 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
8 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
8 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:


8 months ago
#6

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.