Closed (fixed)
Project:
Ubercart
Version:
6.x-2.0-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Feb 2009 at 21:30 UTC
Updated:
7 Mar 2017 at 17:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cha0s commentedGood call. There are probably more of these around, and they should be fixed... I'll start a patch if the other devs agree.
Comment #2
rszrama commentedHmm... so, I feel you on this patch, but this solution actually won't work. You can only pass string literals through t(), so the solution should actually be something more like what I'm doing for the shopping cart block title. To be honest, what if we just took out the ability to rename these buttons? I don't think it's essential, and people who really want to have viable alternatives through the Local/String Overrides modules or through a simple hook_form_alter(). Whaddya think?
Comment #3
cha0s commentedYeah, I think there would be a way for someone to create their own 'translation' of the strings we use for stuff like that, even if it isn't truly another language, that'd work I think. We should probably just let that system do its thing... Yeah, hook_form_alter's a bit simpler as well if people choose to go that route. =)
Comment #4
rszrama commentedAlrighty, I removed the options for review, submit, and next buttons in the cart module. The attached patch takes care of it. It's been tested on the 2.x Livetest and will be included in the next release. I'm updating the docs to instruct people how to tweak this text from here on out.
Comment #5
ARray commentedWill it be fixed for cart block?
"View cart" and "Checkout" links are not translatable now in cart block. :(
Comment #6
ARray commentedI guess there should be added t() in uc_cart.module:
[code]
$summary_links = array(
'cart-block-view-cart' => array(
'title' => t('View cart'), // surrounded by t() here
'href' => 'cart',
'attributes' => array('rel' => 'nofollow'),
),
);
// Only add the checkout link if checkout is enabled.
if (variable_get('uc_checkout_enabled', TRUE)) {
$summary_links['cart-block-checkout'] = array(
'title' => t('Checkout'), // surrounded by t() here
'href' => 'cart/checkout',
'attributes' => array('rel' => 'nofollow'),
);
}
[/code]
Comment #7
rszrama commentedYou've tested and these aren't translatable? Based on the source for that theme function, it was hard to tell whether my links arrays should be using t() or not.
Comment #9
marcoBauli commentedsorry for reopening this, but seems also the "Submit order" button on product node page cannot be translated...
i am using string_override module, that is able to translate whatever appears between t()s.
i had a deep look at all the components, but couldn't find where that string is.. can anyone confirm this is happening and eventually lend a hand?
thanks a lot
Comment #10
rszrama commentedI think it would be best to post your request as a support request on Ubercart.org. This ticket was unrelated.
Comment #11
MakeOnlineShop commentedHi,
Sorry but did you find a solution to translate Submit Order on Ubercart ? I have been trying to find a solution for hours...
Thanks a lot.
Comment #12
jejk commentedCheck also the payment method modules such as the paypal one which creates its own review form
Comment #13
MakeOnlineShop commentedWhen customers pay with Paypal the "Submit order" is there:
/admin/store/settings/payment/edit/methods
But where is it when they use another payment ?
Thanks.
Comment #14
graham leach commentedHello,
It seems to me that Ubercart 2.x on Drupal 6.x (D6U2) has serious legacy UX issues.
I recently spent hours trying to accomplish the translation of elements of the Checkout and Checkout Review screens. The buttons Review Order, Back and Submit Order needed different treatment to accomplish a complete translation exercise. Here's how I did it:
Via Code?
The code in modules/ubercart/uc_cart/uc_cart.pages.inc (around line 484) features the following, which I have added a couple of explanatory comments to, to help with comprehension:
Unfortunately, changing the value of Submit order in the above code has zero effect on the behavior of the Checkout Review Page (/cart/checkout/review). This somewhat inexplicable phenomena led to me having to mess around in the Ubercart 2.x code and administration interface for hours until I figured out what was going on.
Via the Translate Interface?
The Translate Interface (/admin/build/translate/search) is a powerful tool when it comes to developing multi-lingual websites. This is where the text for the Review Order button located at the first Checkout screen (/cart/checkout) and the Back button located at the Checkout Review screen (/cart/checkout/review) were both made to dynamically change when different languages were selected.
So, I was able to translate Review Order and Back using the Translate Interface. But, no matter how I tried, the Submit Order button refused to translate, despite the fact that it seems to be a translateable string. This is indicated by the t in the following code snippet:
'#value' => t('Submit order'),
As it turns out, the button text for Submit order cannot be translated using the Translate Interface function, even though the variable in question is bounded by the translate function (t), a real wild goose chase.
Via the Ubercart Store Administration Interface?
After a lot of set-test cycles, I turned to the Internet and this is where I found some clues. In one posting, someone mentioned that the string for the Submit Order appeared in the Ubercart administration extension to the Drupal administration interface. I eventually found the setting here:
This posting, or another temporally proximate to it, mentioned that the field was translatable, which is indicated by the field having the notation This is a multilingual variable appear beneath it. To translate these fields, the user interface must be switched to the target language (I clicked on the icon for the language I wanted to translate to from the English interface) and the fields magically changed to the target language - but NOT the string in question, which appeared in English! To change it, I needed to replace the English field contents with the necessary translation, and the final piece of the checkout process fell into place, and the checkout-related buttons that were so much trouble before now behave as desired.
Comment #15
tr commentedDrupal 6 and Ubercart 2.x have been unsupported for more than a year now. If you have problems with the current versions of Ubercart (7.x-3.x or 8.x-4.x) please open a new issue.