🔐Wordpress Software License Management. Supports WooCommerce, and WP eStore.
GNU General Public License v3.0
77
stars
27
forks
source link
Translation issue due to no text domain in wc_licenses_class.php #45
Closed
k-kikuchi-waverworks closed 3 years ago
Thank you for fixing #33. I say big thanks to you.
However, this fix caused an another issue.
You missed adding text domain so that translation is not working.
Example
<?php echo _e('Expiration'); ?>
is should be like<?php echo esc_html__( 'Expiration', 'softwarelicensemanager' ); ?>
Especially, please rewrite following codes to apply translation.
【1】 From
<script> jQuery(document).ready(function() { jQuery('.deactivate_lic_key').click(function(event) { var id = jQuery(this).attr("id"); var lic_type = jQuery(this).attr('lic_type'); var class_name = '.lic-entry-' + id; jQuery(this).text('Removing'); jQuery.get('<?php echo get_bloginfo("url"); ?>' + '/wp-admin/admin-ajax.php?action=del_activation&id=' + id + '&lic_type=' + lic_type, function(data) { if (data == 'success') { jQuery(class_name).remove(); jQuery('.slm_ajax_msg').html('<div class="alert alert-primary" role="alert"> License key was deactivated! </div>'); } else { jQuery('.slm_ajax_msg').html('<div class="alert alert-danger" role="alert"> License key was not deactivated! </div>'); } }); }); }); </script>
to<script> jQuery(document).ready(function() { jQuery('.deactivate_lic_key').click(function(event) { var id = jQuery(this).attr("id"); var lic_type = jQuery(this).attr('lic_type'); var class_name = '.lic-entry-' + id; jQuery(this).text('Removing'); jQuery.get('<?php echo get_bloginfo("url"); ?>' + '/wp-admin/admin-ajax.php?action=del_activation&id=' + id + '&lic_type=' + lic_type, function(data) { if (data == 'success') { jQuery(class_name).remove(); jQuery('.slm_ajax_msg').html('<div class="alert alert-primary" role="alert"><?php echo esc_html__( 'License key was deactivated!', 'softwarelicensemanager' ); ?></div>'); } else { jQuery('.slm_ajax_msg').html('<div class="alert alert-danger" role="alert"> <?php echo esc_html__( 'License key was not deactivated!', 'softwarelicensemanager' ); ?></div>'); } }); }); }); </script>
【2】 From
if (empty($result)) { echo '<div class="woocommerce-Message woocommerce-Message--info woocommerce-info"> <a class="woocommerce-Button button" href="' . get_permalink(wc_get_page_id('shop')) . '"> Browse products </a> No licenses available yet. </div>'; $slm_hide = 'style="display:none"'; }
to `if (empty($result)) { ?>【3】 From `
Would you ming fixing these ?
And also, I found a typography issue.
<?php echo __('Date renewwed', 'softwarelicensemanager'); ?>
is should be like<?php echo __('Date renewed', 'softwarelicensemanager'); ?>
King RegardsKAZUKI