Skip to content

Commit

Permalink
Add link to date format to avoid confusion
Browse files Browse the repository at this point in the history
Fixes #697
The Italian and French translations are incorrect as the translators changed the date form from "yyyy" and "dd" to the first letter of the words in those languages. I'm adding a link to the official documentation for the date format in PHP and Javascript respectively for each of these to help translation.
  • Loading branch information
donnchawp committed Oct 17, 2016
1 parent 1849f2a commit 5e996e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/admin/class-wp-job-manager-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function admin_enqueue_scripts() {
wp_enqueue_script( 'job_manager_admin_js', JOB_MANAGER_PLUGIN_URL. '/assets/js/admin.min.js', array( 'jquery', 'jquery-tiptip', 'jquery-ui-datepicker' ), JOB_MANAGER_VERSION, true );

wp_localize_script( 'job_manager_admin_js', 'job_manager_admin', array(
'date_format' => _x( 'yy-mm-dd', 'Date format for jQuery datepicker', 'wp-job-manager' )
'date_format' => _x( 'yy-mm-dd', 'Date format for jQuery datepicker. See http://api.jqueryui.com/datepicker/#utility-formatDate', 'wp-job-manager' )
) );
}

Expand Down
2 changes: 1 addition & 1 deletion includes/admin/class-wp-job-manager-writepanels.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function job_listing_fields() {
'label' => __( 'Listing Expiry Date', 'wp-job-manager' ),
'priority' => 11,
'classes' => array( 'job-manager-datepicker' ),
'placeholder' => _x( 'yyyy-mm-dd', 'Date format placeholder', 'wp-job-manager' ),
'placeholder' => _x( 'yyyy-mm-dd', 'Date format placeholder. http://php.net/manual/en/function.date.php', 'wp-job-manager' ),
'value' => metadata_exists( 'post', $post->ID, '_job_expires' ) ? get_post_meta( $post->ID, '_job_expires', true ) : calculate_job_expiry( $post->ID ),
);
}
Expand Down

0 comments on commit 5e996e7

Please sign in to comment.