WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#37811 closed defect (bug) (duplicate)

Strings cannot be translated properly in languages with multiple plurals

Reported by: TacoVerdo Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: I18N Keywords:
Focuses: javascript, administration Cc:

Description

In 4.6, the function wp_print_admin_notice_templates was added to /wp-admin/includes/update.php. In this function, a check was added to show a singular or a plural string, depending on the number of plugins/themes installed.

However, the plural strings are added with __() instead of _n(), which means they cannot be translated properly in languages with multiple plural forms, such as Gàidhlig / Scottish Gaelic (as reported here).

Please rewrite this function so that _n() is used for the plural strings.

Change History (3)

#1 @swissspidy
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #37287.

We can't use _n() there because the number comes from the JavaScript. It was a conscious decision to use __() until we have better JS i18n support in core.

#2 @stephenharris
4 years ago

@TacoVerdo For your information, JS i18n support is being tracked in this ticket #20491

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

#3 @SergeyBiryukov
4 years ago

  • Component changed from General to I18N
Note: See TracTickets for help on using tickets.