diff --git a/dictionaries/dictionary.itop.ui.php b/dictionaries/dictionary.itop.ui.php index c210ff77b..e05a744e4 100644 --- a/dictionaries/dictionary.itop.ui.php +++ b/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', + )); ?> diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 625dc97c6..467dcbb05 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/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', )); ?> diff --git a/pages/csvimport.php b/pages/csvimport.php index b617a67e0..06e8ad908 100644 --- a/pages/csvimport.php +++ b/pages/csvimport.php @@ -581,9 +581,11 @@ try if ($bShouldConfirm) { - $oPage->add('
'); + $sYesButton = Dict::S('UI:Button:Ok'); + $sNoButton = Dict::S('UI:Button:Cancel'); + $oPage->add('
'); $oPage->add('

'.$sMessage.'

'); - $oPage->add('

Are you sure you want to do this ?

'); + $oPage->add('

'.htmlentities(Dict::S('UI:CSVImportConfirmMessage'), ENT_QUOTES, 'UTF-8').'

'); $oPage->add('
'); $oPage->add('
'); $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",