diff --git a/includes/MediaEntityTranslationHandler.inc b/includes/MediaEntityTranslationHandler.inc index a62623e..4ceccc8 100644 --- a/includes/MediaEntityTranslationHandler.inc +++ b/includes/MediaEntityTranslationHandler.inc @@ -34,13 +34,17 @@ class MediaEntityTranslationHandler extends EntityTranslationDefaultHandler { // If a translation in the current content language is missing we display // a link to create it, unless we are not already doing it. if ($language->language != $form_langcode && empty($source_langcode) && !isset($translations->data[$language->language])) { - $text = t('Add @language translation', array('@language' => $language->name)); - $path = $this->getEditPath() . '/add/' . $form_langcode . '/' . $language->language; - $link = l($text, $path, array('attributes' => array('class' => array('ctools-use-modal')))); - + $link = array( + 'title' => t('Add @language translation', array('@language' => $language->name)), + 'href' => $this->getEditPath() . '/add/' . $form_langcode . '/' . $language->language, + 'localized_options' => array('attributes' => array('class' => array('ctools-use-modal'))), + ); $form['media_add_translation'] = array( + '#theme' => 'menu_local_action', + '#link' => $link, '#weight' => -110, - '#markup' => '', + '#prefix' => '', ); }