I am seeing this on a couple of sites - I would like to know if anyone else is seeing it. In French the top menu is translated but the actual content-type names are not even though the translations have been added to each content-type.

Files: 

Comments

joel_osc created an issue. See original summary.

sylus’s picture

I can confirm this but not sure if this is navbar, I also don't see the translation when I go to:

/fr/admin/structure/types

but I do see a translation I added when going to:

/fr/admin/structure/types/manage/wetkit-page/translate

sylus’s picture

joel_osc’s picture

Cool, thanks... let me look at patching it.

sylus’s picture

Think I have a fix how does this look:

  // Node Integration.
  $types = node_type_get_names();
  $links = array();
  foreach ($types as $machine_name => $name) {
    if (module_exists('i18n')) {
      $name = i18n_node_type_name($machine_name);
    }
...
sylus’s picture

Little more exact:

  // Node Integration.
  $types = node_type_get_names();
  $links = array();
  foreach ($types as $machine_name => $name) {

    if (module_exists('i18n')) {
      $name = i18n_node_type_name($machine_name, $name);
    }

    if (user_access('create ' . $machine_name . ' content')) {
      $links[] = '<div class="navbar-box">' . l($name, 'node/add/' . str_replace('_', '-', $machine_name), array('attributes' => array('class' => array('navbar-menu-item')))) . '</div>';
    }
  }
sylus’s picture

Attaching patch.

joel_osc’s picture

lol, I pulled the code to patch it and the code was already fixed!!! You are awesome! Thanks.

sylus’s picture

Status: Active » Fixed

Thanks, I will likely have to do another release because of the splash page and more important optional contexts issue. Should be out in a day or so. ^_^

  • sylus committed 622dcf1 on 7.x-4.x
    Fixed WetKit Admin for Issue #2658366 by sylus: Content-type names not...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.