Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Get the 'You need to be logged in to be able to checkout' to be tranlatable.
$commerce_checkout_redirect_message = variable_get('commerce_checkout_redirect_message', t('You need to be logged in to be able to checkout.'));
if (!empty($commerce_checkout_redirect_message)) {
drupal_set_message($commerce_checkout_redirect_message);
}
You will see that
drupal_set_message($commerce_checkout_redirect_message);
will not really translate if the variable_get function get a string from the database.
Comment | File | Size | Author |
---|---|---|---|
#4 | commerce_checkout_redirect_translatable_message-2474463-4.patch | 1.76 KB | rreiss |
You_need_to_be_logged_in_to_be_able_to_checkout_translate.patch | 1.15 KB | wqmeng |
Comments
Comment #1
wqmeng CreditAttribution: wqmeng commentedComment #2
morybel CreditAttribution: morybel commentedThank you so much, this worked for me.
Comment #3
gmrmedia CreditAttribution: gmrmedia commentedWorks good. Thank you for your work ;)
Comment #4
rreiss CreditAttribution: rreiss at Dofinity commentedI used the same fix as on the 1st patch + remove the t function from the default value attribute.
Patch is attached, and should be reviewed and committed to the dev branch.
Thanks :)