Browse Source

- Localization of the "Notifications" menu

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@443 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 15 years ago
parent
commit
796d25cc8b

+ 2 - 2
application/template.class.inc.php

@@ -169,7 +169,7 @@ class DisplayTemplate
 			break;
 			break;
 			
 			
 			case 'itoptab':
 			case 'itoptab':
-				$oPage->SetCurrentTab(str_replace('_', ' ', $aAttributes['name']));
+				$oPage->SetCurrentTab(Dict::S(str_replace('_', ' ', $aAttributes['name'])));
 				$oTemplate = new DisplayTemplate($sContent);
 				$oTemplate = new DisplayTemplate($sContent);
 				$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
 				$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
 				//$oPage->p('iTop Tab Content:<pre>'.htmlentities($sContent).'</pre>');
 				//$oPage->p('iTop Tab Content:<pre>'.htmlentities($sContent).'</pre>');
@@ -179,7 +179,7 @@ class DisplayTemplate
 			case 'itoptoggle':
 			case 'itoptoggle':
 				$sName = isset($aAttributes['name']) ? $aAttributes['name'] : 'Tagada';
 				$sName = isset($aAttributes['name']) ? $aAttributes['name'] : 'Tagada';
 				$bOpen = isset($aAttributes['open']) ? $aAttributes['open'] : true;
 				$bOpen = isset($aAttributes['open']) ? $aAttributes['open'] : true;
-				$oPage->StartCollapsibleSection($sName, $bOpen);
+				$oPage->StartCollapsibleSection(Dict::S($sName), $bOpen);
 				$oTemplate = new DisplayTemplate($sContent);
 				$oTemplate = new DisplayTemplate($sContent);
 				$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
 				$oTemplate->Render($oPage, array()); // no params to apply, they have already been applied
 				//$oPage->p('iTop Tab Content:<pre>'.htmlentities($sContent).'</pre>');
 				//$oPage->p('iTop Tab Content:<pre>'.htmlentities($sContent).'</pre>');

+ 24 - 0
dictionaries/dictionary.itop.ui.php

