Closed (fixed)
Project:
Commerce Ajax Add to Cart
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2014 at 21:43 UTC
Updated:
21 Jun 2017 at 06:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
subhojit777Please provide more description while creating issue. Others can have this issue as well, this will help others.
Comment #2
anikitin35 commentedprint $configuration['empty_cart_message'];in template is not translateble to other languages.Comment #3
anikitin35 commentedI just added t to line 590 and the issue is resolved:
$variables['configuration']['empty_cart_message'] = check_plain(variable_get(t('DC_AJAX_ADD_CART_EMPTY_CART_MESSAGE'), t('Shopping cart is empty')));Comment #4
joe huggansYes I was also having issues using string overrides module for the "shopping cart is empty" text, and this is seemingly why
Comment #5
subhojit777@anikitin35 I dont think that will be the correct approach. Does this helps Variable translation.
Comment #6
subhojit777Comment #7
subhojit777Comment #8
subhojit777The empty cart message comes from a variable setting. You can set its value from here
admin/commerce/config/ajax-cart. Since this is a variable, you need to enable variable translation to translate empty cart message.This is not a bug of this module, and it can be fixed by enabling variable translation. Therefore, I am closing this issue.
Comment #9
nbchip commentedAs i see in the module there is no implementation of the hook_variable_info() so variables are not translatable by just enabling Variable module.
Or did I misunderstood smtg.
Thx.
Comment #10
subhojit777good catch! Can you please write a patch for this, please include tests as well :) Thanks
Comment #11
nbchip commentedPatch without Tests uploaded
Comment #13
subhojit777