Index: include/locales/en_gb.inc.php
===================================================================
--- include/locales/en_gb.inc.php	(revision 9731)
+++ include/locales/en_gb.inc.php	(working copy)
@@ -1792,6 +1792,36 @@
 	'S_G'=>			'G',
 	'S_T'=>			'T',
 
+//	hosts.inc.php
+	'S_CANNOT_EXISTS_WITHOUT_GROUP'=>		'can not exist without group',
+	'S_ADDED_HOST_GROUP'=>				'Added host group',
+	'S_UPDATED_HOST_GROUP'=>			'Updated host group',
+	'S_INCORRECT_CHARACTERS_USED_FOR_HOSTNAME'=>	'Incorrect characters used for Hostname',
+	'S_INCORRECT_CHARACTERS_USED_FOR_DNS'=>		'Incorrect characters used for DNS',
+	'S_CIRCULAR_LINK_CANNOT_BE_CREATED'=>		'Circular link can not be created',
+	'S_MUST_LINKED_LEAST_ONE_HOST_GROUPS_SMALL'=>	'must be linked to at least one host group',
+	'S_ADDED_NEW_HOST'=>				'Added new host',
+	'S_INTERNAL_AND_CANNOT_DELETED_SMALL'=>		'is internal and can not be deleted',
+	'S_CANNOT_DELETED_INNER_HOSTS_CANNOT_UNLINKED_SMALL'=>'can not be deleted, due to inner hosts can not be unlinked',
+	'S_NO_HOST_GROUPS_WITH'=>			'No host groups with',
+	'S_INCORRECT_PARAMETERS_FOR'=>			'incorrect parameters for',
+	'S_NO_HOST_WITH'=>				'No host with',
+	'S_UPDATED_STATUS_FOR_HOST'=>			'Updated status of host',
+	'S_ALREADY_EXISTS_IN_LINKED_HOSTS_SMALL'=>	'already exist in linked hosts',
+	'S_ADDED_NEW_APPLICATION'=>			'Added new application',
+	'S_UPDATED_APPLICATION'=>			'Updated application',
+	'S_USED_BY_ITEM_SMALL'=>			'used by item',
+	'S_DELETED_SMALL'=>				'deleted',
+	'S_USED_BY_SCENARIO_SMALL'=>			'used by scenario',
+	'S_NO_APPLICATION_WITH'=>			'No application with',
+	'S_UNLINKED_SMALL'=>				'unlinked',
+	'S_TEMPLATE_WITH_ITEM_KEY'=>			'Template with item key',
+	'S_ALREADY_LINKED_TO_HOST_SMALL'=>		'already linked to the host',
+	
+	
+	
+	
+
 //	Menu
 
 	'S_HELP'=>				'Help',
Index: include/hosts.inc.php
===================================================================
--- include/hosts.inc.php	(revision 9731)
+++ include/hosts.inc.php	(working copy)
@@ -45,7 +45,7 @@
 
 		foreach($err_hostids as $num => $hostid){
 			$host = get_host_by_hostid($hostid);
-			error('Host "'.$host['host'].'" can not exist without group');
+			error(S_HOST.SPACE.'"'.$host['host'].'"'.SPACE.S_CANNOT_EXISTS_WITHOUT_GROUP);
 
 			return false;
 		}
@@ -96,7 +96,7 @@
 
 		add_audit_ext(AUDIT_ACTION_ADD, AUDIT_RESOURCE_HOST_GROUP, $groupid, $name, 'groups', NULL, NULL);
 
-		info('Added host group ['.$name.']');
+		info(S_ADDED_HOST_GROUP.SPACE.'['.$name.']');
 		if(!empty($hosts))
 			update_host_groups_by_groupid($groupid, $hosts);
 
@@ -116,7 +116,7 @@
 
 		$hostgroup_new = get_hostgroup_by_groupid($groupid);
 		add_audit_ext(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_HOST_GROUP, $groupid, $hostgroup_old['name'], 'groups', $hostgroup_old, $hostgroup_new);