@@ -740,6 +740,30 @@ Dict::Add('EN US', 'English', 'English', array(
 	
 	
 	'UI:NotificationsMenu' => 'Notifications',
 	'UI:NotificationsMenu' => 'Notifications',
 	'UI:NotificationsMenu+' => 'Configuration of the Notifications',
 	'UI:NotificationsMenu+' => 'Configuration of the Notifications',
+	'UI:NotificationsMenu:Title' => 'Configuration of the <span class="hilite">Notifications</span>',
+	'UI:NotificationsMenu:Help' => 'Help',
+	'UI:NotificationsMenu:HelpContent' => '<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>',
+	'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 Queries',
 	'UI:RunQueriesMenu+' => 'Run any query',
 	'UI:RunQueriesMenu+' => 'Run any query',

+ 24 - 0
dictionaries/fr.dictionary.itop.ui.php

@@ -738,6 +738,30 @@ Dict::Add('FR FR', 'French', 'Français', array(
 		
 		
 	'UI:NotificationsMenu' => 'Notifications',
 	'UI:NotificationsMenu' => 'Notifications',
 	'UI:NotificationsMenu+' => 'Configuration des Notifications',
 	'UI:NotificationsMenu+' => 'Configuration des Notifications',
+	'UI:NotificationsMenu:Title' => 'Configuration des <span class="hilite">Notifications</span>',
+	'UI:NotificationsMenu:Help' => 'Aide',
+	'UI:NotificationsMenu:HelpContent' => '<p>Dans iTop les notifications sont totalement configurables. Elles sont basées sur deux types d\'objets: <i>déclencheurs et actions</i>.</p>
+<p><i><b>Les déclencheurs</b></i> 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:
+<ol>
+	<li>un déclencheur "OnCreate" est exécuté quand un objet d\'une classe spécifique est créé.</li>
+	<li>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)</li>
+	<li>un déclencheur "OnLeave" est exécuté  quand l\'objet quitte un état spécifié</li>
+</ol>
+</p>
+<p>
+<i><b>Les actions</b></i> 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.)</p>
+<p>Une page spéciale: <a href="../setup/email.test.php" target="_blank">email.test.php</a> permet de tester votre configuration mail PHP.</p>
+<p>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.</p>',
+	'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' => 'Requêtes OQL',
 	'UI:RunQueriesMenu+' => 'Executer une requête OQL',
 	'UI:RunQueriesMenu+' => 'Executer une requête OQL',

+ 34 - 48
setup/data/structure/1.menus.xml

@@ -439,54 +439,40 @@
 <label>UI:NotificationsMenu+</label>
 <label>UI:NotificationsMenu+</label>
 <hyperlink>UI.php</hyperlink>
 <hyperlink>UI.php</hyperlink>
 <icon_path></icon_path>
 <icon_path></icon_path>
-<template>&lt;div class=&quot;page_header&quot; style=&quot;padding:0.5em;&quot;&gt;
-&lt;h1&gt;Configuration of the &lt;span class=&quot;hilite&quot;&gt;Notifications&lt;/span&gt;&lt;/h1&gt;
-&lt;/div&gt;
-&lt;itoptoggle name=&quot;Help&quot; open=&quot;true&quot;&gt;
-&lt;div style=&quot;padding: 1em; font-size:1.25em;background:#E8F3CF;margin-top: 0.25em;&quot;&gt;
-&lt;img src=&quot;../images/bell.png&quot; style=&quot;margin-top: -60px; margin-right: 10px; float: right;&quot;&gt;
-&lt;p&gt;In iTop the notifications are fully customizable. They are based on two sets of objects: &lt;i&gt;triggers and actions&lt;/i&gt;.&lt;/p&gt;
-&lt;p&gt;&lt;i&gt;&lt;b&gt;Triggers&lt;/b&gt;&lt;/i&gt; define when a notification will be executed. There are 3 types of triggers for covering 3 differents phases of an object life cycle:
-&lt;ol&gt;
-	&lt;li&gt;the &apos;OnCreate&apos; triggers get executed when an object of the specified class is created&lt;/li&gt;
-	&lt;li&gt;the &apos;OnStateEnter&apos; triggers get executed before an object of the given class enters a specified state (coming from another state)&lt;/li&gt;
-	&lt;li&gt;the &apos;OnStateLeave&apos; triggers get executed when an object of the given class is leaving a specified state&lt;/li&gt;
-&lt;/ol&gt;
-&lt;/p&gt;
-&lt;p&gt;
-&lt;i&gt;&lt;b&gt;Actions&lt;/b&gt;&lt;/i&gt; 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.
-&lt;/p&gt;
-&lt;p&gt;A special page: &lt;a href=&quot;../setup/email.test.php&quot; target=&quot;_blank&quot;&gt;email.test.php&lt;/a&gt; is available for testing and troubleshooting your PHP mail configuration.&lt;/p&gt;
-&lt;p&gt;To be executed, actions must be associated to triggers.
-When associated with a trigger, each action is given an &apos;order&apos; number, specifying in which order the actions are to be executed.&lt;/p&gt;
-&lt;/div&gt;
-&lt;/itoptoggle&gt;
-&lt;p&gt;&amp;nbsp;&lt;/p&gt;
-&lt;itoptabs&gt;
-	&lt;itoptab name=&quot;Triggers&quot;&gt;
-		&lt;h3&gt;Available Triggers&lt;/h3&gt;
-		&lt;table style=&quot;border:0;border-spacing:10px;width:100%;&quot;&gt;
-		&lt;tr&gt;
-		&lt;td style=&quot;vertical-align:top;width:33%;padding:10px;background:#f8f8f8;&quot;&gt;
-		&lt;h4&gt;When an object is created&lt;/h4&gt;
-		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT TriggerOnObjectCreate&lt;/itopblock&gt;
-		&lt;/td&gt;
-		&lt;td style=&quot;vertical-align:top;width:33%;padding:10px;background:#f8f8f8;&quot;&gt;
-		&lt;h4&gt;When an object enters a state&lt;/h4&gt;
-		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT TriggerOnStateEnter&lt;/itopblock&gt;
-		&lt;/td&gt;
-		&lt;td style=&quot;vertical-align:top;width:33%;padding:10px;background:#f8f8f8;&quot;&gt;
-		&lt;h4&gt;When an object leaves a state&lt;/h4&gt;
-		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT TriggerOnStateLeave&lt;/itopblock&gt;
-		&lt;/td&gt;
-		&lt;/tr&gt;
-		&lt;/table&gt;
-	&lt;/itoptab&gt;
-	&lt;itoptab name=&quot;Actions&quot;&gt;
-		&lt;h3&gt;Available Actions&lt;/h3&gt;
-		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT ActionEmail&lt;/itopblock&gt;
-	&lt;/itoptab&gt;
+<template>&lt;div class=&quot;page_header&quot; style=&quot;padding:0.5em;&quot;&gt;
+&lt;h1&gt;&lt;itopstring&gt;UI:NotificationsMenu:Title&lt;/itopstring&gt;&lt;/h1&gt;
+&lt;/div&gt;
+&lt;itoptoggle name=&quot;UI:NotificationsMenu:Help&quot; open=&quot;true&quot;&gt;
+&lt;div style=&quot;padding: 1em; font-size:1.25em;background:#E8F3CF;margin-top: 0.25em;&quot;&gt;
+&lt;img src=&quot;../images/bell.png&quot; style=&quot;margin-top: -60px; margin-right: 10px; float: right;&quot;&gt;
+&lt;itopstring&gt;UI:NotificationsMenu:HelpContent&lt;/itopstring&gt;
+&lt;/div&gt;
+&lt;/itoptoggle&gt;
+&lt;p&gt;&amp;nbsp;&lt;/p&gt;
+&lt;itoptabs&gt;
+	&lt;itoptab name=&quot;UI:NotificationsMenu:Triggers&quot;&gt;
+		&lt;h2&gt;&lt;itopstring&gt;UI:NotificationsMenu:AvailableTriggers&lt;/itopstring&gt;&lt;/h2&gt;
+		&lt;table style=&quot;border:0;border-spacing:10px;width:100%;&quot;&gt;
+		&lt;tr&gt;
+		&lt;td style=&quot;vertical-align:top;width:33%;padding:10px;background:#f8f8f8;&quot;&gt;
+		&lt;h3&gt;&lt;itopstring&gt;UI:NotificationsMenu:OnCreate&lt;/itopstring&gt;&lt;/h3&gt;
+		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT TriggerOnObjectCreate&lt;/itopblock&gt;
+		&lt;/td&gt;
+		&lt;td style=&quot;vertical-align:top;width:33%;padding:10px;background:#f8f8f8;&quot;&gt;
+		&lt;h3&gt;&lt;itopstring&gt;UI:NotificationsMenu:OnStateEnter&lt;/itopstring&gt;&lt;/h3&gt;
+		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT TriggerOnStateEnter&lt;/itopblock&gt;
+		&lt;/td&gt;
+		&lt;td style=&quot;vertical-align:top;width:33%;padding:10px;background:#f8f8f8;&quot;&gt;
+		&lt;h3&gt;&lt;itopstring&gt;UI:NotificationsMenu:OnStateLeave&lt;/itopstring&gt;&lt;/h3&gt;
+		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT TriggerOnStateLeave&lt;/itopblock&gt;
+		&lt;/td&gt;
+		&lt;/tr&gt;
+		&lt;/table&gt;
+	&lt;/itoptab&gt;
+	&lt;itoptab name=&quot;UI:NotificationsMenu:Actions&quot;&gt;
+		&lt;h2&gt;&lt;itopstring&gt;UI:NotificationsMenu:AvailableActions&lt;/itopstring&gt;&lt;/h2&gt;
+		&lt;itopblock BlockClass=&quot;DisplayBlock&quot; type=&quot;list&quot; asynchronous=&quot;false&quot; encoding=&quot;text/oql&quot;&gt;SELECT ActionEmail&lt;/itopblock&gt;
+	&lt;/itoptab&gt;
 &lt;/itoptabs&gt;</template>
 &lt;/itoptabs&gt;</template>
 <type>administrator</type>
 <type>administrator</type>
 <rank>2</rank>
 <rank>2</rank>