Skip to content

Commit

Permalink
localization changes for 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Cameron committed Oct 9, 2015
1 parent 805abb9 commit 4719bea
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 140 deletions.
2 changes: 1 addition & 1 deletion sa_templates/checkout/checks/form.php
Expand Up @@ -6,6 +6,6 @@
<?php do_action( 'si_checks_form_controls', $checkout ) ?>
<?php do_action( 'si_checks_payment_controls', $checkout ) ?>
<input type="hidden" name="<?php echo SI_Checkouts::CHECKOUT_ACTION ?>" value="<?php echo SI_Checkouts::PAYMENT_PAGE ?>" />
<button type="submit" class="button button-primary"><?php si_e('Submit') ?></button>
<button type="submit" class="button button-primary"><?php _e( 'Submit', 'sprout-invoices' ) ?></button>
</form>
</div><!-- #credit_card_checkout_wrap -->
78 changes: 39 additions & 39 deletions sa_templates/checkout/confirmation.php
Expand Up @@ -24,22 +24,22 @@
<meta name="robots" content="noindex" />
</head>

<body id="invoice" <?php body_class('paid'); ?>>
<body id="invoice" <?php body_class( 'paid' ); ?>>

<div id="outer_doc_wrap">

<?php si_display_messages(); ?>
<?php do_action( 'si_invoice_outer_doc_wrap' ) ?>

<?php do_action('si_payments_pane'); ?>
<?php do_action( 'si_payments_pane' ); ?>

<div id="doc_header_wrap" class="sticky_header">
<header id="header_title">
<span class="header_id"><?php printf( si__('Invoice %s'), si_get_invoice_id() ) ?></span>
<span class="header_id"><?php printf( __( 'Invoice %s', 'sprout-invoices' ), si_get_invoice_id() ) ?></span>
<div id="doc_actions">
<?php do_action( 'si_doc_actions_pre' ) ?>
<?php
$button_status = ( si_get_invoice_balance() ) ? si__('Deposit Made') : si__('Paid in Full') ; ?>
<?php
$button_status = ( si_get_invoice_balance() ) ? __( 'Deposit Made', 'sprout-invoices' ) : __( 'Paid in Full', 'sprout-invoices' ); ?>
<span class="button primary_button deposit_paid"><?php echo esc_html( $button_status ); ?></span>
<?php do_action( 'si_doc_actions' ) ?>
</div><!-- #doc_actions -->
Expand All @@ -56,24 +56,24 @@

<header role="banner">
<div class="header_info">
<h2 class="doc_type"><?php si_e('Invoice') ?></h2>
<h2 class="doc_type"><?php _e( 'Invoice' , 'sprout-invoices' ) ?></h2>
<p class="title"><?php the_title() ?></p>
</div>

<h1 id="logo">
<?php if ( get_theme_mod( 'si_logo' ) ) : ?>
<img src="<?php echo esc_url( get_theme_mod( 'si_logo', si_doc_header_logo_url() ) ); ?>" alt="document logo" >
<?php else: ?>
<?php else : ?>
<img src="<?php echo si_doc_header_logo_url() ?>" alt="document logo" >
<?php endif; ?>
</h1>
</header><!-- /header -->
<?php if ( ! si_get_invoice_balance() ): ?>
<span id="status" class="paid"><span class="inner_status"><?php si_e( 'Paid' ) ?></span></span>
<?php elseif ( si_get_invoice_balance() <= si_get_invoice_payments_total() ): ?>
<span id="status" class="void"><span class="inner_status"><?php si_e( 'Payment Pending' ) ?></span></span>
<?php if ( ! si_get_invoice_balance() ) : ?>
<span id="status" class="paid"><span class="inner_status"><?php _e( 'Paid' , 'sprout-invoices' ) ?></span></span>
<?php elseif ( si_get_invoice_balance() <= si_get_invoice_payments_total() ) : ?>
<span id="status" class="void"><span class="inner_status"><?php _e( 'Payment Pending' , 'sprout-invoices' ) ?></span></span>
<?php else : ?>
<?php $status = ( si_get_invoice_balance() ) ? si__( 'Deposit Made' ) : si__( 'Pending' ) ; ?>
<?php $status = ( si_get_invoice_balance() ) ? __( 'Deposit Made' , 'sprout-invoices' ) : __( 'Pending' , 'sprout-invoices' ); ?>
<span id="status" class="void"><span class="inner_status"><?php echo esc_html( $status ); ?></span></span>
<?php endif ?>
</div><!-- #header_logo -->
Expand All @@ -83,17 +83,17 @@
<dl id="doc_address_info">
<dl class="from_addy">
<dt>
<span class="dt_heading"><?php si_e('From') ?></span>
<span class="dt_heading"><?php _e( 'From' , 'sprout-invoices' ) ?></span>
</dt>
<dd>
<b><?php si_company_name() ?></b>
<?php si_doc_address() ?>
</dd>
</dl>
<?php if ( si_get_invoice_client_id() ): ?>
<?php if ( si_get_invoice_client_id() ) : ?>
<dl class="client_addy">
<dt>
<span class="dt_heading"><?php si_e('To') ?></span>
<span class="dt_heading"><?php _e( 'To' , 'sprout-invoices' ) ?></span>
</dt>
<dd>
<b><?php echo get_the_title( si_get_invoice_client_id() ) ?></b>
Expand All @@ -112,52 +112,52 @@
<?php do_action( 'si_document_details_pre' ) ?>

