Opened 8 years ago
Closed 8 years ago
#45162 closed defect (bug) (fixed)
Comments for translators must be added in script-loader.php
| Reported by: | tobifjellner | Owned by: | pento |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.0 |
| Component: | Script Loader | Version: | 5.0 |
| Severity: | normal | Keywords: | has-patch, fixed-5.0 |
| Cc: | Focuses: |
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
@
8 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
@
8 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@tobifjellner, You means needs to remove default text domain?