i am translating some fieldnames to german.
So the Field "Order Total" needs to be calles "Gesamtsumme".
When i try to edit the field i get the following error:

Notice: Undefined index: instance in chosen_form_field_ui_field_edit_form_alter() (Zeile 54 von /var/customers/webs/jokas/onlineshop.pragerundwild.de/profiles/commerce_kickstart/modules/contrib/chosen/chosen.module).
Notice: Undefined index: description in token_form_field_ui_field_edit_form_alter() (Zeile 755 von /var/customers/webs/jokas/onlineshop.pragerundwild.de/profiles/commerce_kickstart/modules/contrib/token/token.module).
Notice: Undefined index: #description in token_form_field_ui_field_edit_form_alter() (Zeile 755 von /var/customers/webs/jokas/onlineshop.pragerundwild.de/profiles/commerce_kickstart/modules/contrib/token/token.module).

Maybe there is a way to fix it?

Comments

achikas’s picture

without the option to translate the "total order" field it make no sense to have a multilingual shop.

theo_’s picture

Status: Active » Postponed (maintainer needs more info)

I am unable to reproduce this bug even using the beta2 version.

krabbe’s picture

I don't get the error messages, but there is still an issue with "Order total". The string is found by the translation interface (field:commerce_order_total:commerce_order:label), but there is no form for german translation, only english. The source language of my site is german, but for this field the system doesn't offer me the german translation. It "thinks", the string is already german...

amorales@drupal.org.es’s picture

Same issue here, trying to translate Order Total field.

It's related with http://drupal.org/node/1121722#comment-6094934

I also have the Notice undefined index messages:

    Notice: Undefined index: instance en chosen_form_field_ui_field_edit_form_alter() (línea 54 de /var/www/kabula/portal_ks2demo/sites/all/modules/chosen/chosen.module).
    Notice: Undefined index: description en token_form_field_ui_field_edit_form_alter() (línea 759 de /var/www/kabula/portal_ks2demo/sites/all/modules/token/token.module).
    Notice: Undefined index: #description en token_form_field_ui_field_edit_form_alter() (línea 759 de /var/www/kabula/portal_ks2demo/sites/all/modules/token/token.module).

I have Commerce Kickstart 2. It happens with demo and no demo content installed.

amorales@drupal.org.es’s picture

Status: Postponed (maintainer needs more info) » Active
krabbe’s picture

The Undefined index issues can be solved with two patches.
For chosen module: #1720846: Fixing widget type check
For token module : #1720576: When you programmatically create a field with the option "locked => TRUE", there can be errors.

krabbe’s picture

But I still have the issue with wrong label "Order total" for German source language.
I can't translate it to "Gesamtsumme" because the field is locked.
The built-in "Order total" can be translated like it should be, the fields "Order total" not. I attached two screenshots to explain it.

majusz’s picture

I had the same problem for weeks and it was driving me mad - had a single language site (non-English) and couldn't translate "Order total".

At least for me the key for solving it was explicitly setting the source language for the i18n module to "English". By default it's set to the default language of your site, which was not English in my case. It has to be English though because otherwise the translation interface interprets some of the English source strings as the default (non-English) language, so you can't enter a translation for that language anymore.
You'd need i18n and i18n_field modules for this solution to work.

You can find further information here:

http://drupal.org/node/1451132#comment-5984944

kreatIL’s picture

Same issue here on a fresh installation of Drupal Commerce 7.x-1.4 (no Commerce Kickstart).

jackdaniel9’s picture

Solution ?

Billing Information + Shipping Information translate don't work too !

astutonet’s picture

I have the same issue in "Order Total" field.

I also have other fields that can't to be translated.

Any idea?

cn313’s picture

Take a look at this thread:

http://drupal.org/node/1121722

astutonet’s picture

Tks @cn313. I will study.

makokis’s picture

same issue here, waiting for a patch or solution.
Using Commerce Kickstart 7.x-2.0

lsolesen’s picture

vacho’s picture

This solution has worked for me
http://.../en/admin/config/regional/i18n/strings

and set "Source language" en "English"

Thanks

steveoriol’s picture

I use this patch, it works for me.

jsacksick’s picture

Project: Commerce Kickstart » Drupal Commerce
Version: 7.x-2.0-beta2 » 7.x-1.x-dev
Component: Code » Internationalization
Status: Active » Closed (duplicate)
gianfrasoft’s picture

#17 solved my problem!!!

@jsacksick, I don't see this solution in the patch inside the issue: http://drupal.org/node/1121722

So I don't think this issue is a duplicate.

jsacksick’s picture

It's a duplicate, this issue isn't relevant, neither the patch, #17 is definetly not the good solution for this. Wrapping the $instance['label'] in a t is hackish.

gianfrasoft’s picture

Yes but is the only solution I found!!!

bojanz’s picture

Just a note, I was able to translate the order total string with the "i18n_field" module enabled without a problem.

gianfrasoft’s picture

Hi, @bojanz,

please take a look at this: https://drupal.org/node/1451132#comment-7511113
and this: https://drupal.org/node/1451132#comment-7512015

As I said there:

I Made dozens of drupal sites in my home language: italian, and I always used only locale module without Internationalization module.

Mine are not multilanguage sites but I have to translate everything the same. I can't install a so big module (i18n and some submodules) to translate 1 or 2 strings! Do you agree?

jiaxin’s picture

i've encounter the same issue, and i find the following solution works fine:

function MYMODULE_commerce_price_formatted_components_alter(&$components, $price, $entity) {
	      $components['commerce_price_formatted_amount']['title'] = t('Order Total');	      
}
Marko B’s picture

Issue summary: View changes

I am having similar problem with Shipping label in commerce-order-handler-area-order-total that is included in view,
just can't be translated as it is not showing in TI. Guess is it a bug.

<tr class="component-type-flat-rate-usd-internet even"><td class="component-title">Shipping</td><td class="component-total">$9.90</td> </tr>

Marko B’s picture

For the problem I have, seems it was due to flat rate shipping module. So this patch here should help
https://www.drupal.org/node/1480654

gmrmedia’s picture

#16 works for me ;)

Mehrdad201’s picture

Solution #24 worked for me.
Thanks jiaxin

ivanhelguera’s picture

Geez, remember that searching for translation strings *is case sensitive*.
I had everything actually working, but the translation system was not finding the strings because I typed in "order total" instead of "Order total".

ANDiTKO’s picture

#24 worked for me

phosgen’s picture

There now is a working module that works like a charm in renaming the labels for all locked fields.

Rename Locked Fields
https://www.drupal.org/project/rflocked