Skip to content

Commit

Permalink
[subscription-cancellation] [button-text] [l10n] Use proper localizat…
Browse files Browse the repository at this point in the history
…ion function to populate the "Cancel" button of the subscription cancellation modal.
  • Loading branch information
swashata committed Apr 21, 2024
1 parent 5a1aa07 commit f32be34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions languages/freemius.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: Freemius Team <admin@freemius.com>\n"
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
"POT-Creation-Date: 2024-04-21 11:18+0000\n"
"POT-Creation-Date: 2024-04-21 11:55+0000\n"
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: get_text_inline;get_text_x_inline:1,2c;$this->get_text_inline;$this->get_text_x_inline:1,2c;$this->_fs->get_text_inline;$this->_fs->get_text_x_inline:1,2c;$this->fs->get_text_inline;$this->fs->get_text_x_inline:1,2c;$fs->get_text_inline;$fs->get_text_x_inline:1,2c;$this->_parent->get_text_inline;$this->_parent->get_text_x_inline:1,2c;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
Expand Down Expand Up @@ -2466,7 +2466,7 @@ msgstr ""
msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
msgstr ""

#: templates/forms/affiliation.php:238, templates/forms/resend-key.php:22, templates/account/partials/disconnect-button.php:92
#: templates/forms/affiliation.php:238, templates/forms/resend-key.php:22, templates/forms/subscription-cancellation.php:142, templates/account/partials/disconnect-button.php:92
msgid "Cancel"
msgstr ""

Expand Down
6 changes: 3 additions & 3 deletions templates/forms/subscription-cancellation.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
+ ' <div class="fs-modal-panel active">' + <?php echo json_encode( $subscription_cancellation_html ) ?> + '<p class="fs-price-increase-warning" style="display: none;">' + <?php echo json_encode( $prices_increase_text ) ?> + '</p></div>'
+ ' </div>'
+ ' <div class="fs-modal-footer">'
+ ' <a href="#" class="button button-secondary button-close"><?php fs_esc_attr_echo( 'Cancel', $slug ) ?></a>'
+ ' <a href="#" class="button button-secondary button-close"><?php fs_esc_attr_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
+ ' <a href="#" class="button button-primary button-deactivate disabled"><?php fs_esc_attr_echo_inline( 'Proceed', 'proceed', $slug ) ?></a>'
+ ' </div>'
+ ' </div>'
Expand Down Expand Up @@ -194,7 +194,7 @@ function registerEventHandlers() {

$modal.find('.fs-price-increase-warning').show();
} else {
$primaryButton.html( <?php echo fs_json_encode_echo_inline( 'Proceed', 'proceed', $slug ) ?> );
$primaryButton.html( <?php fs_json_encode_echo_inline( 'Proceed', 'proceed', $slug ) ?> );
$modal.find('.fs-price-increase-warning').hide();
}

Expand Down Expand Up @@ -271,7 +271,7 @@ function showMessage(message) {
function updateButtonLabels() {
$modal.find('.button-primary').text( <?php fs_json_encode_echo_inline( 'Proceed', 'proceed', $slug ) ?> );

$modal.find('.button-secondary').text( <?php fs_json_encode_echo( 'Cancel', $slug ) ?> );
$modal.find('.button-secondary').text( <?php fs_json_encode_echo_inline( 'Cancel', 'cancel', $slug ) ?> );
}
})( jQuery );
</script>

0 comments on commit f32be34

Please sign in to comment.