-		info('Updated host group ['.$name.']');
+		info(S_UPDATED_HOST_GROUP.SPACE.'['.$name.']');
 		if(!empty($hosts))
 			$result = update_host_groups_by_groupid($groupid,$hosts);
 
@@ -173,13 +173,13 @@
 
 // if(!eregi('^'.ZBX_EREG_HOST_FORMAT.'$', $host)){
 		if(!preg_match('/^'.ZBX_PREG_HOST_FORMAT.'$/i', $host)){
-			error('Incorrect characters used for Hostname');
+			error(S_INCORRECT_CHARACTERS_USED_FOR_HOSTNAME);
 			return false;
 		}
 
 // if(!empty($dns) && !eregi('^'.ZBX_EREG_DNS_FORMAT.'$', $dns)){
  		if(!empty($dns) && !preg_match('/^'.ZBX_PREG_DNS_FORMAT.'$/i', $dns)){
-			error('Incorrect characters used for DNS');
+			error(S_INCORRECT_CHARACTERS_USED_FOR_DNS);
 			return false;
 		}
 
@@ -191,7 +191,7 @@
 					' AND status IN ('.HOST_STATUS_MONITORED.','.HOST_STATUS_NOT_MONITORED.','.HOST_STATUS_TEMPLATE.')'.
 					(isset($hostid)?' AND h.hostid<>'.$hostid:'');
 		if(DBfetch(DBselect($sql))){
-			error('Host "'.$host.'" already exists');
+			error(S_HOST.SPACE.'"'.$host.'"'.SPACE.S_ALREADY_EXISTS_SMALL);
 			return false;
 		}
 
@@ -209,7 +209,7 @@
 		}
 		else{
 			if(check_circle_host_link($hostid, $templates)){
-				error('Circular link can not be created');
+				error(S_CIRCULAR_LINK_CANNOT_BE_CREATED);
 				return false;
 			}
 
@@ -266,7 +266,7 @@
 						$newgroup,$groups)
 	{
 		if(zbx_empty($newgroup) && (count($groups) == 0)){
-			info('Host must be linked to at least one host group');
+			info(S_HOST.SPACE.S__MUST_LINKED_LEAST_ONE_HOST_GROUP_SMALL);
 			return false;
 		}
 
@@ -281,7 +281,7 @@
 		if(!$hostid)
 			return $hostid;
 		else
-			info('Added new host ['.$host.']');
+			info(S_ADDED_NEW_HOST.'['.$host.']');
 
 		if(!zbx_empty($newgroup)){
 			$newgroup = CHostGroup::create(array('name' => $newgroup));
@@ -290,7 +290,7 @@
 			else return false;
 
 			add_audit_ext(AUDIT_ACTION_ADD, AUDIT_RESOURCE_HOST_GROUP, $newgroup['groupid'], $newgroup['name'], 'groups', NULL, NULL);
-			info('Added host group ['.$newgroup['name'].']');
+			info(S_ADDED_HOST_GROUP.SPACE.'['.$newgroup['name'].']');
 			$groups[] = array('groupid' => $newgroup['groupid']);
 		}
 
@@ -353,7 +353,7 @@
 							$newgroup,$groups)
 	{
 		if(zbx_empty($newgroup) && (count($groups) == 0)){
-			info('Host "'.$host.'" must be linked to at least one host group');
+			info(S_HOST.SPACE.'"'.$host.'"'.SPACE.S_MUST_LINKED_LEAST_ONE_HOST_GROUPS_SMALL);
 			return false;
 		}
 
@@ -636,9 +636,9 @@
 				if(!isset($dlt_groupids[$groupid])){
 					$group = get_hostgroup_by_groupid($groupid);
 					if($group['internal'] == ZBX_INTERNAL_GROUP)
-						error('Group "'.$group['name'].'" is internal and can not be deleted');
+						error(S_GROUP.SPACE.'"'.$group['name'].'"'.SPACE.S_INTERNAL_AND_CANNOT_DELETED_SMALL);
 					else
-						error('Group "'.$group['name'].'" can not be deleted, due to inner hosts can not be unlinked');
+						error(S_GROUP.SPACE.'"'.$group['name'].'"'.SPACE.S_CANNOT_DELETED_INNER_HOSTS_CANNOT_UNLINKED_SMALL);
 				}
 			}
 			return false;
