WordPress.org

Making WordPress.org

Opened 8 months ago

Closed 8 months ago

#5377 closed defect (reported-upstream)

Plural form with missing plural translation results in blank string

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords: close
Cc:

Description

A string in a plugin of mine was translated into a few languages prior to me converting it to a pluralised string. It went from using _x() to using _nx().

Some translations therefore exist for the singular form but not the plural forms. The effect this has is that the plural forms are empty strings, and these empty strings get used as for the plural forms in the plugin meaning users cannot see the text.

Here is the en_GB translation for one of the strings. Note the Plural tab contains no translation.

https://translate.wordpress.org/projects/wp-plugins/query-monitor/stable/en-gb/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=3336653&filters%5Btranslation_id%5D=45095580

I'm not sure if this is something that should be fixed at the point where the translation is packaged, or in WordPress at the point where the plural form is chosen.

Thoughts?

Change History (3)

#1 @markscottrobson
8 months ago

I have amended the relevant en_GB translations.

#2 @dd32
8 months ago

  • Keywords close added

I'm not sure if this is something that should be fixed at the point where the translation is packaged, or in WordPress at the point where the plural form is chosen.

How about a 3rd option? The GlotPress import process should be treating the singular & singular-plural originals as different strings, thus not marking the singular translation as a translation of the pluralised form.

I believe I've seen some code in GlotPress which matches translations based on the singular-only string, so I believe this probably belongs as a GlotPress bug.

I wasn't able to find a issue in GlotPress for this kind of behaviour. I'm marking this as close as I feel this should be fixed/reported upstream, but that this ticket should remain until that happens (if it happens).

#3 @johnbillion
8 months ago

  • Resolution set to reported-upstream
  • Status changed from new to closed

Cheers. I'm not familiar with the relationship between translate.w.org and GlotPress so I opened the issue here first to be safe.

I've reported this upstream to GlotPress: https://github.com/GlotPress/GlotPress-WP/issues/1191

Note: See TracTickets for help on using tickets.