Opened 7 years ago
Closed 7 years ago
#41653 closed defect (bug) (fixed)
There should be a space before the : character in french
Reported by: | greganeclegor | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 1.2 |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
The function the_meta generates a list with the character : after the values. However, in french and maybe other languages, a non breaking space is needed before the colon character.
http://www.btb.termiumplus.gc.ca/tcdnstyl-chap?lang=eng&lettr=chapsect17&info0=17
Attachments (3)
Change History (11)
#1
@
7 years ago
- Component changed from Formatting to I18N
- Keywords needs-patch good-first-bug added
- Version changed from 4.8 to 1.2
#2
@
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
#4
@
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.
#6
@
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.
#7
@
7 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.
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.