<dl class="date">
<dt><span class="dt_heading"><?php si_e('Date') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'Date' , 'sprout-invoices' ) ?></span></dt>
<dd><?php si_invoice_issue_date() ?></dd>
</dl>

<?php if ( si_get_invoice_id() ): ?>
<?php if ( si_get_invoice_id() ) : ?>
<dl class="invoice_number">
<dt><span class="dt_heading"><?php si_e('Invoice Number') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'Invoice Number' , 'sprout-invoices' ) ?></span></dt>
<dd><?php si_invoice_id() ?></dd>
</dl>
<?php endif ?>

<?php if ( si_get_invoice_po_number() ): ?>
<?php if ( si_get_invoice_po_number() ) : ?>
<dl class="invoice_po_number">
<dt><span class="dt_heading"><?php si_e('PO Number') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'PO Number' , 'sprout-invoices' ) ?></span></dt>
<dd><?php si_invoice_po_number() ?></dd>
</dl>
<?php endif ?>

<?php if ( si_get_invoice_due_date() ): ?>
<?php if ( si_get_invoice_due_date() ) : ?>
<dl class="date">
<dt><span class="dt_heading"><?php si_e('Invoice Due') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'Invoice Due' , 'sprout-invoices' ) ?></span></dt>
<dd><?php si_invoice_due_date() ?></dd>
</dl>
<?php endif ?>

<?php do_action( 'si_document_details_totals' ) ?>

<?php if ( si_has_invoice_deposit() ): ?>
<?php if ( si_has_invoice_deposit() ) : ?>
<dl class="doc_total_with_deposit">
<dt><span class="dt_heading"><?php si_e('Invoice Total') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'Invoice Total' , 'sprout-invoices' ) ?></span></dt>
<dd><?php sa_formatted_money( si_get_invoice_total() ) ?></dd>
</dl>

<dl class="doc_total">
<dt><span class="dt_heading"><?php si_e('Deposit Total') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'Deposit Total' , 'sprout-invoices' ) ?></span></dt>
<dd><?php sa_formatted_money( si_get_invoice_deposit() ) ?></dd>
</dl>
<?php else: ?>
<?php else : ?>
<dl class="doc_total">
<dt><span class="dt_heading"><?php si_e('Invoice Total') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'Invoice Total' , 'sprout-invoices' ) ?></span></dt>
<dd><?php sa_formatted_money( si_get_invoice_total() ) ?></dd>
</dl>
<?php endif ?>

<dl class="doc_total doc_balance">
<dt><span class="dt_heading"><?php si_e('Balance') ?></span></dt>
<dt><span class="dt_heading"><?php _e( 'Balance' , 'sprout-invoices' ) ?></span></dt>
<dd><?php sa_formatted_money( si_get_invoice_balance() ) ?></dd>
</dl>

Expand All @@ -169,11 +169,11 @@
<?php
$line_items = si_get_invoice_line_items();
$has_percentage_adj = false;
foreach ( $line_items as $position => $data ) {
if ( isset( $data['tax'] ) && $data['tax'] ) {
$has_percentage_adj = true;
}
} ?>
foreach ( $line_items as $position => $data ) {
if ( isset( $data['tax'] ) && $data['tax'] ) {
$has_percentage_adj = true;
}
} ?>

<section id="doc_line_items_wrap" class="clearfix">

Expand All @@ -186,21 +186,21 @@
</section>

<section id="doc_notes">
<?php if ( strlen( si_get_invoice_terms() ) > 1 ): ?>
<?php if ( strlen( si_get_invoice_terms() ) > 1 ) : ?>

<?php do_action( 'si_document_notes' ) ?>
<div id="doc_notes">
<h2><?php si_e('Notes') ?></h2>
<h2><?php _e( 'Notes' , 'sprout-invoices' ) ?></h2>
<?php si_invoice_notes() ?>
</div><!-- #doc_notes -->

<?php endif ?>

<?php if ( strlen( si_get_invoice_terms() ) > 1 ): ?>
<?php if ( strlen( si_get_invoice_terms() ) > 1 ) : ?>

