WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 8 months ago

#46278 new enhancement

Consider internationalization of delimiter: human_readable_duration

Reported by: tmatsuur Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.1
Component: I18N Keywords: has-patch
Focuses: Cc:
PR Number:

Description

I have a request for the human_readable_duration function added in version 5.1.

Please make it possible to change the delimiter of concatenation by language.

return implode( _x( ', ', 'duration' ), $human_readable_duration );

Attachments (1)

46278.diff (472 bytes) - added by mukesh27 8 months ago.
Patch.

Download all attachments as: .zip

Change History (4)

@mukesh27
8 months ago

Patch.

#1 follow-up: @mukesh27
8 months ago

  • Component changed from General to I18N
  • Keywords has-patch added

@tmatsuur attached patch as per your suggestion.

#2 in reply to: ↑ 1 @tmatsuur
8 months ago

Replying to mukesh27:

@tmatsuur attached patch as per your suggestion.

Thanks.
I hope the context described as an example conforms to the naming rules.

#3 @johnbillion
8 months ago

  • Milestone changed from Awaiting Review to Future Release
  • Type changed from feature request to enhancement

There's quite a few places in core that use the implode( ', ', ... ) pattern for using-facing text. I think this is something that should be addressed more widely if the comma needs to be localised.

Note: See TracTickets for help on using tickets.