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.
If anonymous checkout is enabled, the descriptive text
<b>Optional.</b> New customers may supply custom account details.<br />We will create these for you if no values are entered.
cannot be translated since the text is retrieved from the variables table.
The attached patch corrects this.
Comment | File | Size | Author |
---|---|---|---|
ubercart_checkout.patch | 1016 bytes | reglogge | |
Comments
Comment #1
TR CreditAttribution: TR commentedi18n already has a mechanism for translating variable table variables - that's what you should use. That's why this line appears in uc_cart.module:
Besides, your patch is just wrong - you're throwing away the variable but leaving the admin menu that allows you to configure that variable?
Comment #2
laghalt CreditAttribution: laghalt commentedBesides that reglogge´s patch works.
Yes - there is a i18 variable that dosent work. The original bugg might be that that variable is flushed somewhere in the code or somthing like that.
If you cant find that error since you dont have dev-documentation - this is a correkt buggreport.
Thanks for the fix.
Comment #3
mducharme CreditAttribution: mducharme commentedWhy was this patch not pushed into a release? $conf['i18n_variables'][] = 'uc_cart_new_account_details'; does not work and other #description fields within ubercart do not use the variable_get at all and use the patch's format:
/modules/ubercart/uc_cart/uc_cart_checkout_pane.inc: $description = t('Enter a valid email address for this order...);
Comment #5
TR CreditAttribution: TR commentedWe don't need more than one issue open for this. You can contribute to #1257488: Make shipping quote pane description and error message really translatable if you want. But be aware that this is something that probably needs to be fixed in the i18n module, since it's i18n that doesn't properly work for variables defined outside a system_settings_form().
Comment #6
mgiffordIt doesn't work as designed, but thanks for a pointer to the right issue queue.