<?php do_action( 'si_document_terms' ) ?>
<div id="doc_terms">
<h2><?php si_e('Terms') ?></h2>
<h2><?php _e( 'Terms' , 'sprout-invoices' ) ?></h2>
<?php si_invoice_terms() ?>
</div><!-- #doc_terms -->

Expand All @@ -217,7 +217,7 @@
<li class="doc_footer_item">
<?php printf( '<strong>%s</strong> %s', '<div class="dashicons dashicons-admin-site"></div>', make_clickable( home_url() ) ) ?>
</li>
<?php if ( si_get_company_email() ): ?>
<?php if ( si_get_company_email() ) : ?>
<li class="doc_footer_item">
<?php printf( '<strong>%s</strong> %s', '<div class="dashicons dashicons-email-alt"></div>', make_clickable( si_get_company_email() ) ) ?>
</li>
Expand All @@ -230,7 +230,7 @@

<div id="footer_credit">
<?php do_action( 'si_document_footer_credit' ) ?>
<!--<p><?php si_e('Powered by Sprout Invoices') ?></p>-->
<!--<p><?php _e( 'Powered by Sprout Invoices' , 'sprout-invoices' ) ?></p>-->
</div><!-- #footer_messaging -->

</body>
Expand Down
6 changes: 3 additions & 3 deletions sa_templates/checkout/credit-card/form.php
Expand Up @@ -4,19 +4,19 @@
<?php do_action( 'si_billing_credit_card_form', $checkout ) ?>
<div id="billing_cc_fields" class="clearfix">
<fieldset id="billing_fields" class="sa-fieldset">
<legend><?php si_e( 'Billing' ) ?></legend>
<legend><?php _e( 'Billing' , 'sprout-invoices' ) ?></legend>
<?php sa_form_fields( $billing_fields, 'billing' ); ?>
<?php do_action( 'si_billing_payment_fields', $checkout ) ?>
</fieldset>
<fieldset id="credit_card_fields" class="sa-fieldset">
<legend><?php si_e( 'Credit Card' ) ?></legend>
<legend><?php _e( 'Credit Card' , 'sprout-invoices' ) ?></legend>
<?php sa_form_fields( $cc_fields, 'credit' ); ?>
<?php do_action( 'si_credit_card_payment_fields', $checkout ) ?>
</fieldset>
<?php do_action( 'si_credit_card_form_controls', $checkout ) ?>
<?php do_action( 'si_credit_card_payment_controls', $checkout ) ?>
<input type="hidden" name="<?php echo SI_Checkouts::CHECKOUT_ACTION ?>" value="<?php echo SI_Checkouts::PAYMENT_PAGE ?>" />
<button type="submit" class="button button-primary" id="credit_card_submit"><?php si_e( 'Submit' ) ?></button>
<button type="submit" class="button button-primary" id="credit_card_submit"><?php _e( 'Submit' , 'sprout-invoices' ) ?></button>
</div><!-- #billing_cc_fields -->
<?php do_action( 'si_billing_credit_card_form_bottom', $checkout ) ?>
</form>
Expand Down
8 changes: 4 additions & 4 deletions sa_templates/checkout/credit-card/review.php
Expand Up @@ -2,18 +2,18 @@
<div class="checkout_block right_form clearfix">

<div class="paymentform-info">
<h2 class="section_heading"><?php si_e( 'Your Payment Information' ); ?></h2>
<h2 class="section_heading"><?php _e( 'Your Payment Information' , 'sprout-invoices' ); ?></h2>
</div>
<fieldset id="si-billing">
<table>
<tbody>
<?php foreach ( $billing_fields as $key => $data ): ?>
<?php foreach ( $billing_fields as $key => $data ) : ?>
<tr>
<th scope="row"><?php echo esc_html( $data['label'] ); ?></th>
<td><?php echo esc_html( $data['value'] ); ?></td>
</tr>
<?php endforeach; ?>
<?php foreach ( $cc_fields as $key => $data ): ?>
<?php foreach ( $cc_fields as $key => $data ) : ?>
<tr>
<th scope="row"><?php echo esc_html( $data['label'] ); ?></th>
<td><?php echo esc_html( $data['value'] ); ?></td>
Expand All @@ -28,6 +28,6 @@
<?php do_action( 'si_credit_card_form_controls', $checkout ) ?>
<?php do_action( 'si_credit_card_review_controls', $checkout ) ?>
<input type="hidden" name="<?php echo SI_Checkouts::CHECKOUT_ACTION ?>" value="<?php echo SI_Checkouts::REVIEW_PAGE ?>" />
<input class="form-submit submit checkout_next_step" type="submit" value="<?php si_e( 'Submit Order' ); ?>" name="si_checkout_button" />
<input class="form-submit submit checkout_next_step" type="submit" value="<?php _e( 'Submit Order' , 'sprout-invoices' ); ?>" name="si_checkout_button" />
</div>
</form>

0 comments on commit 4719bea

Please sign in to comment.