With i18n_fields enabled,
- set the description property of a Commerce Price field
- translate the description

The Commerce Price description is not translated when displayed in a form.

Comments

basillic’s picture

basillic’s picture

New patch :
- Tests if module i18n_field is enabled
- HTML tags allowed into description

bluesman2014’s picture

Patch #2 works for me - thanks!

rszrama’s picture

mglaman’s picture

Status: Active » Needs review

There's patching, marking to Needs Review.

mglaman’s picture

+++ b/modules/price/commerce_price.module
@@ -1141,3 +1141,22 @@ function _commerce_price_rules_data_ui_element_validate($element, &$form_state,
+function _commerce_price_get_i18n_description($element) {

Couldn't this be abstract to commerce_field_i18n_description so all sub modules could use this if required?

chris matthews’s picture

The 4 year old patch in #2 to commerce_price.module applied cleanly to the latest commerce 7.x-1.x-dev, but as proposed in #6 couldn't this be abstract to commerce_field_i18n_description so all sub modules could use this if required?