Display batch operations messages I have defined a batch, everything works ok, but I want to understand how the messages are displayed. So I have this batch:

$batch = array(
  'title' =&gt; t('Generate reports'),
  'operations' =&gt; array(
    array('create_report_callback', array($time_min, $time_max)),
  ),
  'init_message' =&gt; t('Starting report generation...'),
  'progress_message' =&gt; t('Generating report. Operation @current out of @total.'),
  'error_message' =&gt; t('Error detected. Please try again!'),
  'finished' =&gt; 'create_report_finished',
);


What I want to know is how to change the progress_message to something else than Operation @current out of @total. I don't know where the @current and @total come from

Thank you.
The placeholders @current, @total, etc are described in the file includes/form.inc in the description of the batch_set() function.


  
  progress_message: Message displayed while processing the batch.
  Available placeholders are @current, @remaining, @total,
  @percentage, @estimate and @elapsed. Defaults to t('Completed
  @current of @total.').
  




You can add custom placeholders by using the t() function like this:

$my_custom_variable = 'contents of my custom variable';

$batch = array(
  'title' =&gt; t('Generate reports'),
  'operations' =&gt; array(
    array('create_report_callback', array($time_min, $time_max)),
  ),
  'init_message' =&gt; t('Starting report generation...'),
  'progress_message' =&gt; t('Generating @my_custom_placeholder report. Operation @current out of @total.', 
     array(
       '@my_custom_placeholder' =&gt; $my_custom_variable,
     )
  ),
  'error_message' =&gt; t('Error detected. Please try again!'),
  'finished' =&gt; 'create_report_finished',
);