Closed (fixed)
Project:
Ubercart Discount Coupons
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2009 at 09:38 UTC
Updated:
8 Mar 2017 at 08:31 UTC
Jump to comment: Most recent
Comments
Comment #1
gabor_h commentedWell, actually I have simply set this variable to '' (an empty string).
- this way it is not displayed
- therefore there is no need to translate it
- therefore there is no need to make this string translatable.
Comment #2
pcambraI think that the correct way for doing this should be:
variable_get('uc_coupon_pane_description', t('Enter a coupon code for this order.'));
So it can be translated by interface and allows to have the message in different languages in the store only by translating it. What do you think?
Comment #3
Pls commentedWhy this is not yet commited ? Seems like natural thing that all strings should be enclosed with t(''). Please consider this for next version.
Comment #4
gabor_h commentedYes, please consider this for next version.
Comment #5
marcus_w commentedCorrect me if I'm wrong, but since this is a variable, shouldn't one specify multiliguality in the settings.php?
See http://drupal.org/node/313272.
Comment #6
pcambraYes, you can, but I think it would be far from optimal, i.e. for install profiles like my case, altering settings.php to include the lines of variables is not useful, I'd like to have it integrated in the translation, with l10n_update would get translated right away
Comment #7
Romejoe commented1.
Added the variable to the settings.php but can not find where the field for changing it is located. Where do I need to enter the other language now?
2.
I would like this translateable as well.... since this seems a minor problem why don't include in the next UG?
Comment #8
longwaveIn the -dev branch, the i18n variable setting should be configured correctly and this message should be translatable. Please reopen if this is not the case.
Comment #10
daamy commentedthanks
Comment #11
kopeboy3 years and a half have passed and still this is not updated for 7.x- version.
I cannot translate that specific string.
7.x-3.0-alpha0
Comment #12
graham leach commentedHello,
I am also struggling with the multilingual capabilities of uc_coupon. I am working with code extracted from
uc_coupon-6.x-1.7.tar.gz. Inmodules/uc_coupon/uc_coupon.modulethe following appears at line 998:...and the following code at line 949:
These are the only places in the code base where the phrase Enter a coupon code for this order. appears.:
Now, the presence of the t function bounding the phrase led me to believe that the phrase was/is translatable, but it is apparently not, which makes me wonder whether configuring the system to treat it as a multilingual variable would be the way to go.
I have seen this before, where the t function was being ignored - specifically, when dealing with the Submit Order button on the checkout screen. That story (with screen caps) can be seen at:
http://mymanthemaker.blogspot.hk/2017/03/solved-ubercarts-quirky-treatme...
At the moment, my guess is that PHP needs to be informed that this variable is multilingual. I will be documenting whether or not that is true here:
http://mymanthemaker.blogspot.hk/2017/03/drupal-ubercart-translating-un....
[SOLVED]
OK, this is a multilingual variable that is capable of being translated once it can be found.
1. Go to the appropriate place in the Drupal system:
2. Enter the anchor language message you want (or leave what is there alone)
3. Switch language context (click on language icon or prepend language code to url path in browser)
4. Enter translation and click on Save
[SOLVED]