Skip to content

Commit

Permalink
translate more text
Browse files Browse the repository at this point in the history
  • Loading branch information
sapayth committed Sep 17, 2024
1 parent ae4ddcc commit b1756c1
Show file tree
Hide file tree
Showing 4 changed files with 1,036 additions and 481 deletions.
9 changes: 6 additions & 3 deletions includes/Free/Free_Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,11 @@ public function pro_settings( $settings_fields ) {
[
'name' => 'tax_help',
'label' => __( 'Need help?', 'wp-user-frontend' ),
'desc' => sprintf( __( 'Visit the <a href="%s" target="_blank">Tax setup documentation</a> for guidance on how to setup tax.', 'wp-user-frontend' ), 'https://wedevs.com/docs/wp-user-frontend-pro/settings/tax/' ),
'desc' => sprintf(
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag
__( 'Visit the %1$sTax setup documentation%2$s for guidance on how to setup tax.', 'wp-user-frontend' ), '<a href="https://wedevs.com/docs/wp-user-frontend-pro/settings/tax/" target="_blank">',
'</a>'
),
'callback' => 'wpuf_descriptive_text',
],
[
Expand Down Expand Up @@ -793,8 +797,7 @@ public function pro_settings( $settings_fields ) {
[
'name' => 'keyword_dictionary',
'label' => __( 'Keyword Dictionary', 'wp-user-frontend' ),
'desc' => __( 'Enter Keywords to Remove. Separate keywords with commas.',
'wp-user-frontend' ),
'desc' => __( 'Enter Keywords to Remove. Separate keywords with commas.', 'wp-user-frontend' ),
'type' => 'textarea',
'is_pro_preview' => true,
],
Expand Down
34 changes: 17 additions & 17 deletions includes/Traits/TaxableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ function wpuf_base_country_state( $args ) {
<table style="width:80%; table-layout:auto;" id="wpuf-base-country-state" class="wp-list-table">
<thead>
<tr>
<th scope="col" class="wpuf_tax_country" style="padding: 10px;"><?php esc_attr_e( 'Country', 'wpuf-pro' ); ?></th>
<th scope="col" class="wpuf_tax_state" style="padding: 10px;"><?php esc_attr_e( 'State / Province', 'wpuf-pro' ); ?></th>
<th scope="col" class="wpuf_tax_country" style="padding: 10px;"><?php esc_html_e( 'Country', 'wp-user-frontend' ); ?></th>
<th scope="col" class="wpuf_tax_state" style="padding: 10px;"><?php esc_html_e( 'State / Province', 'wp-user-frontend' ); ?></th>
</tr>
</thead>
<tr>
Expand All @@ -106,7 +106,7 @@ function wpuf_base_country_state( $args ) {
'id' => 'wpuf-base-country',
'class' => 'wpuf-base-country',
'chosen' => false,
'placeholder' => __( 'Choose a country', 'wpuf-pro' ),
'placeholder' => __( 'Choose a country', 'wp-user-frontend' ),
]
);
?>
Expand All @@ -123,7 +123,7 @@ function wpuf_base_country_state( $args ) {
'show_option_none' => false,
'class' => 'wpuf-base-state',
'chosen' => false,
'placeholder' => __( 'Choose a state', 'wpuf-pro' ),
'placeholder' => __( 'Choose a state', 'wp-user-frontend' ),
]
);
?>
Expand Down Expand Up @@ -158,7 +158,7 @@ function wpuf_ajax_get_base_states() {
'show_option_none' => false,
'class' => 'wpuf-base-state',
'chosen' => false,
'placeholder' => __( 'Choose a state', 'wpuf-pro' ),
'placeholder' => __( 'Choose a state', 'wp-user-frontend' ),
];

$response = wpuf_select( $args );
Expand All @@ -176,7 +176,7 @@ function wpuf_ajax_get_base_states() {
* @param array $args Arguments passed by the setting
* @return void
*/
function wpuf_tax_rates( $args ) {
public function wpuf_tax_rates( $args ) {
$rates = $this->wpuf_get_tax_rates();
$cs = new Country_State();
$states = [];
Expand All @@ -187,10 +187,10 @@ function wpuf_tax_rates( $args ) {
<table style="width:100%; table-layout:auto;" id="wpuf_tax_rates" class="wp-list-table widefat">
<thead>
<tr>
<th scope="col" class="wpuf_tax_country" style="padding: 10px;"><?php esc_attr_e( 'Country', 'wpuf-pro' ); ?></th>
<th scope="col" class="wpuf_tax_state" style="padding: 10px;"><?php esc_attr_e( 'State / Province', 'wpuf-pro' ); ?></th>
<th scope="col" class="wpuf_tax_rate" style="padding: 10px;"><?php esc_attr_e( 'Rate', 'wpuf-pro' ); ?><span alt="f223" class="wpuf-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Regional tax rates: When a customer enters an address on payment page that matches the specified region for this tax rate, the payment tax will adjust automatically. Enter a percentage, such as 5 for 5%.', 'wpuf-pro' ); ?>"></span></th>
<th scope="col" style="padding: 10px;"><?php esc_attr_e( 'Remove', 'wpuf-pro' ); ?></th>
<th scope="col" class="wpuf_tax_country" style="padding: 10px;"><?php esc_html_e( 'Country', 'wp-user-frontend' ); ?></th>
<th scope="col" class="wpuf_tax_state" style="padding: 10px;"><?php esc_html_e( 'State / Province', 'wp-user-frontend' ); ?></th>
<th scope="col" class="wpuf_tax_rate" style="padding: 10px;"><?php esc_html_e( 'Rate', 'wp-user-frontend' ); ?><span alt="f223" class="wpuf-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Regional tax rates: When a customer enters an address on payment page that matches the specified region for this tax rate, the payment tax will adjust automatically. Enter a percentage, such as 5 for 5%.', 'wp-user-frontend' ); ?>"></span></th>
<th scope="col" style="padding: 10px;"><?php esc_attr_e( 'Remove', 'wp-user-frontend' ); ?></th>
</tr>
</thead>
<?php if ( ! empty( $rates ) ) : ?>
Expand All @@ -209,7 +209,7 @@ function wpuf_tax_rates( $args ) {
'show_option_none' => false,
'class' => 'wpuf-tax-country',
'chosen' => false,
'placeholder' => __( 'Choose a country', 'wpuf-pro' ),
'placeholder' => __( 'Choose a country', 'wp-user-frontend' ),
]
);
?>
Expand All @@ -231,7 +231,7 @@ function wpuf_tax_rates( $args ) {
'show_option_none' => false,
'class' => 'wpuf-tax-state',
'chosen' => false,
'placeholder' => __( 'Choose a state', 'wpuf-pro' ),
'placeholder' => __( 'Choose a state', 'wp-user-frontend' ),
]
);
} else {
Expand All @@ -246,7 +246,7 @@ function wpuf_tax_rates( $args ) {
?>
</td>
<td style="width:20%" class="wpuf_tax_rate"><input type="number" class="small-text" step="0.0001" min="0.0" max="99" name="wpuf_tax_rates[<?php echo $key; ?>][rate]" value="<?php echo esc_html( ! empty( $rate['rate'] ) ? $rate['rate'] : 0 ); ?>"/></td>
<td style="width:10%"><span class="wpuf_remove_tax_rate button-secondary"><?php esc_attr_e( 'Remove Rate', 'wpuf-pro' ); ?></span></td>
<td style="width:10%"><span class="wpuf_remove_tax_rate button-secondary"><?php esc_html_e( 'Remove Rate', 'wp-user-frontend' ); ?></span></td>
</tr>
<?php endforeach; ?>
<?php else : ?>
Expand All @@ -263,7 +263,7 @@ function wpuf_tax_rates( $args ) {
'show_option_none' => false,
'class' => 'wpuf-tax-country',
'chosen' => false,
'placeholder' => __( 'Choose a country', 'wpuf-pro' ),
'placeholder' => __( 'Choose a country', 'wp-user-frontend' ),
]
);
?>
Expand All @@ -278,12 +278,12 @@ function wpuf_tax_rates( $args ) {
?>
</td>
<td class="wpuf_tax_rate"><input type="number" class="small-text" step="0.0001" min="0.0" name="wpuf_tax_rates[0][rate]" value=""/></td>
<td><span class="wpuf_remove_tax_rate button-secondary"><?php esc_attr_e( 'Remove Rate', 'wpuf-pro' ); ?></span></td>
<td><span class="wpuf_remove_tax_rate button-secondary"><?php esc_html_e( 'Remove Rate', 'wp-user-frontend' ); ?></span></td>
</tr>
<?php endif; ?>
</table>
<p>
<span class="button-secondary" id="wpuf_add_tax_rate"><?php esc_attr_e( 'Add Tax Rate', 'wpuf-pro' ); ?></span>
<span class="button-secondary" id="wpuf_add_tax_rate"><?php esc_attr_e( 'Add Tax Rate', 'wp-user-frontend' ); ?></span>
</p>
<?php
echo ob_get_clean();
Expand Down Expand Up @@ -501,7 +501,7 @@ function wpuf_render_tax_field() {
$tax_rate = $this->wpuf_current_tax_rate() . '%';
if ( $this->wpuf_tax_enabled() ) {
?>
<div><?php esc_attr_e( 'Tax', 'wpuf-pro' ); ?>: <strong><span id="wpuf_pay_page_tax"><?php echo $tax_rate; ?></strong></span></div>
<div><?php esc_attr_e( 'Tax', 'wp-user-frontend' ); ?>: <strong><span id="wpuf_pay_page_tax"><?php echo $tax_rate; ?></strong></span></div>
<?php
}
}
Expand Down
Loading

0 comments on commit b1756c1

Please sign in to comment.