@@ -712,7 +712,7 @@
 		if($row){
 			return $row;
 		}
-		error("No host groups with groupid=[$groupid]");
+		error(S_NO_HOST_GROUPS_WITH." groupid=[$groupid]");
 		return  false;
 	}
 
@@ -731,7 +731,7 @@
 
 	function db_save_proxy($name,$proxyid=null){
 		if(!is_string($name)){
-			error("incorrect parameters for 'db_save_proxy'");
+			error(S_INCORRECT_PARAMETERS_FOR." 'db_save_proxy'");
 			return false;
 		}
 
@@ -744,7 +744,7 @@
 					' and hostid<>'.$proxyid);
 
 		if(DBfetch($result)){
-			error("Proxy '$name' already exists");
+			error(S_PROXY.SPACE."'$name'".SPACE.S_ALREADY_EXISTS_SMALL);
 			return false;
 		}
 
@@ -859,7 +859,7 @@
 			return $row;
 		}
 		if($no_error_message == 0)
-			error('No host with hostid=['.$hostid.']');
+			error(S_NO_HOST_WITH.' with hostid=['.$hostid.']');
 
 	return	false;
 	}
@@ -893,7 +893,7 @@
 					$host_new['status'] = $status;
 					add_audit_ext(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_HOST, $host['hostid'], $host['host'], 'hosts', $host, $host_new);
 				}
-				info('Updated status of host '.$host['host']);
+				info(S_UPDATED_STATUS_FOR_HOST.SPACE.$host['host']);
 			}
 		}
 
@@ -1606,7 +1606,7 @@
 				AND '.DBcondition('hostid', $hostids);
 		$lower_app = DBfetch(DBselect($sql));
 		if($lower_app){
-			error("Application '$name' already exist in linked hosts");
+			error(S_APPLICATION.SPACE."'$name'".SPACE.S_ALREADY_EXISTS_IN_LINKED_HOSTS_SMALL);
 			return false;
 		}
 
@@ -1621,7 +1621,7 @@
 		$db_app = DBfetch(DBselect($sql));
 
 		if($db_app && $templateid == 0){
-			error("Application '$name' already exists");
+			error(S_APPLICATION.SPACE."'$name'".SPACE.S_ALREADY_EXISTS_SMALL);
 			return false;
 		}
 
@@ -1640,7 +1640,7 @@
 			$sql = 'INSERT INTO applications (applicationid, name, hostid, templateid) '.
 				" VALUES ($applicationid_new, ".zbx_dbstr($name).", $hostid, $templateid)";
 			if($result = DBexecute($sql)){
-				info('Added new application '.$host['host'].':'.$name);
+				info(S_ADDED_NEW_APPLICATION.SPACE.$host['host'].':'.$name);
 			}
 		}
 		else{
@@ -1648,7 +1648,7 @@
 			$result = DBexecute('UPDATE applications SET name='.zbx_dbstr($name).', hostid='.$hostid.', templateid='.$templateid.
 				' WHERE applicationid='.$applicationid);
 			if($result)
-				info('Updated application '.$host['host'].':'.$old_app['name']);
+				info(S_UPDATED_APPLICATION.SPACE.$host['host'].':'.$old_app['name']);
 		}
 
 		if(!$result) return $result;
