Translations for placeholder labels

This commit is contained in:
Nathan Gray 2011-07-05 22:21:49 +00:00
parent aab8157907
commit 624839d0db
4 changed files with 10 additions and 5 deletions

View File

@ -604,9 +604,9 @@ class calendar_hooks
'size' => 60,
'label' => 'Directory with documents to insert entries',
'name' => 'document_dir',
'help' => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the infolog data inserted.',lang('calendar')).' '.
lang('The document can contain placeholder like {{calendar_title}}, to be replaced with the contact data (%1full list of placeholder names%2).','<a href="'.$link.'" target="_blank">','</a>').' '.
lang('At the moment the following document-types are supported:'). implode(',',bo_merge::get_file_extensions()),
'help' => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the data inserted.',lang('calendar')).' '.
lang('The document can contain placeholder like {{%3}}, to be replaced with the data (%1full list of placeholder names%2).','<a href="'.$link.'" target="_blank">','</a>','calendar_title').' '.
lang('The following document-types are supported:'). implode(',',bo_merge::get_file_extensions()),
'run_lang' => false,
'xmlrpc' => True,
'admin' => False,

View File

@ -63,7 +63,11 @@ abstract class bo_merge
*/
function __construct()
{
// Common messages are in preferences
translation::add_app('preferences');
// All contact fields are in addressbook
translation::add_app('addressbook');
$this->contacts = new addressbook_bo();
$this->datetime_format = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'].' '.

View File

@ -170,6 +170,7 @@ etemplate editor etemplate en eTemplate editor
etemplate reference etemplate en eTemplate reference
etemplate tutorial etemplate en eTemplate tutorial
example {{if n_prefix~mr~hello mr.~hello ms.}} - search the field "n_prefix", for "mr", if found, write hello mr., else write hello ms. preferences en Example {{IF n_prefix~Mr~Hello Mr.~Hello Ms.}} - search the field "n_prefix", for "Mr", if found, write Hello Mr., else write Hello Ms.
example {{letterprefix}} - gives a letter prefix without double spaces, if the title is empty for example preferences en Example {{LETTERPREFIX}} - Gives a letter prefix without double spaces, if the title is empty for example
example {{nelf role}} - if field role is not empty, you will get a new line with the value of field role preferences en Example {{NELF role}} - if field role is not empty, you will get a new line with the value of field role
example {{nelfnv role}} - if field role is not empty, set a lf without any value of the field preferences en Example {{NELFNV role}} - if field role is not empty, set a LF without any value of the field
exchange this row with the one above etemplate en Exchange this row with the one above

View File

@ -158,7 +158,7 @@ class timesheet_merge extends bo_merge
$n++;
}
if (!($n&1)) echo '<tr>';
echo '<td>{{'.$name.'}}</td><td>'.$label.'</td>';
echo '<td>{{'.$name.'}}</td><td>'.lang($label).'</td>';
if ($n&1) echo "</tr>\n";
$n++;
}
@ -191,7 +191,7 @@ class timesheet_merge extends bo_merge
'IF fieldname' => lang('Example {{IF n_prefix~Mr~Hello Mr.~Hello Ms.}} - search the field "n_prefix", for "Mr", if found, write Hello Mr., else write Hello Ms.'),
'NELF' => lang('Example {{NELF role}} - if field role is not empty, you will get a new line with the value of field role'),
'NENVLF' => lang('Example {{NELFNV role}} - if field role is not empty, set a LF without any value of the field'),
'LETTERPREFIX' => lang('Example {{LETTERPREFIX}} - Gives a letter prefix without double spaces, if the title is emty for example'),
'LETTERPREFIX' => lang('Example {{LETTERPREFIX}} - Gives a letter prefix without double spaces, if the title is empty for example'),
'LETTERPREFIXCUSTOM' => lang('Example {{LETTERPREFIXCUSTOM n_prefix title n_family}} - Example: Mr Dr. James Miller'),
) as $name => $label)
{