WordPress.org

Making WordPress.org

Opened 4 months ago

Closed 4 months ago

#3077 closed defect (fixed)

Add missing singular placeholder in comments.php wordpress.tv

Reported by: afzalmultani Owned by: 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 4 months ago.
Missing singular placeholder
3077.2.diff (1.2 KB) - added by SergeyBiryukov 4 months ago.

Download all attachments as: .zip

Change History (4)

@afzalmultani
4 months ago

Missing singular placeholder

#1 @SergeyBiryukov
4 months 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.

Version 1, edited 4 months ago by SergeyBiryukov (previous) (next) (diff)

#2 @coffee2code
4 months 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.