Commit 6aecbd40 authored by mh86's avatar mh86 Committed by jmuzz
Browse files

Issue #1482108 by mh86: Translations for single cardinality add pages.

parent ae64ac28
......@@ -127,7 +127,8 @@ function field_collection_item_add($field_name, $entity_type, $entity_id, $revis
// That way the link is going to be created when the item is saved.
$field_collection_item->setHostEntity($entity_type, $entity, LANGUAGE_NONE, FALSE);
$title = ($field['cardinality'] == 1) ? $instance['label'] : t('Add new !instance_label', array('!instance_label' => $field_collection_item->translatedInstanceLabel()));
$label = $field_collection_item->translatedInstanceLabel();
$title = ($field['cardinality'] == 1) ? $label : t('Add new !instance_label', array('!instance_label' => $label));
drupal_set_title($title);
// Make sure the current user has access to create a field collection item.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment