Replacing woocommerce text domain with understrap

This commit is contained in:
koenemann 2017-04-21 14:33:06 +02:00
parent a16033c3b5
commit 60ed4079fd
6 changed files with 18 additions and 18 deletions

View File

@ -243,7 +243,7 @@ gulp.task('copy-assets', ['clean-source'], function() {
// Run // Run
// gulp dist // gulp dist
// Copies the files to the /dist folder for distributon // Copies the files to the /dist folder for distributon as simple theme
gulp.task('dist', ['clean-dist'], function() { gulp.task('dist', ['clean-dist'], function() {
gulp.src(['**/*','!bower_components','!bower_components/**','!node_modules','!node_modules/**','!src','!src/**','!dist','!dist/**','!dist-product','!dist-product/**','!sass','!sass/**','!readme.txt','!readme.md','!package.json','!gulpfile.js','!CHANGELOG.md','!.travis.yml','!jshintignore', '!codesniffer.ruleset.xml', '*']) gulp.src(['**/*','!bower_components','!bower_components/**','!node_modules','!node_modules/**','!src','!src/**','!dist','!dist/**','!dist-product','!dist-product/**','!sass','!sass/**','!readme.txt','!readme.md','!package.json','!gulpfile.js','!CHANGELOG.md','!.travis.yml','!jshintignore', '!codesniffer.ruleset.xml', '*'])
.pipe(gulp.dest('dist/')) .pipe(gulp.dest('dist/'))
@ -256,9 +256,9 @@ gulp.task('clean-dist', function () {
// Run // Run
// gulp dist-product // gulp dist-product
// Copies the files to the /dist folder for distributon // Copies the files to the /dist-prod folder for distributon as theme with all assets
gulp.task('dist-product', ['clean-dist-product'], function() { gulp.task('dist-product', ['clean-dist-product'], function() {
gulp.src(['**/*','!bower_components','!bower_components/**','!node_modules','!node_modules/**','!src','!src/**','!dist','!dist/**','!dist-product','!dist-product/**', '*']) gulp.src(['**/*','!bower_components','!bower_components/**','!node_modules','!node_modules/**','!dist','!dist/**','!dist-product','!dist-product/**', '*'])
.pipe(gulp.dest('dist-product/')) .pipe(gulp.dest('dist-product/'))
}); });

View File

@ -10,7 +10,7 @@ if ( ! function_exists( 'woocommerce_support' ) ) {
* Declares WooCommerce theme support. * Declares WooCommerce theme support.
*/ */
function woocommerce_support() { function woocommerce_support() {
add_theme_support( 'woocommerce' ); add_theme_support( 'understrap' );
// Add New Woocommerce 3.0.0 Product Gallery support // Add New Woocommerce 3.0.0 Product Gallery support
add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-lightbox' );

View File

@ -32,10 +32,10 @@ do_action( 'woocommerce_before_cart' ); ?>
<tr> <tr>
<th class="product-remove">&nbsp;</th> <th class="product-remove">&nbsp;</th>
<th class="product-thumbnail">&nbsp;</th> <th class="product-thumbnail">&nbsp;</th>
<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th> <th class="product-name"><?php _e( 'Product', 'understrap' ); ?></th>
<th class="product-price"><?php _e( 'Price', 'woocommerce' ); ?></th> <th class="product-price"><?php _e( 'Price', 'understrap' ); ?></th>
<th class="product-quantity"><?php _e( 'Quantity', 'woocommerce' ); ?></th> <th class="product-quantity"><?php _e( 'Quantity', 'understrap' ); ?></th>
<th class="product-subtotal"><?php _e( 'Total', 'woocommerce' ); ?></th> <th class="product-subtotal"><?php _e( 'Total', 'understrap' ); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -56,7 +56,7 @@ do_action( 'woocommerce_before_cart' ); ?>
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>', '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
__( 'Remove this item', 'woocommerce' ), __( 'Remove this item', 'understrap' ),
esc_attr( $product_id ), esc_attr( $product_id ),
esc_attr( $_product->get_sku() ) esc_attr( $_product->get_sku() )
), $cart_item_key ); ), $cart_item_key );

View File

@ -59,7 +59,7 @@ do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
</a> </a>
<?php break; <?php break;
case 'download-remaining' : case 'download-remaining' :
echo is_numeric( $download['downloads_remaining'] ) ? esc_html( $download['downloads_remaining'] ) : __( '&infin;', 'woocommerce' ); echo is_numeric( $download['downloads_remaining'] ) ? esc_html( $download['downloads_remaining'] ) : __( '&infin;', 'understrap' );
break; break;
case 'download-expires' : ?> case 'download-expires' : ?>
<?php if ( ! empty( $download['access_expires'] ) ) : ?> <?php if ( ! empty( $download['access_expires'] ) ) : ?>

View File

@ -25,12 +25,12 @@ $customer_id = get_current_user_id();
if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) { if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) {
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array( $get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing address', 'woocommerce' ), 'billing' => __( 'Billing address', 'understrap' ),
'shipping' => __( 'Shipping address', 'woocommerce' ), 'shipping' => __( 'Shipping address', 'understrap' ),
), $customer_id ); ), $customer_id );
} else { } else {
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array( $get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing address', 'woocommerce' ), 'billing' => __( 'Billing address', 'understrap' ),
), $customer_id ); ), $customer_id );
} }
@ -39,7 +39,7 @@ $col = 1;
?> ?>
<p> <p>
<?php echo apply_filters( 'woocommerce_my_account_my_address_description', __( 'The following addresses will be used on the checkout page by default.', 'woocommerce' ) ); ?> <?php echo apply_filters( 'woocommerce_my_account_my_address_description', __( 'The following addresses will be used on the checkout page by default.', 'understrap' ) ); ?>
</p> </p>
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) echo '<div class="u-columns woocommerce-Addresses col2-set addresses">'; ?> <?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) echo '<div class="u-columns woocommerce-Addresses col2-set addresses">'; ?>
@ -49,7 +49,7 @@ $col = 1;
<div class="u-column woocommerce-Address"> <div class="u-column woocommerce-Address">
<header class="woocommerce-Address-title title"> <header class="woocommerce-Address-title title">
<h3><?php echo $title; ?></h3> <h3><?php echo $title; ?></h3>
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'woocommerce' ); ?></a> <a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'understrap' ); ?></a>
</header> </header>
<address> <address>
<?php <?php
@ -68,7 +68,7 @@ $col = 1;
$formatted_address = WC()->countries->get_formatted_address( $address ); $formatted_address = WC()->countries->get_formatted_address( $address );
if ( ! $formatted_address ) if ( ! $formatted_address )
_e( 'You have not set up this type of address yet.', 'woocommerce' ); _e( 'You have not set up this type of address yet.', 'understrap' );
else else
echo $formatted_address; echo $formatted_address;
?> ?>

