Skip to content

Commit

Permalink
Missing localisation's. Closes woocommerce#335.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Dec 6, 2011
1 parent 2979740 commit 10d2431
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 42 deletions.
4 changes: 2 additions & 2 deletions admin/admin-settings-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ function woocommerce_admin_fields($options) {
<th scope="row" class="titledesc"><?php echo $value['name'] ?></th>
<td class="forminp">

<?php _e('Width'); ?> <input name="<?php echo esc_attr( $value['id'] ); ?>_width" id="<?php echo esc_attr( $value['id'] ); ?>_width" type="text" size="3" value="<?php if ( $size = get_option( $value['id'].'_width') ) echo stripslashes($size); else echo $value['std']; ?>" />
<?php _e('Width', 'woothemes'); ?> <input name="<?php echo esc_attr( $value['id'] ); ?>_width" id="<?php echo esc_attr( $value['id'] ); ?>_width" type="text" size="3" value="<?php if ( $size = get_option( $value['id'].'_width') ) echo stripslashes($size); else echo $value['std']; ?>" />

<?php _e('Height'); ?> <input name="<?php echo esc_attr( $value['id'] ); ?>_height" id="<?php echo esc_attr( $value['id'] ); ?>_height" type="text" size="3" value="<?php if ( $size = get_option( $value['id'].'_height') ) echo stripslashes($size); else echo $value['std']; ?>" />
<?php _e('Height', 'woothemes'); ?> <input name="<?php echo esc_attr( $value['id'] ); ?>_height" id="<?php echo esc_attr( $value['id'] ); ?>_height" type="text" size="3" value="<?php if ( $size = get_option( $value['id'].'_height') ) echo stripslashes($size); else echo $value['std']; ?>" />

<label><?php _e('Hard Crop', 'woothemes'); ?> <input name="<?php echo esc_attr( $value['id'] ); ?>_crop" id="<?php echo esc_attr( $value['id'] ); ?>_crop" type="checkbox" <?php if (get_option( $value['id'].'_crop')!='') checked(get_option( $value['id'].'_crop'), 1); else checked(1); ?> /></label>

Expand Down
12 changes: 6 additions & 6 deletions admin/post-types/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,19 @@ function woocommerce_custom_product_columns($column) {
break;
case "product_date" :
if ( '0000-00-00 00:00:00' == $post->post_date ) :
$t_time = $h_time = __( 'Unpublished' );
$t_time = $h_time = __( 'Unpublished', 'woothemes' );
$time_diff = 0;
else :
$t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
$t_time = get_the_time( __( 'Y/m/d g:i:s A', 'woothemes' ) );
$m_time = $post->post_date;
$time = get_post_time( 'G', true, $post );

$time_diff = time() - $time;

if ( $time_diff > 0 && $time_diff < 24*60*60 )
$h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
$h_time = sprintf( __( '%s ago', 'woothemes' ), human_time_diff( $time ) );
else
$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
$h_time = mysql2date( __( 'Y/m/d', 'woothemes' ), $m_time );
endif;

echo '<abbr title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post ) . '</abbr><br />';
Expand All @@ -112,7 +112,7 @@ function woocommerce_custom_product_columns($column) {
_e( 'Published' );
elseif ( 'future' == $post->post_status ) :
if ( $time_diff > 0 ) :
echo '<strong class="attention">' . __( 'Missed schedule' ) . '</strong>';
echo '<strong class="attention">' . __( 'Missed schedule', 'woothemes' ) . '</strong>';
else :
_e( 'Scheduled' );
endif;
Expand Down Expand Up @@ -303,7 +303,7 @@ function woocommerce_feature_product() {

if( !is_admin() ) die;

if( !current_user_can('edit_posts') ) wp_die( __('You do not have sufficient permissions to access this page.') );
if( !current_user_can('edit_posts') ) wp_die( __('You do not have sufficient permissions to access this page.', 'woothemes') );

if( !check_admin_referer()) wp_die( __('You have taken too long. Please go back and retry.', 'woothemes') );

Expand Down
12 changes: 6 additions & 6 deletions admin/post-types/shop_order.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ function woocommerce_custom_order_columns($column) {
break;
case "order_date" :
if ( '0000-00-00 00:00:00' == $post->post_date ) :
$t_time = $h_time = __( 'Unpublished' );
$t_time = $h_time = __( 'Unpublished', 'woothemes' );
$time_diff = 0;
else :
$t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
$t_time = get_the_time( __( 'Y/m/d g:i:s A', 'woothemes' ) );
$m_time = $post->post_date;
$time = get_post_time( 'G', true, $post );

$time_diff = time() - $time;

if ( $time_diff > 0 && $time_diff < 24*60*60 )
$h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
$h_time = sprintf( __( '%s ago', 'woothemes' ), human_time_diff( $time ) );
else
$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
$h_time = mysql2date( __( 'Y/m/d', 'woothemes' ), $m_time );
endif;

echo '<abbr title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post ) . '</abbr>';
Expand Down Expand Up @@ -294,7 +294,7 @@ function woocommerce_custom_shop_order_orderby( $vars ) {
function woocommerce_mark_order_complete() {

if( !is_admin() ) die;
if( !current_user_can('edit_posts') ) wp_die( __('You do not have sufficient permissions to access this page.') );
if( !current_user_can('edit_posts') ) wp_die( __('You do not have sufficient permissions to access this page.', 'woothemes') );
if( !check_admin_referer()) wp_die( __('You have taken too long. Please go back and retry.', 'woothemes') );
$order_id = isset($_GET['order_id']) && (int) $_GET['order_id'] ? (int) $_GET['order_id'] : '';
if(!$order_id) die;
Expand All @@ -313,7 +313,7 @@ function woocommerce_mark_order_complete() {
function woocommerce_mark_order_processing() {

if( !is_admin() ) die;
if( !current_user_can('edit_posts') ) wp_die( __('You do not have sufficient permissions to access this page.') );
if( !current_user_can('edit_posts') ) wp_die( __('You do not have sufficient permissions to access this page.', 'woothemes') );
if( !check_admin_referer()) wp_die( __('You have taken too long. Please go back and retry.', 'woothemes') );
$order_id = isset($_GET['order_id']) && (int) $_GET['order_id'] ? (int) $_GET['order_id'] : '';
if(!$order_id) die;
Expand Down
4 changes: 2 additions & 2 deletions admin/writepanels/writepanel-order_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ function woocommerce_order_actions_meta_box($post) {
<?php
if ( current_user_can( "delete_post", $post->ID ) ) {
if ( !EMPTY_TRASH_DAYS )
$delete_text = __('Delete Permanently');
$delete_text = __('Delete Permanently', 'woothemes');
else
$delete_text = __('Move to Trash');
$delete_text = __('Move to Trash', 'woothemes');
?>
<a class="submitdelete deletion" href="<?php echo esc_url( get_delete_post_link($post->ID) ); ?>"><?php echo $delete_text; ?></a><?php
} ?>
Expand Down
13 changes: 0 additions & 13 deletions admin/writepanels/writepanels-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,6 @@ function woocommerce_enter_title_here( $text, $post ) {
return $text;
}

/**
* Let variations have a product as the parent
function variations_product_meta_box($post) {
$post_type_object = get_post_type_object($post->post_type);
if ( $post_type_object->hierarchical ) {
$pages = wp_dropdown_pages(array('post_type' => 'product', 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column'=> 'menu_order, post_title', 'echo' => 0));
if ( ! empty($pages) ) {
echo $pages;
} // end empty pages check
} // end hierarchical check.
}*/

/**
* Save meta boxes
*
Expand Down
2 changes: 1 addition & 1 deletion classes/gateways/gateway-paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function successful_request( $posted ) {
);

// Send the mail
woocommerce_mail( get_option('woocommerce_new_order_email_recipient'), sprintf(__('Payment for order #%s refunded/reversed'), $order->id), $message );
woocommerce_mail( get_option('woocommerce_new_order_email_recipient'), sprintf(__('Payment for order #%s refunded/reversed', 'woothemes'), $order->id), $message );

break;
default:
Expand Down
4 changes: 2 additions & 2 deletions templates/emails/customer_new_account.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<p><?php echo sprintf(__("Thanks for registering on %s. Your login details are below:", 'woothemes'), $blogname); ?></p>

<ul>
<li><?php echo sprintf(__('Username: %s'), $user_login); ?></li>
<li><?php echo sprintf(__('Password: %s'), $user_pass); ?></li>
<li><?php echo sprintf(__('Username: %s', 'woothemes'), $user_login); ?></li>
<li><?php echo sprintf(__('Password: %s', 'woothemes'), $user_pass); ?></li>
</ul>

<p><?php echo sprintf(__("You can login to your account area here: %s.", 'woothemes'), get_permalink(get_option('woocommerce_myaccount_page_id'))); ?></p>
Expand Down
4 changes: 2 additions & 2 deletions templates/single-product-reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
'comment_notes_before' => '',
'comment_notes_after' => '',
'fields' => array(
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . '<span class="required">*</span>' .
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'woothemes' ) . '</label> ' . '<span class="required">*</span>' .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" aria-required="true" /></p>',
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . '<span class="required">*</span>' .
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email', 'woothemes' ) . '</label> ' . '<span class="required">*</span>' .
'<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" aria-required="true" /></p>',
),
'label_submit' => __('Submit Review', 'woothemes'),
Expand Down
12 changes: 6 additions & 6 deletions woocommerce_actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,22 +728,22 @@ function woocommerce_process_registration() {

// Check the username
if ( $sanitized_user_login == '' ) {
$woocommerce->add_error( __( '<strong>ERROR</strong>: Please enter a username.' ) );
$woocommerce->add_error( __( '<strong>ERROR</strong>: Please enter a username.', 'woothemes' ) );
} elseif ( ! validate_username( $_POST['username'] ) ) {
$woocommerce->add_error( __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
$woocommerce->add_error( __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.', 'woothemes' ) );
$sanitized_user_login = '';
} elseif ( username_exists( $sanitized_user_login ) ) {
$woocommerce->add_error( __( '<strong>ERROR</strong>: This username is already registered, please choose another one.' ) );
$woocommerce->add_error( __( '<strong>ERROR</strong>: This username is already registered, please choose another one.', 'woothemes' ) );
}

// Check the e-mail address
if ( $user_email == '' ) {
$woocommerce->add_error( __( '<strong>ERROR</strong>: Please type your e-mail address.' ) );
$woocommerce->add_error( __( '<strong>ERROR</strong>: Please type your e-mail address.', 'woothemes' ) );
} elseif ( ! is_email( $user_email ) ) {
$woocommerce->add_error( __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ) );
$woocommerce->add_error( __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.', 'woothemes' ) );
$user_email = '';
} elseif ( email_exists( $user_email ) ) {
$woocommerce->add_error( __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) );
$woocommerce->add_error( __( '<strong>ERROR</strong>: This email is already registered, please choose another one.', 'woothemes' ) );
}

// Password
Expand Down
4 changes: 2 additions & 2 deletions woocommerce_taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ function woocommerce_custom_update_messages( $messages ) {
3 => __( 'Custom field deleted.', 'woothemes' ),
4 => sprintf( __( '%s updated.', 'woothemes' ), $post_object->labels->singular_name ),
5 => isset( $_GET['revision'] ) ? sprintf( __( '%s restored to revision from %s', 'woothemes' ), $post_object->labels->singular_name, wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
6 => sprintf( __( '%s published. <a href="%s">View %s</a>' ), $post_object->labels->singular_name, esc_url( get_permalink( $post_ID ) ), $post_object->labels->singular_name ),
6 => sprintf( __( '%s published. <a href="%s">View %s</a>', 'woothemes' ), $post_object->labels->singular_name, esc_url( get_permalink( $post_ID ) ), $post_object->labels->singular_name ),
7 => sprintf( __( '%s saved.', 'woothemes' ), $post_object->labels->singular_name ),
8 => sprintf( __( '%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'woothemes' ), $post_object->labels->singular_name, esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), $post_object->labels->singular_name ),
9 => sprintf( __( '%s scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview %s</a>', 'woothemes' ), $post_object->labels->singular_name, date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post_ID ) ), $post_object->labels->singular_name ),
9 => sprintf( __( '%s scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview %s</a>', 'woothemes' ), $post_object->labels->singular_name, date_i18n( __( 'M j, Y @ G:i', 'woothemes' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post_ID ) ), $post_object->labels->singular_name ),
10 => sprintf( __( '%s draft updated. <a target="_blank" href="%s">Preview %s</a>', 'woothemes' ), $post_object->labels->singular_name, esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), $post_object->labels->singular_name ),
);
}
Expand Down

0 comments on commit 10d2431

Please sign in to comment.