Making WordPress.org

Opened 7 years ago

Closed 7 years ago

#3077 closed defect (bug) (fixed)

Add missing singular placeholder in comments.php wordpress.tv

Reported by: afzalmultani's profile afzalmultani Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: WordPress.tv Keywords: has-patch
Cc:

Description

Missing singular placeholder, needed for some languages.

Attachments (2)

3077.diff (2.3 KB) - added by afzalmultani 7 years ago.
Missing singular placeholder
3077.2.diff (1.2 KB) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (4)

@afzalmultani
7 years ago

Missing singular placeholder

#1 @SergeyBiryukov
7 years ago

  • Keywords has-patch added

For a bit more context, the suggested pattern is recommended for better compatibility with languages that use the singular form for other numbers (e.g. 21, 31 and so on, much like '21st', '31st' in English), see https://codex.wordpress.org/I18n_for_WordPress_Developers#Plurals.

It's now implemented in Twenty Sixteen and Twenty Seventeen, and should be added to older bundled themes as well in #WP39660.

3077.diff looks good, the only issue is that get_comments_number() returns a string and should not be strictly compared to an integer.

3077.2.diff fixes that and removes unrelated formatting changes.

Should be good to go.

Last edited 7 years ago by SergeyBiryukov (previous) (diff)

#2 @coffee2code
7 years ago

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

In 5844:

WordPress.tv: Add missing singular placeholder in comments.php.

Uses the recommended pattern for better compatibility with languages that use the singular form for other numbers. Also adds translator comments.

Props afzalmultani, SergeyBiryukov.
Fixes #3077.

Note: See TracTickets for help on using tickets.