Move some hard-coded messages to template files

This commit is contained in:
Benjamin Renard 2020-05-28 20:24:37 +02:00
parent 4f2afc318f
commit 47d5ce021d
8 changed files with 81 additions and 77 deletions

View file

@ -119,7 +119,6 @@ class LSform {
if (!isset($this -> dataEntryFormConfig['disabledLayout']) || $this -> dataEntryFormConfig['disabledLayout']==false) {
if (is_array($layout_config)) {
LStemplate :: assign('LSform_layout',$layout_config);
LStemplate :: assign('LSform_layout_nofield_label',_('No field.'));
}
}
@ -252,7 +251,6 @@ class LSform {
$layout_config=LSconfig :: get("LSobjects.".$LSform_object['type'].".LSform.layout");
if (is_array($layout_config)) {
LStemplate :: assign('LSform_layout',$layout_config);
LStemplate :: assign('LSform_layout_nofield_label',_('No field.'));
}
}

View file

@ -60,9 +60,6 @@ class LSmail {
else if(empty($_REQUEST['mails'])) {
LStemplate :: assign('LSmail_mails',array($_REQUEST['mails']));
}
LStemplate :: assign('LSmail_mail_label',_('Email'));
LStemplate :: assign('LSmail_subject_label',_('Title'));
LStemplate :: assign('LSmail_msg_label',_('Message'));
$data = array(
'html' => LSsession :: fetchTemplate('LSmail.tpl')

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: LdapSaisie\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2020-05-28 19:47+0200\n"
"PO-Revision-Date: 2020-05-28 20:22+0200\n"
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n"
"Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise."
"org>\n"
@ -368,19 +368,7 @@ msgstr ""
"Asterisk : Le mot de passe en clair est indisponible. Impossible de générer "
"le mot de passe haché en MD5."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:63
msgid "Email"
msgstr "E-mail"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:64
msgid "Title"
msgstr "Titre"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:65
msgid "Message"
msgstr "Message"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:77
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:74
msgid "Your message has been sent successfully."
msgstr "Votre message a bien été envoyé."
@ -1335,7 +1323,7 @@ msgid "updating relations"
msgstr "mise à jour des relations"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSrelation.php:602
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:220
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:219
msgid "Do you really want to delete"
msgstr "Voulez-vous vraiment supprimer"
@ -1344,7 +1332,7 @@ msgid "Warning"
msgstr "Attention"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSrelation.php:604
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:222
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:221
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_select_object.php:69
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_select_object.php:85
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsearchEntry.php:185
@ -1538,19 +1526,14 @@ msgstr "Ajouter une autre valeur à ce champ."
msgid "Delete this field."
msgstr "Supprimer cette valeur."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:122
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:255
msgid "No field."
msgstr "Aucun champ."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:203
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:202
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:569
msgid "Do you really want to execute custom action %{title} on this search ?"
msgstr ""
"Êtes-vous vraiment sûre de vouloir exécuter l'action personnalisée %{title} "
"sur cette recherche ?"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:209
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:208
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1231
msgid ""
"Do you really want to execute custom action %{customAction} on "
@ -1559,49 +1542,49 @@ msgstr ""
"Êtes-vous vraiment sûre de vouloir exécuter l'action personnalisée "
"%{customAction} sur %{objectname} ?"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:221
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:220
msgid "Caution"
msgstr "Attention"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:276
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:274
msgid "%{label} attribute data is not valid."
msgstr "Les données de l'attribut %{label} sont incorrectes."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:356
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:354
msgid "Mandatory field"
msgstr "Champ obligatoire"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:790
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:788
msgid "LSform : Error during the recovery of the values of the form."
msgstr "LSform : Erreur durant la récupération des valeurs du formulaire."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:793
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:791
msgid ""
"LSform : Error durring the recovery of the value of the field '%{element}'."
msgstr ""
"LSform : Erreur durant la recupération de la valeur du champ %{element}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:800
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:798
msgid "LSform : The field %{element} doesn't exist."
msgstr "LSform : Le champ %{element} n'existe pas."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:803
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:801
msgid "LSfom : Field type unknow (%{type})."
msgstr "LSform : Type de champ inconnu (%{type})."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:806
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:804
msgid "LSform : Error during the creation of the element '%{element}'."
msgstr "LSform : Erreur durant la création de l'élément %{element}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:809
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:807
msgid "LSform : The data entry form %{name} doesn't exist."
msgstr "LSform : Le masque de saisie %{name} n'existe pas."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:812
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:810
msgid "LSform : The data entry form %{name} is not correctly configured."
msgstr "LSform : Le masque de saisie %{name} n'est pas correctement configuré."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:815
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:813
msgid ""
"LSform : The element %{name}, listed as displayed in data entry form "
"configuration, doesn't exist."
@ -2193,6 +2176,10 @@ msgstr "Connecté en tant que"
msgid "Details"
msgstr "Détails"
#: templates/default/LSmail.tpl:3
msgid "Email"
msgstr "E-mail"
#: templates/default/import.tpl:10
msgid "File"
msgstr "Fichier"
@ -2233,10 +2220,22 @@ msgstr "Langue"
msgid "Legend:"
msgstr "Légende :"
#: templates/default/base_connected.tpl:50
msgid "Logout"
msgstr "Déconnexion"
#: templates/default/LSmail.tpl:28
msgid "Message"
msgstr "Message"
#: templates/default/viewSearch.tpl:134
msgid "Nb / page :"
msgstr "Nb / page :"
#: templates/default/LSform_view.tpl:34
msgid "No field."
msgstr "Aucun champ."
#: templates/default/import.tpl:76
msgid "No imported object"
msgstr "Aucun objet importé"
@ -2289,6 +2288,10 @@ msgstr "Relations / Profils"
msgid "Result"
msgstr "Résultat"
#: templates/default/LSmail.tpl:21
msgid "Subject"
msgstr "Sujet"
#: templates/default/LSaccessRightsMatrixView.tpl:49
msgid "Their relations with other objects"
msgstr "Leurs relations avec les autres objets"
@ -2317,6 +2320,9 @@ msgstr "non"
msgid "yes"
msgstr "oui"
#~ msgid "Title"
#~ msgstr "Titre"
#~ msgid "deleting"
#~ msgstr "suppression"

View file

@ -292,19 +292,7 @@ msgid ""
"password."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:63
msgid "Email"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:64
msgid "Title"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:65
msgid "Message"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:77
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSmail.php:74
msgid "Your message has been sent successfully."
msgstr ""
@ -1102,7 +1090,7 @@ msgid "updating relations"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSrelation.php:602
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:220
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:219
msgid "Do you really want to delete"
msgstr ""
@ -1111,7 +1099,7 @@ msgid "Warning"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSrelation.php:604
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:222
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:221
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_select_object.php:69
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_select_object.php:85
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSsearchEntry.php:185
@ -1271,65 +1259,60 @@ msgstr ""
msgid "Delete this field."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:122
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:255
msgid "No field."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:203
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:202
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:569
msgid "Do you really want to execute custom action %{title} on this search ?"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:209
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:208
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1231
msgid ""
"Do you really want to execute custom action %{customAction} on "
"%{objectname} ?"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:221
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:220
msgid "Caution"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:276
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:274
msgid "%{label} attribute data is not valid."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:356
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:354
msgid "Mandatory field"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:790
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:788
msgid "LSform : Error during the recovery of the values of the form."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:793
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:791
msgid ""
"LSform : Error durring the recovery of the value of the field '%{element}'."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:800
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:798
msgid "LSform : The field %{element} doesn't exist."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:803
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:801
msgid "LSfom : Field type unknow (%{type})."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:806
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:804
msgid "LSform : Error during the creation of the element '%{element}'."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:809
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:807
msgid "LSform : The data entry form %{name} doesn't exist."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:812
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:810
msgid "LSform : The data entry form %{name} is not correctly configured."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:815
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSform.php:813
msgid ""
"LSform : The element %{name}, listed as displayed in data entry form "
"configuration, doesn't exist."
@ -1862,6 +1845,10 @@ msgstr ""
msgid "Details"
msgstr ""
#: templates/default/LSmail.tpl:3
msgid "Email"
msgstr ""
#: templates/default/import.tpl:10
msgid "File"
msgstr ""
@ -1902,10 +1889,22 @@ msgstr ""
msgid "Legend:"
msgstr ""
#: templates/default/base_connected.tpl:50
msgid "Logout"
msgstr ""
#: templates/default/LSmail.tpl:28
msgid "Message"
msgstr ""
#: templates/default/viewSearch.tpl:134
msgid "Nb / page :"
msgstr ""
#: templates/default/LSform_view.tpl:34
msgid "No field."
msgstr ""
#: templates/default/import.tpl:76
msgid "No imported object"
msgstr ""
@ -1958,6 +1957,10 @@ msgstr ""
msgid "Result"
msgstr ""
#: templates/default/LSmail.tpl:21
msgid "Subject"
msgstr ""
#: templates/default/LSaccessRightsMatrixView.tpl:49
msgid "Their relations with other objects"
msgstr ""

View file

@ -31,7 +31,7 @@
{/if}
{/foreach}
{if $field=='non'}
<dd class='LSform'>{$LSform_layout_nofield_label|escape:"htmlall"}</dd>
<dd class='LSform'>{tr msg="No field."|escape:"htmlall"}</dd>
{/if}
</dl>

View file

@ -1,6 +1,6 @@
<dl class='LSmail{if $LSmail_options.class} {$LSmail_options.class|escape:"htmlall"}{/if}'>
{if $LSmail_options.display_mail_field}
<dt class='LSmail'>{$LSmail_mail_label|escape:"htmlall"}</dt>
<dt class='LSmail'>{tr msg="Email"|escape:"htmlall"}</dt>
<dd class='LSmail'>
{if $LSmail_mails != ""}
{if $LSmail_mails|@count==1}
@ -18,14 +18,14 @@
<input type='hidden' name='LSmail_mail' id='LSmail_mail' value='{$LSmail_mails[0]|escape:"htmlall"}'/>
{/if}
{if $LSmail_options.display_subject_field}
<dt class='LSmail'>{$LSmail_subject_label|escape:"htmlall"}</dt>
<dt class='LSmail'>{tr msg="Subject"|escape:"htmlall"}</dt>
<dd class='LSmail'>
<input type='text' name='LSmail_subject' id='LSmail_subject' value='{$LSmail_subject|escape:"htmlall"}'/>
</dd>
{else}
<input type='hidden' name='LSmail_subject' id='LSmail_subject' value='{$LSmail_subject|escape:"htmlall"}'/>
{/if}
<dt class='LSmail'>{$LSmail_msg_label|escape:"htmlall"}</dt>
<dt class='LSmail'>{tr msg="Message"|escape:"htmlall"}</dt>
<dd class='LSmail'>
<textarea name='LSmail_msg' id='LSmail_msg'>{$LSmail_msg|escape:"htmlall"}</textarea>
</dd>

View file

@ -47,7 +47,7 @@
</form>
{if $displaySelfAccess}{tr msg="Connected as"|escape:"htmlall"} <span id='user_name'>{$LSsession_username|escape:"htmlall"}</span>{/if}
<a href='?LSsession_refresh=1'><img src='{img name='refresh'}' alt="{tr msg="Refresh my access rights"}" title="{tr msg="Refresh my access rights"}" /></a>
{if $displayLogoutBtn} <a href='?LSsession_logout'><img src='{img name='logout'}' alt='Logout' title='Logout' /></a>{/if}
{if $displayLogoutBtn} <a href='?LSsession_logout'><img src='{img name='logout'}' alt='{tr msg="Logout"|escape:"htmlall"}' title='{tr msg="Logout"|escape:"htmlall"}' /></a>{/if}
</td>
</tr>
<tr>