Chasser les termes anglais

Simples : via admin/config/regional/translate/translate - pour order total

Y rechercher:

  • les messages de confirmation:
    • Your shopping cart has been updated.
    • added to your cart. est en fait   %title added to <a href="!cart-url">your cart</a>.
    • Checkout of your current order has been canceled and may be resumed when you are ready.
    • Please wait while you are redirected to the payment server. If nothing happens within 10 seconds, please click on the button below.
    • removed from your cart et Your shopping cart is empty (/cart)
  • texte dans les boutons:
    • Update cart   (facile à trouver, avec /cart)
    • Checkout      (/admin/modules/list/confirm) à Payer
    • Continue to next step /admin/modules/list/confirm
    • Go back /admin/modules/list/confirm
  • suite au clic sur Payer (url checkout/id) : Shopping cart contents avec Product, Price, Quantity et Order total... Account information, Billing info... Country /admin/modules/list/confirm)
    Full Name (/admin/config),
    Address 1 et 2 en /checkout/1 , Postal code /admin/config, City /checkout/1
    de la vue Shopping cart summary (Commerce Order)
  • messages d'erreur:
    There are errors on the page. Please correct them and resubmit the form. (à /checkout/6)
  • Review order (/admin/modules/list/confirm) et Review your order before continuing,
    angryProduct et Order total, Billing information
    Payment (/admin/modules/list/confirm), PayPal - pay securely without sharing your financial information (à !logo PayPal - pay securely without sharing your financial information
  • Product -> vue "Shopping cart summary (Commerce Order)"
     Order total  ?
  • puis, après paiement (page checkout/ID/complete): Checkout complete  /admin/modules/list/confirm
  • Billing information -> admin/commerce/config/order/fields/commerce_customer_billing

Traduire "Order total"

Au paiement, il reste un intilullé en anglais "Order Total", mais ce n'est pas ici qu'on peux le corriger.
Ni dans la vue "Shopping cart summary", ni "Line items", ni "Shopping cart block", ni "user order" ou"Orders". (vers la liste des views)

  1. La solution proposée est plutot couteuse: installer i18n, Variable et String translation (cf commentaire 105).
  2. Autre solution en db (voir commentaire 86) :
    unlocked the field "commerce_order_total" (changing 1 to 0 in the right field in the drup_field_config table). I came back to that admin page and I could edit the field. I change the label and then I LOCKED BACK AGAIN the field (1 -> 0).
    UPDATE `aout_ixe`.`field_config` SET `locked`='0' WHERE `id`='13';
    admin/commerce/config/order/fields/commerce_order_total on peux changer l'étiquette (puis revérouiller)

    Au commentaire 120 (mais où ?) : replaced the row:
    'title' => check_plain($translated_instance['label']),
    (cette ligne diffère un peu de #6 car pas la meme version?) par :
    'title' => check_plain(t($instance['label'])),
  3. propose:
    function template_preprocess_field(&$variables, $hook) {
      if ($variables['field_name_css'] == 'commerce-order-total') {
        $variables['items'][0]['#markup'] = str_replace('Order total', t('Order total'), $variables['items'][0]['#markup']);
  4. :
     * Implements hook_commerce_price_formatted_components_alter().
    function MYMODULE_commerce_price_formatted_components_alter(&$components, $price, $entity) {
      foreach ($components as &$component) {
        $component['title'] = t($component['title']);

logo drush