From 090e766f845208b6e658a7532d34bd16c9a27404 Mon Sep 17 00:00:00 2001
From: Denis Flaven
Date: Tue, 8 Jun 2010 15:42:58 +0000
Subject: [PATCH] - Localization of the "Notifications" menu
SVN:trunk[443]
---
application/template.class.inc.php | 4 +-
dictionaries/dictionary.itop.ui.php | 24 ++++++++
dictionaries/fr.dictionary.itop.ui.php | 24 ++++++++
setup/data/structure/1.menus.xml | 82 +++++++++++---------------
4 files changed, 84 insertions(+), 50 deletions(-)
diff --git a/application/template.class.inc.php b/application/template.class.inc.php
index 3b09ee333..2b2cfbfb5 100644
--- a/application/template.class.inc.php
+++ b/application/template.class.inc.php
@@ -169,7 +169,7 @@ class DisplayTemplate
break;
case 'itoptab':
- $oPage->SetCurrentTab(str_replace('_', ' ', $aAttributes['name']));
+ $oPage->SetCurrentTab(Dict::S(str_replace('_', ' ', $aAttributes['name'])));
$oTemplate = new DisplayTemplate($sContent);
$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
//$oPage->p('iTop Tab Content:
'.htmlentities($sContent).'
');
@@ -179,7 +179,7 @@ class DisplayTemplate
case 'itoptoggle':
$sName = isset($aAttributes['name']) ? $aAttributes['name'] : 'Tagada';
$bOpen = isset($aAttributes['open']) ? $aAttributes['open'] : true;
- $oPage->StartCollapsibleSection($sName, $bOpen);
+ $oPage->StartCollapsibleSection(Dict::S($sName), $bOpen);
$oTemplate = new DisplayTemplate($sContent);
$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
//$oPage->p('iTop Tab Content:
'.htmlentities($sContent).'
');
diff --git a/dictionaries/dictionary.itop.ui.php b/dictionaries/dictionary.itop.ui.php
index 66b6b4328..2ffcae44d 100644
--- a/dictionaries/dictionary.itop.ui.php
+++ b/dictionaries/dictionary.itop.ui.php
@@ -740,6 +740,30 @@ Dict::Add('EN US', 'English', 'English', array(
'UI:NotificationsMenu' => 'Notifications',
'UI:NotificationsMenu+' => 'Configuration of the Notifications',
+ 'UI:NotificationsMenu:Title' => 'Configuration of the Notifications',
+ 'UI:NotificationsMenu:Help' => 'Help',
+ 'UI:NotificationsMenu:HelpContent' => '
In iTop the notifications are fully customizable. They are based on two sets of objects: triggers and actions.
+
Triggers define when a notification will be executed. There are 3 types of triggers for covering 3 differents phases of an object life cycle:
+
+
the "OnCreate" triggers get executed when an object of the specified class is created
+
the "OnStateEnter" triggers get executed before an object of the given class enters a specified state (coming from another state)
+
the "OnStateLeave" triggers get executed when an object of the given class is leaving a specified state
+
+
+
+Actions define the actions to be performed when the triggers execute. For now there is only one kind of action consisting in sending an email message.
+Such actions also define the template to be used for sending the email as well as the other parameters of the message like the recipients, importance, etc.
+
+
A special page: email.test.php is available for testing and troubleshooting your PHP mail configuration.
+
To be executed, actions must be associated to triggers.
+When associated with a trigger, each action is given an "order" number, specifying in which order the actions are to be executed.
',
+ 'UI:NotificationsMenu:Triggers' => 'Triggers',
+ 'UI:NotificationsMenu:AvailableTriggers' => 'Available triggers',
+ 'UI:NotificationsMenu:OnCreate' => 'When an object is created',
+ 'UI:NotificationsMenu:OnStateEnter' => 'When an object enters a given state',
+ 'UI:NotificationsMenu:OnStateLeave' => 'When an object leaves a given state',
+ 'UI:NotificationsMenu:Actions' => 'Actions',
+ 'UI:NotificationsMenu:AvailableActions' => 'Available actions',
'UI:RunQueriesMenu' => 'Run Queries',
'UI:RunQueriesMenu+' => 'Run any query',
diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php
index df86e6d57..75ba37264 100644
--- a/dictionaries/fr.dictionary.itop.ui.php
+++ b/dictionaries/fr.dictionary.itop.ui.php
@@ -738,6 +738,30 @@ Dict::Add('FR FR', 'French', 'Français', array(
'UI:NotificationsMenu' => 'Notifications',
'UI:NotificationsMenu+' => 'Configuration des Notifications',
+ 'UI:NotificationsMenu:Title' => 'Configuration des Notifications',
+ 'UI:NotificationsMenu:Help' => 'Aide',
+ 'UI:NotificationsMenu:HelpContent' => '
Dans iTop les notifications sont totalement configurables. Elles sont basées sur deux types d\'objets: déclencheurs et actions.
+
Les déclencheurs définissent quand une notification doit être exécutée. Il y a 3 types de déclencheurs pour couvrir les 3 différentes phases de la vie d\'un objet:
+
+
un déclencheur "OnCreate" est exécuté quand un objet d\'une classe spécifique est créé.
+
un déclencheur "OnEnter" est exécuté avant que l\'objet n\'entre dans un état donné (en venant d\'un autre état du cycle de vie)
+
un déclencheur "OnLeave" est exécuté quand l\'objet quitte un état spécifié
+
+
+
+Les actions définissent ce qui doit être exécuté. Pour le moment il existe un seul type d\'action: l\'envoi de mail.
+Les actions de type mail définissent le modèle du message ainsi que les autres paramètres (destinataires, importance, etc.)
+
Une page spéciale: email.test.php permet de tester votre configuration mail PHP.
+
Les actions doivent être associées à des déclencheurs pour pouvoir être exécutées.
+Lors de l\'association à un déclencheur, on attribue à chaque action un numéro d\'ordre, qui définit la séquence des actions à exécuter.
',
+ 'UI:NotificationsMenu:Triggers' => 'Déclencheurs',
+ 'UI:NotificationsMenu:AvailableTriggers' => 'Déclencheurs existants',
+ 'UI:NotificationsMenu:OnCreate' => 'A la création d\'un objet',
+ 'UI:NotificationsMenu:OnStateEnter' => 'Quand un objet entre dans un état donné',
+ 'UI:NotificationsMenu:OnStateLeave' => 'Quand un objet quitte un état donné',
+ 'UI:NotificationsMenu:Actions' => 'Actions',
+ 'UI:NotificationsMenu:AvailableActions' => 'Actions existantes',
+
'UI:RunQueriesMenu' => 'Requêtes OQL',
'UI:RunQueriesMenu+' => 'Executer une requête OQL',
diff --git a/setup/data/structure/1.menus.xml b/setup/data/structure/1.menus.xml
index 7d5c5bf88..79424b2a1 100644
--- a/setup/data/structure/1.menus.xml
+++ b/setup/data/structure/1.menus.xml
@@ -439,54 +439,40 @@
UI.php
-<div class="page_header" style="padding:0.5em;">
-<h1>Configuration of the <span class="hilite">Notifications</span></h1>
-</div>
-<itoptoggle name="Help" open="true">
-<div style="padding: 1em; font-size:1.25em;background:#E8F3CF;margin-top: 0.25em;">
-<img src="../images/bell.png" style="margin-top: -60px; margin-right: 10px; float: right;">
-<p>In iTop the notifications are fully customizable. They are based on two sets of objects: <i>triggers and actions</i>.</p>
-<p><i><b>Triggers</b></i> define when a notification will be executed. There are 3 types of triggers for covering 3 differents phases of an object life cycle:
-<ol>
- <li>the 'OnCreate' triggers get executed when an object of the specified class is created</li>
- <li>the 'OnStateEnter' triggers get executed before an object of the given class enters a specified state (coming from another state)</li>
- <li>the 'OnStateLeave' triggers get executed when an object of the given class is leaving a specified state</li>
-</ol>
-</p>
-<p>
-<i><b>Actions</b></i> define the actions to be performed when the triggers execute. For now there is only one kind of action consisting in sending an email message.
-Such actions also define the template to be used for sending the email as well as the other parameters of the message like the recipients, importance, etc.
-</p>
-<p>A special page: <a href="../setup/email.test.php" target="_blank">email.test.php</a> is available for testing and troubleshooting your PHP mail configuration.</p>
-<p>To be executed, actions must be associated to triggers.
-When associated with a trigger, each action is given an 'order' number, specifying in which order the actions are to be executed.</p>
-</div>
-</itoptoggle>
-<p> </p>
-<itoptabs>
- <itoptab name="Triggers">
- <h3>Available Triggers</h3>
- <table style="border:0;border-spacing:10px;width:100%;">
- <tr>
- <td style="vertical-align:top;width:33%;padding:10px;background:#f8f8f8;">
- <h4>When an object is created</h4>
- <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT TriggerOnObjectCreate</itopblock>
- </td>
- <td style="vertical-align:top;width:33%;padding:10px;background:#f8f8f8;">
- <h4>When an object enters a state</h4>
- <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT TriggerOnStateEnter</itopblock>
- </td>
- <td style="vertical-align:top;width:33%;padding:10px;background:#f8f8f8;">
- <h4>When an object leaves a state</h4>
- <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT TriggerOnStateLeave</itopblock>
- </td>
- </tr>
- </table>
- </itoptab>
- <itoptab name="Actions">
- <h3>Available Actions</h3>
- <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT ActionEmail</itopblock>
- </itoptab>
+<div class="page_header" style="padding:0.5em;">
+<h1><itopstring>UI:NotificationsMenu:Title</itopstring></h1>
+</div>
+<itoptoggle name="UI:NotificationsMenu:Help" open="true">
+<div style="padding: 1em; font-size:1.25em;background:#E8F3CF;margin-top: 0.25em;">
+<img src="../images/bell.png" style="margin-top: -60px; margin-right: 10px; float: right;">
+<itopstring>UI:NotificationsMenu:HelpContent</itopstring>
+</div>
+</itoptoggle>
+<p> </p>
+<itoptabs>
+ <itoptab name="UI:NotificationsMenu:Triggers">
+ <h2><itopstring>UI:NotificationsMenu:AvailableTriggers</itopstring></h2>
+ <table style="border:0;border-spacing:10px;width:100%;">
+ <tr>
+ <td style="vertical-align:top;width:33%;padding:10px;background:#f8f8f8;">
+ <h3><itopstring>UI:NotificationsMenu:OnCreate</itopstring></h3>
+ <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT TriggerOnObjectCreate</itopblock>
+ </td>
+ <td style="vertical-align:top;width:33%;padding:10px;background:#f8f8f8;">
+ <h3><itopstring>UI:NotificationsMenu:OnStateEnter</itopstring></h3>
+ <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT TriggerOnStateEnter</itopblock>
+ </td>
+ <td style="vertical-align:top;width:33%;padding:10px;background:#f8f8f8;">
+ <h3><itopstring>UI:NotificationsMenu:OnStateLeave</itopstring></h3>
+ <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT TriggerOnStateLeave</itopblock>
+ </td>
+ </tr>
+ </table>
+ </itoptab>
+ <itoptab name="UI:NotificationsMenu:Actions">
+ <h2><itopstring>UI:NotificationsMenu:AvailableActions</itopstring></h2>
+ <itopblock BlockClass="DisplayBlock" type="list" asynchronous="false" encoding="text/oql">SELECT ActionEmail</itopblock>
+ </itoptab>
</itoptabs>
administrator2