#6659 closed defect (bug) (fixed)
Update " (required)" sting in `bp_get_the_profile_field_required_label()`
Reported by: | netweb | Owned by: | dcavins |
---|---|---|---|
Milestone: | 2.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | good-first-bug has-patch |
Cc: | dcavins |
Description
Either 1) remove the leading whitespace character or 2) add a translator note
Source: https://buddypress.trac.wordpress.org/browser/trunk/src/bp-xprofile/bp-xprofile-template.php#L1339
String example for en-AU: https://translate.wordpress.org/projects/wp-plugins/buddypress/dev/en-au/default?filters[status]=either&filters[original_id]=14969&filters[translation_id]=2981007
1) Remove the leading space and merge the string with other ~25 instances of (required)
, see https://translate.wordpress.org/projects/wp-plugins/buddypress/dev/en-au/default?filters[status]=either&filters[original_id]=6279&filters[translation_id]=2980835
or
2) Add a translator note explaining the leading whitespace character as it would clarify why it exists without having to check the source code
Attachments (1)
Change History (10)
#4
@
9 years ago
If it makes things more reliable, then we live with the space outside the translatable string, but we must have the space exist somewhere, problem can be that the space gets removed if not careful when it's sort of floating around :)
Pauls got a point though, how are these spaces handled by rtl layouts?
We could user :before/:after to add empty content string? But guessing janus wouldn't see ::before/::after as properties to be switched?
#5
follow-up:
↓ 6
@
9 years ago
Wouldn't a space between text and a span just be handled inline with the text flow?
Or, is A long title <span>donkeys</span>
a different case than A long title of horses
?
In either case, moving the space outside the span versus leaving it in the span should be an equivalent case for RTL handling, shouldn't it?
Label<span> (required)</span>
versus Label <span>(required)</span>
I'm speculating wildly, here.
#6
in reply to:
↑ 5
@
9 years ago
- Keywords has-patch added; needs-patch removed
Replying to dcavins:
In either case, moving the space outside the span versus leaving it in the span should be an equivalent case for RTL handling, shouldn't it?
Label<span> (required)</span>
versusLabel <span>(required)</span>
Correct, removing the space from the translatable string and moving it out of the span is perfectly fine from RTL point of view. Text direction is still the same.
Ha, I caused this problem. Is everyone ok with removing the line breaks from this code so that the space can live outside the translatable string? It'll ugly up the PHP a little, but make the result so much more reliable. @hnla?