View File

@ -107,11 +107,11 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
<?php if ( 1 < $customer_orders->max_num_pages ) : ?> <?php if ( 1 < $customer_orders->max_num_pages ) : ?>
<div class="woocommerce-pagination woocommerce-pagination--without-numbers woocommerce-Pagination"> <div class="woocommerce-pagination woocommerce-pagination--without-numbers woocommerce-Pagination">
<?php if ( 1 !== $current_page ) : ?> <?php if ( 1 !== $current_page ) : ?>
<a class="woocommerce-button woocommerce-button--previous woocommerce-Button woocommerce-Button--previous button" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page - 1 ) ); ?>"><?php _e( 'Previous', 'woocommerce' ); ?></a> <a class="woocommerce-button woocommerce-button--previous woocommerce-Button woocommerce-Button--previous button" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page - 1 ) ); ?>"><?php _e( 'Previous', 'understrap' ); ?></a>
<?php endif; ?> <?php endif; ?>
<?php if ( intval( $customer_orders->max_num_pages ) !== $current_page ) : ?> <?php if ( intval( $customer_orders->max_num_pages ) !== $current_page ) : ?>
<a class="woocommerce-button woocommerce-button--next woocommerce-Button woocommerce-Button--next btn btn-outline-primary" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page + 1 ) ); ?>"><?php _e( 'Next', 'woocommerce' ); ?></a> <a class="woocommerce-button woocommerce-button--next woocommerce-Button woocommerce-Button--next btn btn-outline-primary" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page + 1 ) ); ?>"><?php _e( 'Next', 'understrap' ); ?></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>