Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#41653 closed defect (bug) (fixed)

There should be a space before the : character in french

Reported by: greganeclegor's profile greganeclegor Owned by: johnbillion's profile johnbillion
Milestone: 4.9 Priority: normal
Severity: normal Version: 1.2
Component: I18N Keywords: has-patch
Focuses: Cc:

Attachments (3)

41653.diff (1.2 KB) - added by audrasjb 7 years ago.
Patch first proposition for #41653
41653.2.diff (1.1 KB) - added by audrasjb 7 years ago.
Small correction: normal space after ":" instead of unbreakable
41653.3.diff (1.3 KB) - added by SergeyBiryukov 6 years ago.

Download all attachments as: .zip

Change History (11)

#1 @johnbillion
7 years ago

  • Component changed from Formatting to I18N
  • Keywords needs-patch good-first-bug added
  • Version changed from 4.8 to 1.2

Thanks for the ticket, @greganeclegor.

This function is a terribly old one, which looks like it's full of bugs. For example, it assumes that meta values are strings. I would recommend writing your own function which just outputs what you need.

That said, a patch which changes $key: into something like _x( '%s:', 'Post custom field name' ) would be welcome.

#2 @audrasjb
7 years ago

  • Keywords has-patch added; needs-patch removed

Hello,

Thanks greganeclegor for the ticket. I’m french and a member of the fr_FR polyglots team :)

This is a patch proposal for this ticket.
I simply add a internationalized separator and I included it in the output.

I hope that everything is okay, this is my very first patch. I tried to follow WP coding standards and I tried to read a lot before coding. But I wont be surprised if I did some mistakes… I hope that my git .diff is okay too.

Let me know if anything is wrong, I'll be happy to do better the next time.

Best regards,
Jb

@audrasjb
7 years ago

Patch first proposition for #41653

@audrasjb
7 years ago

Small correction: normal space after ":" instead of unbreakable

#3 @johnbillion
7 years ago

  • Owner set to johnbillion
  • Status changed from new to reviewing

#4 @johnbillion
7 years ago

Thanks for the patch.

It would be preferable if this whole string was localised, but the <span> element complicates this. I think 41653.2.diff is about as good as this will get.

#5 @johnbillion
7 years ago

  • Keywords good-first-bug removed
  • Milestone changed from Awaiting Review to 4.9

#6 @audrasjb
7 years ago

@johnbillion thanks for reviewing.
As a PTE I was sad to have to do it this way but it was more complicated to deal with that markup. I hope translators will understand it with the explanation provided in the string.

Last edited 7 years ago by audrasjb (previous) (diff)

#7 @SergeyBiryukov
6 years ago

41653.2.diff is a good start. Some things to consider:

  • We can't change existing filter's parameters like that, new parameters should come at the end.
  • Translatable strings should not include any trailing spaces, as they can be accidentally removed.
  • It's better to translate %s:, as suggested in comment:1, than a standalone separator.

41653.3.diff implements comment:1.

#8 @SergeyBiryukov
6 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 41583:

I18N: Allow for post custom field name in the_meta() to be translated, e.g. to insert a non-breaking space before the colon.

Props audrasjb, johnbillion.
Fixes #41653.

Note: See TracTickets for help on using tickets.