Projet

Général

Profil

Révision 6331c987

Ajouté par Assos Assos il y a environ 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.admin.inc
10 10
 * Produces a menu translation form.
11 11
 */
12 12
function i18n_menu_translation_form($form, $form_state, $translation_set = NULL, $item = NULL) {
13
  $translation_set = $translation_set ? $translation_set : i18n_translation_set_create('menu_link');
13
  $translation_set = $translation_set ? $translation_set : i18n_translation_set_build('menu_link');
14 14
  $form['translation_set'] = array('#type' => 'value', '#value' => $translation_set);
15 15
  $translations = $translation_set->get_translations();
16 16
  // What to do with title? Let's make it a hidden field for now, some tests relay on it
......
55 55
  }
56 56
  $form['actions'] = array('#type' => 'actions');
57 57
  $form['actions']['update'] = array('#type' => 'submit', '#value' => t('Save'));
58
  if ($translation_set) {
58
  if (!empty($translation_set->tsid)) {
59 59
    $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
60 60
  }
61 61
  return $form;
......
244 244
      $title = t('n/a');
245 245
      $options[] = l(t('add translation'), 'admin/structure/menu/manage/' . $item['menu_name'] . '/add', array('query' => array('translation' => $item['mlid'], 'target' => $langcode) + drupal_get_destination()));
246 246
    }
247
    $rows[] = array($language_name, $title, implode(" | ", $options));
247
    $rows[$langcode] = array(
248
      'language' => $language_name,
249
      'title' => $title,
250
      'operations' => implode(" | ", $options)
251
    );
248 252
  }
249 253

  
250 254
  drupal_set_title(t('Translations of menu item %title', array('%title' => $item['link_title'])), PASS_THROUGH);
251 255

  
252
  $build['translation_item_overview'] = array(
256
  $build['translation_overview'] = array(
253 257
    '#theme' => 'table',
254 258
    '#header' => $header,
255 259
    '#rows' => $rows,

Formats disponibles : Unified diff