#59947 closed enhancement (fixed)
Comment overkill for time string
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | minor | Version: | |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
If we look at this string and look at the comment: https://translate.wordpress.org/projects/wp/dev/nl-be/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=58766&filters%5Btranslation_id%5D=59297120
We notice this:
Localized time format, see https://www.php.net/manual/datetime.format.php Time format, see https://www.php.net/manual/datetime.format.php Comment time format. See https://www.php.net/manual/datetime.format.php 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. 1: Post edited date, 2: Post edited time. 1: Post creation date, 2: Post creation time. Post time format. See https://www.php.net/manual/datetime.format.php Default time format, see https://www.php.net/manual/datetime.format.php
Since this also appears in the editor, we get irrelevant comments for this string. It also causes that we get the same link 5 times.
-> Maybe this is something for GlotPress... But, I think that comments like these should look better. Since, the fact that there are placeholders in the other strings and what they mean isn't needed for translators when translating just the time string. I think we should just see that link & that the string is also used to show for the localized time, time, comment time, post time & default time format. Besides, why would a locale or why would we use two different time formats in WordPress? Like one written like "g:i A" and in other parts of the interface use "H:i"...? I mean, it doesn't make any sense and isn't user friendly in my personal eyes.
Change History (14)
#1
@
15 months ago
- Component changed from Date/Time to I18N
- Focuses ui docs removed
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 6.5
- Owner set to swissspidy
- Severity changed from normal to minor
- Status changed from new to assigned
This ticket was mentioned in PR #5695 on WordPress/wordpress-develop by @swissspidy.
15 months ago
#2
- Keywords has-patch added; needs-patch removed
Disambiguate usage of translator comments for sprintf()
calls with multiple translated strings.
Writing the code on multiple lines makes it clearer which string the comment is intended for.
Trac ticket: https://core.trac.wordpress.org/ticket/59947
@NekoJonez commented on PR #5695:
15 months ago
#4
Will this PR fix the fact that not in all datetime strings... we get a comment to the PHP manual?
@swissspidy commented on PR #5695:
15 months ago
#5
@NekoJonez Yes. Just this one needs to be added in Gutenberg: https://translate.wordpress.org/projects/wp/dev/nl-be/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=13716800&filters%5Btranslation_id%5D=94748493
@NekoJonez commented on PR #5695:
15 months ago
#6
@NekoJonez Yes. Just this one needs to be added in Gutenberg: https://translate.wordpress.org/projects/wp/dev/nl-be/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=13716800&filters%5Btranslation_id%5D=94748493
Do I need to open a Gutenberg issue in their GitHub or ...?
@swissspidy commented on PR #5695:
15 months ago
#7
If you'd like to open a PR there, feel free!
It basically needs a separate comment between each of those lines:
@NekoJonez commented on PR #5695:
15 months ago
#8
Will do that in the near future.
This ticket was mentioned in Slack in #polyglots by nekojonez. View the logs.
15 months ago
#10
@
15 months ago
I added the Gutenberg PR.
https://github.com/WordPress/gutenberg/pull/56531
@NekoJonez commented on PR #5695:
15 months ago
#11
I tried to make the Gutenberg PR. Curious if I did it right.
After that, it might be ready for commit no?
@swissspidy commented on PR #5695:
15 months ago
#12
Awesome, thanks!
@swissspidy commented on PR #5695:
15 months ago
#14
Committed in https://core.trac.wordpress.org/changeset/57136
Heya, thanks for your report. This is an issue with how the code is formatted & how the strings are extracted for translations. It causes the wrong comments to be associated and ultimately displayed in GlotPress. We can address this by improving the code formatting.