Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44824 closed enhancement (wontfix)

"Add Images" string should be added without context

Reported by: joshuatf's profile joshuatf Owned by:
Milestone: Priority: normal
Severity: trivial Version: 4.9.8
Component: Media Keywords: close
Focuses: Cc:

Description

The current 'Add Images' string in the gallery widget is provided with context:

'add_media' => _x( 'Add Images', 'label for button in the gallery widget; should not be longer than ~13 characters long' ),

Maybe we could remove the context parameter since there's little room for ambiguity for this string. This would allow us to use the same translation in this PR - https://github.com/Automattic/wp-calypso/pull/26297

Change History (3)

#1 @swissspidy
6 years ago

  • Keywords close added
  • Type changed from defect (bug) to enhancement

There is some room for ambiguity, I think. The context clearly says that there's a character limit for that button.

In other scenarios, this might not be the case. Of course it's not a problem for English, but for other locales this could lead to two different translations.

Proof: There's another string, "Edit Gallery", in the same place with the same context. At the same time, "Edit Gallery" also exists without that context. The Bulgarian translation for these is quite different.

Just because your I18N bot (which seems kinda cool, btw) flags that string and you want to re-use WordPress core strings in your non-core project, I don't think we should make any changes here.

#2 @SergeyBiryukov
6 years ago

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

Hi @joshuatf, welcome to WordPress Trac! Thanks for the ticket.

As noted above, the context here is intentional, see https://github.com/xwp/wp-core-media-widgets/pull/38 for more details.

#3 @joshuatf
6 years ago

@swissspidy @SergeyBiryukov

Thanks for your quick responses. Sure that makes sense and I think we could impose a similar limitation on character length for this new component, but this bit - label for button in the gallery widget is obviously a bit more limiting.

As @swissspidy noted, it looks like there may be room for ambiguity between languages, though I would imagine the context is pretty similar in this case. Is there a general rule followed here for discerning context? Would translations always need to be in the same component or are there any exceptions?

Note: See TracTickets for help on using tickets.