@@ -1751,7 +1751,7 @@
 				' WHERE '.DBcondition('ht.applicationid',$applicationids);
 		$res = DBselect($sql);
 		if($info = DBfetch($res)){
-			info('Application "'.$apps[$info['applicationid']]['host'].':'.$apps[$info['applicationid']]['name'].'" used by scenario "'.$info['name'].'"');
+			info(S_APPLICATION.SPACE.'"'.$apps[$info['applicationid']]['host'].':'.$apps[$info['applicationid']]['name'].'"'.SPACE.S_USED_BY_SCENARIO_SMALL.SPACE.'"'.$info['name'].'"');
 			return false;
 		}
 
@@ -1762,7 +1762,7 @@
 					' AND '.DBcondition('ia.applicationid',$applicationids);
 		$res = DBselect($sql);
 		if($info = DBfetch($res)){
-			info('Application "'.$host['host'].':'.$app['name'].'" used by item "'.item_description($info).'"');
+			info(S_APPLICATION.SPACE.'"'.$host['host'].':'.$app['name'].'"'.SPACE.S_USED_BY_ITEM_SMALL.SPACE.'"'.item_description($info).'"');
 			return false;
 		}
 
@@ -1771,7 +1771,7 @@
 
 		if($result){
 			foreach($apps as $appid => $app){
-				info('Application "'.$app['host'].':'.$app['name'].'" deleted');
+				info(S_APPLICATION.SPACE.'"'.$app['host'].':'.$app['name'].'"'.SPACE.S_DELETED_SMALL);
 			}
 		}
 
@@ -1786,7 +1786,7 @@
 			return $row;
 		}
 		if($no_error_message == 0)
-			error("No application with id=[$applicationid]");
+			error(S_NO_APPLICATION_WITH." id=[$applicationid]");
 		return	false;
 
 	}
@@ -1811,7 +1811,7 @@
 		{
 			return $row;
 		}
-		error("No host with applicationid=[$applicationid]");
+		error(S_NO_HOST_WITH." applicationid=[$applicationid]");
 		return	false;
 	}
 
@@ -1860,7 +1860,7 @@
 
 			if($unlink_mode){
 				if(DBexecute("update applications set templateid=0 where applicationid=".$db_app["applicationid"])){
-					info("Application '".$db_app["name"]."' unlinked");
+					info(S_APPLICATION.SPACE."'".$db_app["name"]."'".SPACE.S_UNLINKED_SMALL);
 				}
 			}
 			else{
@@ -1933,7 +1933,7 @@
 		while($db_cnt = DBfetch($res)){
 			if($db_cnt['cnt']>1){
 				$result &= false;
-				error('Template with item key ['.htmlspecialchars($db_cnt['key_']).'] already linked to the host');
+				error(S_TEMPLATE_WITH_ITEM_KEY.SPACE.'['.htmlspecialchars($db_cnt['key_']).']'.SPACE.S_ALREADY_LINKED_TO_HOST_SMALL);
 			}
 		}
 
@@ -1947,7 +1947,7 @@
 		while($db_cnt = DBfetch($res)){
 			if($db_cnt['cnt']>1){
 				$result &= false;
-				error('Template with application ['.htmlspecialchars($db_cnt['name']).'] already linked to the host');
+				error(S_TEMPLATE_WITH_ITEM_KEY.SPACE.'['.htmlspecialchars($db_cnt['name']).']'.SPACE.S_ALREADY_LINKED_TO_HOST_SMALL);
 			}
 		}
 
@@ -1982,7 +1982,7 @@
 
 		$result=DBselect('SELECT * FROM hosts_profiles WHERE hostid='.$hostid);
 		if(DBfetch($result)){
-			error('Host profile already exists');
+			error(S_HOST_PROFILE.SPACE.S_ALREADY_EXISTS);
 			return 0;
 		}
 
@@ -2023,7 +2023,7 @@
 
 		$result=DBselect('SELECT * FROM hosts_profiles_ext WHERE hostid='.$hostid);
 		if(DBfetch($result)){
-			error('Host profile already exists');
+			error(S_HOST_PROFILE.SPACE.S_ALREADY_EXISTS);
 			return false;
 		}
 
