瀏覽代碼

#741 Complete localization of the CSV import confirmation dialog

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2915 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 年之前
父節點
當前提交
6708e2a90c
共有 3 個文件被更改,包括 32 次插入11 次删除
  1. 9 1
      dictionaries/dictionary.itop.ui.php
  2. 8 1
      dictionaries/fr.dictionary.itop.ui.php
  3. 15 9
      pages/csvimport.php

+ 9 - 1
dictionaries/dictionary.itop.ui.php

@@ -1175,6 +1175,14 @@ When associated with a trigger, each action is given an "order" number, specifyi
 	'Class:ShortcutOQL+' => '',
 	'Class:ShortcutOQL/Attribute:oql' => 'Query',
 	'Class:ShortcutOQL/Attribute:oql+' => 'OQL defining the list of objects to search for',
-	'UI:FillAllMandatoryFields' => 'Please fill all mandatory fields.'
+	'UI:FillAllMandatoryFields' => 'Please fill all mandatory fields.',
+	
+	'UI:CSVImportConfirmTitle' => 'Please confirm the operation',
+	'UI:CSVImportConfirmMessage' => 'Are you sure you want to do this?',
+	'UI:CSVImportError_items' => 'Errors: %1$d',
+	'UI:CSVImportCreated_items' => 'Created: %1$d',
+	'UI:CSVImportModified_items' => 'Modified: %1$d',
+	'UI:CSVImportUnchanged_items' => 'Unchanged: %1$d',
+	
 ));
 ?>

+ 8 - 1
dictionaries/fr.dictionary.itop.ui.php

@@ -1017,6 +1017,13 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
 	'Class:ShortcutOQL+' => '',
 	'Class:ShortcutOQL/Attribute:oql' => 'Requête',
 	'Class:ShortcutOQL/Attribute:oql+' => 'Requête de définition de l\'ensemble des objets',
-	'UI:FillAllMandatoryFields' => 'Veuillez remplir tous les champs obligatoires.'
+	'UI:FillAllMandatoryFields' => 'Veuillez remplir tous les champs obligatoires.',
+	
+	'UI:CSVImportConfirmTitle' => 'Veuillez confirmer cette opération',
+	'UI:CSVImportConfirmMessage' => 'Etes-vous sûr(e) de vouloir faire cela ?',
+	'UI:CSVImportError_items' => 'Erreurs: %1$d',
+	'UI:CSVImportCreated_items' => 'Créations: %1$d',
+	'UI:CSVImportModified_items' => 'Modifications: %1$d',
+	'UI:CSVImportUnchanged_items' => 'Inchangés: %1$d',
 ));
 ?>

+ 15 - 9
pages/csvimport.php

@@ -581,9 +581,11 @@ try
 		
 		if ($bShouldConfirm)
 		{
-			$oPage->add('<div id="dlg_confirmation" title="Please confirm the operation">');
+			$sYesButton = Dict::S('UI:Button:Ok');
+			$sNoButton = Dict::S('UI:Button:Cancel');
+			$oPage->add('<div id="dlg_confirmation" title="'.htmlentities(Dict::S('UI:CSVImportConfirmTitle'), ENT_QUOTES, 'UTF-8').'">');
 			$oPage->add('<p style="text-align:center"><b>'.$sMessage.'</b></p>');
-			$oPage->add('<p style="text-align:center">Are you sure you want to do this ?</p>');
+			$oPage->add('<p style="text-align:center">'.htmlentities(Dict::S('UI:CSVImportConfirmMessage'), ENT_QUOTES, 'UTF-8').'</p>');
 			$oPage->add('<div id="confirmation_chart"></div>');
 			$oPage->add('</div> <!-- end of dlg_confirmation -->');
 			$oPage->add_ready_script(
@@ -596,8 +598,8 @@ try
 			autoOpen: false, 
 			buttons:
 			{
-				'Yes': RunImport,
-				'No': CancelImport 
+				'$sYesButton': RunImport,
+				'$sNoButton': CancelImport 
 			} 
 		});
 		swfobject.embedSWF(	"../images/open-flash-chart.swf", 
@@ -611,7 +613,11 @@ EOF
 );
 		}
 		
-		$oPage->add_script(
+		$sErrors = addslashes(Dict::Format('UI:CSVImportError_items', $iUnchanged));
+		$sCreated = addslashes(Dict::Format('UI:CSVImportCreated_items', $iUnchanged));
+		$sModified = addslashes(Dict::Format('UI:CSVImportModified_items', $iUnchanged));
+		$sUnchanged = addslashes(Dict::Format('UI:CSVImportUnchanged_items', $iUnchanged));
+		$oPage->add_script(		
 <<< EOF
 function CSVGoBack()
 {
@@ -694,7 +700,7 @@ function open_flash_chart_data()
 		var oErrors =
 		{
 			"value":  iErrors,
-			"label": "Errors: "+iErrors,
+			"label": "$sErrors",
 			"alpha": fAlpha,
 			"label-colour": "#CC3333",
 		};
@@ -706,7 +712,7 @@ function open_flash_chart_data()
 		var oModified =
 		{
 			"value":  iModified,
-			"label": "Modified: "+iModified,
+			"label": "$sModified",
 			"alpha": fAlpha,
 			"label-colour": "#3333CC",
 		};
@@ -718,7 +724,7 @@ function open_flash_chart_data()
 		var oCreated =
 		{
 			"value":  iCreated,
-			"label": "Created: "+iCreated,
+			"label": "$sCreated",
 			"alpha": fAlpha,
 			"label-colour": "#33CC33",
 			
@@ -731,7 +737,7 @@ function open_flash_chart_data()
 		var oUnchanged =
 		{
 			"value":  iUnchanged,
-			"label": "Unchanged: "+iUnchanged,
+			"label": "$sUnchanged",
 			"alpha": fAlpha,
 			"label-colour": "#333333",