Opened 6 years ago
Closed 6 years ago
#45162 closed defect (bug) (fixed)
Comments for translators must be added in script-loader.php
Reported by: | tobifjellner | Owned by: | pento |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Script Loader | Keywords: | has-patch, fixed-5.0 |
Focuses: | Cc: |
Description
Location: https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes/script-loader.php
Rows 410-414
<?php 'formats' => array( 'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ), 'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ), 'datetime' => __( 'F j, Y g:i a', 'default' ), 'datetimeAbbreviated' => __( 'M j, Y g:i a', 'default' ),
It is very important to add translator comments for these strings with link to relevant documentation about time and date formats.
Attachments (3)
Change History (15)
#3
@
6 years ago
No, you need to do something like:
<?php 'formats' => array( /* translators: revision date format, see https://secure.php.net/date */ 'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ), /* translators: revision date format, see https://secure.php.net/date */ 'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ), /* translators: revision date format, see https://secure.php.net/date */ 'datetime' => __( 'F j, Y g:i a', 'default' ), /* translators: revision date format, see https://secure.php.net/date */ 'datetimeAbbreviated' => __( 'M j, Y g:i a', 'default' ),
#5
@
6 years ago
Hmm. My fault. The text "Revision date format" should be changed into:
"Time format", "Date format", "Date/time format" and "Abbreviated date/time format" respectively.
I was too concentrated on copying the URL correctly from a similar comment in different place that I forgot about the description.
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
6 years ago
#10
@
6 years ago
- Owner set to pento
- Resolution set to fixed
- Status changed from new to closed
In 43831:
Note: See
TracTickets for help on using
tickets.
@tobifjellner, You means needs to remove default text domain?