2c2 < index f46bd86..d6a17be 100644 --- > index f46bd86..9a2183e 100644 5,6c5 < @@ -43,14 +43,15 @@ < * The new value of the tray attribute in the model. --- > @@ -44,13 +44,16 @@ 9c8 < - var relevantTray = (tray === null) ? model.previous('activeTray') : tray; --- > var relevantTray = (tray === null) ? model.previous('activeTray') : tray; 11c10,12 < - var text; --- > + var action = (tray === null) ? Drupal.t('closed') : Drupal.t('opened'); > + var trayNameElement = relevantTray.querySelector('.toolbar-tray-name'); > var text; 14,20d14 < - } < - else { < - text = Drupal.t('Tray "@tray" opened.', { '@tray': trayName }); < + var relevantTray = (tray === null) ? model.previous('activeTray') : tray, < + trayNameElement = relevantTray.querySelector('.toolbar-tray-name'), < + action = tray === null ? Drupal.t('closed') : Drupal.t('opened'), < + text; 22,24c16,21 < + var trayName = trayNameElement.textContent; < + text = Drupal.t('Tray "@tray" @action.', {'@tray': trayName, '@action': action}); < + } else { --- > + text = Drupal.t('Tray "@tray" @action.', { > + '@tray': trayNameElement.textContent, '@action': action > + }); > } > else { > - text = Drupal.t('Tray "@tray" opened.', { '@tray': trayName });