$string['modifiedno'] = 'There are no modified strings to check in.';
$string['modifiednum'] = 'There are {$a} modified strings. You must check in them into disk to store them permanently.';
$string['nostringsfound'] = 'No strings found, please modify the filter settings';
+$string['placeholder'] = 'Placeholders';
+$string['placeholder_help'] = 'Placeholders are special statements like `{$a}` or `{$a->something}` within the string. They are replaced with a value when the string is actually printed.
+
+It is important to copy them exactly as they are in the original string. Do not translate them nor change their left-to-right orientation.';
+$string['placeholderwarning'] = 'string contains a placeholder';
$string['pluginname'] = 'Language customization';
$string['savecheckin'] = 'Save and check in strings into files';
$string['savecontinue'] = 'Save and continue editing';
$cells[1] = new html_table_cell(html_writer::tag('div', s($string->stringid), array('class' => 'stringid')));
$cells[1]->attributes['class'] = 'stringid';
// master translation of the string
- $cells[2] = new html_table_cell(html_writer::tag('div', s($string->master), array('class' => 'preformatted')));
+ $master = html_writer::tag('div', s($string->master), array('class' => 'preformatted'));
+ if (preg_match('/\{\$a(->.+)?\}/', $string->master)) {
+ $master .= html_writer::tag('div', $this->help_icon('placeholder', 'report_customlang',
+ get_string('placeholderwarning', 'report_customlang')), array('class' => 'placeholderinfo'));
+ }
+ $cells[2] = new html_table_cell($master);
$cells[2]->attributes['class'] = 'standard master';
// local customization of the string
$textarea = html_writer::tag('textarea', s($string->local), array('name'=>'cust['.$string->id.']'));