From f4ca4fedd6f501293173d2ab4b4a730f75d4c467 Mon Sep 17 00:00:00 2001
From: Guy Brand <gb@unistra.fr>
Date: Sat, 16 Apr 2011 15:14:19 +0200
Subject: [PATCH] Removed hard coded strings from plugin manager

---
 lib/plugins/plugin/classes/ap_delete.class.php   | 2 +-
 lib/plugins/plugin/classes/ap_download.class.php | 2 +-
 lib/plugins/plugin/lang/en/lang.php              | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/plugins/plugin/classes/ap_delete.class.php b/lib/plugins/plugin/classes/ap_delete.class.php
index 231147479..581a6295f 100644
--- a/lib/plugins/plugin/classes/ap_delete.class.php
+++ b/lib/plugins/plugin/classes/ap_delete.class.php
@@ -6,7 +6,7 @@ class ap_delete extends ap_manage {
         if (!$this->dir_delete(DOKU_PLUGIN.plugin_directory($this->manager->plugin))) {
             $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin);
         } else {
-            msg("Plugin {$this->manager->plugin} successfully deleted.");
+            msg(sprintf($this->lang['deleted'],$this->plugin));
             $this->refresh();
         }
     }
diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php
index 784095aaf..e3afd142a 100644
--- a/lib/plugins/plugin/classes/ap_download.class.php
+++ b/lib/plugins/plugin/classes/ap_download.class.php
@@ -114,7 +114,7 @@ class ap_download extends ap_manage {
         if ($tmp) $this->dir_delete($tmp);
 
         if (!$this->manager->error) {
-            msg('Plugin package ('.count($this->downloaded).' plugin'.(count($this->downloaded) != 1?'s':'').': '.join(',',$this->downloaded).') successfully installed.',1);
+            msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), (count($this->downloaded) != 1?'s':''), join(',',$this->downloaded)),1);
             $this->refresh();
             return true;
         }
diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php
index ccbd207e9..437c168bd 100644
--- a/lib/plugins/plugin/lang/en/lang.php
+++ b/lib/plugins/plugin/lang/en/lang.php
@@ -73,5 +73,6 @@ $lang['enabled']          = 'Plugin %s enabled.';
 $lang['notenabled']       = 'Plugin %s could not be enabled, check file permissions.';
 $lang['disabled']         = 'Plugin %s disabled.';
 $lang['notdisabled']      = 'Plugin %s could not be disabled, check file permissions.';
+$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) successfully installed.';
 
 //Setup VIM: ex: et ts=4 :
-- 
GitLab