code: function lookup(data, onUndefined) {
    if (data == null) {
      if (onUndefined) {
        return l10n.lookup(onUndefined);
      }
  
      return data;
    }
  
    if (typeof data === 'string') {
      return data;
    }
  
    if (typeof data === 'object') {
      if (data.key) {
        return l10n.lookup(data.key);
      }
  
      var locales = l10n.getPreferredLocales();
      var translated;
      locales.some(function(locale) {
        translated = data[locale];
        return translated != null;
      });
      if (translated != null) {
        return translated;
      }
  
      console.error('Can\'t find locale in descriptions: ' +
              'locales=' + JSON.stringify(locales) + ', ' +
              'description=' + JSON.stringify(data));
      return '(No description)';
    }
  
    return l10n.lookup(onUndefined);
  }
docs: Implement the localization algorithm for any documentation objects (i.e.
  description and manual) in a command.
  @param data The data assigned to a description or manual property
  @param onUndefined If data == null, should we return the data untouched or
  lookup a 'we don't know' key in it's place.