code: public static Map<RoboconfError,String> formatErrors(
  			Collection<? extends RoboconfError> errors,
  			String lang,
  			boolean addMetadata ) {
  
  		ResourceBundle resourceBundle = getResourceBundle( lang );
  		Map<RoboconfError,String> result = new LinkedHashMap<> ();
  		for( RoboconfError error : errors ) {
  
  			StringBuilder sb = new StringBuilder();
  			if( addMetadata ) {
  				sb.append( "[ " );
  				sb.append( error.getErrorCode().getCategory().toString().toLowerCase());
  				sb.append( " ] " );
  			}
  
  			sb.append( resourceBundle.getString( error.getErrorCode().name()));
  			sb.append( " " );
  			for( Iterator<ErrorDetails> it = Arrays.asList( error.getDetails()).iterator(); it.hasNext(); ) {
  				ErrorDetails details = it.next();
  				sb.append( resourceBundle.getString( details.getErrorDetailsKind().name()));
  				sb.append( details.getElementName());
  				if( it.hasNext())
  					sb.append( resourceBundle.getString( TranslationBundle.DETAILS_SEPARATOR ));
  			}
  
  			result.put( error, sb.toString().trim());
  		}
  
  		return result;
  	}
docs: Formats a Roboconf error as a string.
  <p>
  This class relies on a cached instance of {@link TranslationBundle}.
  The cache is automatically refreshed if the user language changes.
  </p>
  
  @param errors a non-null collection of errors
  @param lang the language to use
  @param addMetadata true to display meta-data, such as error categories
  @return a non-null map (key = error, value = error message)
  <p>
  Insertion order is preserved.
  </p>