Navigation menu: fix translation of new-subtype entries.
authorMathieu Lutfy <mathieu@symbiotic.coop>
Mon, 1 Jun 2020 12:34:06 +0000 (08:34 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Mon, 1 Jun 2020 14:43:08 +0000 (10:43 -0400)
CRM/Contact/BAO/ContactType.php

index 8a2e811c5720762c57c03f63158ebdd0eb9d2dd0..42fb2ba54dfba4508c01424c1c0732aa5d14fee3 100644 (file)
@@ -603,7 +603,7 @@ WHERE name = %1';
 
     if (!empty($params['id'])) {
       $newParams = [
-        'label' => "New $contact",
+        'label' => ts("New %1", [1 => $contact]),
         'is_active' => $active,
       ];
       CRM_Core_BAO_Navigation::processUpdate(['name' => "New $contactName"], $newParams);
@@ -616,7 +616,7 @@ WHERE name = %1';
       $value = ['name' => "New $name"];
       CRM_Core_BAO_Navigation::retrieve($value, $navinfo);
       $navigation = [
-        'label' => "New $contact",
+        'label' => ts("New %1", [1 => $contact]),
         'name' => "New $contactName",
         'url' => "civicrm/contact/add?ct=$name&cst=$contactName&reset=1",
         'permission' => 'add contacts',