Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#46278 new enhancement

Consider internationalization of delimiter: human_readable_duration

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

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 6 years ago.
Patch.

Download all attachments as: .zip

Change History (4)

@mukesh27
6 years ago

Patch.

#1 follow-up: @mukesh27
6 years ago

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

@tmatsuur attached patch as per your suggestion.

#2 in reply to: ↑ 1 @tmatsuur
6 years 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
6 years 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.