Index: include/locales/en_gb.inc.php
===================================================================
--- include/locales/en_gb.inc.php	(revision 9555)
+++ include/locales/en_gb.inc.php	(working copy)
@@ -1785,6 +1785,43 @@
 	'S_G'=>			'G',
 	'S_T'=>			'T',
 
+//	triggers.inc.php
+	'S_NO_TRIGGER_WITH'=>					'No trigger with',
+	'S_INCORRECT_USAGE_OF_QUOTES'=>				'Incorrect usage of quotes',
+	'S_EXPRESSION_CANNOT_BE_EMPTY'=>			'Expression cannot be empty',
+	'S_NO_SUCH_HOST'=>					'No such host',
+	'S_TOO_MANY_HOSTS'=>					'Too many hosts',
+	'S_NO_SUCH_MONITORED_PARAMETER'=>			'No such monitored parameter',
+	'S_FOR_HOST_SMALL'=>					'for host',
+	'S_UNKNOWN_FUNCTION'=>					'Unknown function',
+	'S_INCORRECT_VALUE_TYPE'=>				'Incorrect value type',
+	'S_FOR_FUNCTION_SMALL'=>				'for function',
+	'S_OF_KEY_SMALL'=>					'of key',
+	'S_AVAILABLE_ONLY_FOR_ITEMS_WITH_VALUE_TYPES_SMALL'=>	'available only for items with value types',
+	'S_MISSING_MANDATORY_PARAMETER_FOR_FUNCTION'=>		'Missing mandatory parameter for function',
+	'S_NOT_FLOAT_OR_MACRO_FOR_FUNCTION_SMALL'=>'		is not a float or macro for function',
+	'S_NOT_FLOAT_OR_MACRO_OR_COUNTER_FOR_FUNCTION_SMALL'=>	'is not a float or counter or macro for function',
+	'S_ITEM_KEY_MUST_BE_USED_IN_TRIGGER_EXPRESSION'=>	'An item key must be used in trigger expression',
+	'S_INCORRECT_TRIGGER_EXPRESSION'=>			'Incorrect trigger expression',	
+	'S_YOU_CAN_NOT_USE_TEMPLATE_HOSTS_MIXED_EXPR'=>		'You can not use template hosts in mixed expressions.',
+	'S_ADDED_TRIGGER'=>					'Added trigger',
+	'S_TO_HOST_SMALL'=>					'to host',
+	'S_MISSING_KEY'=>					'Missing key',
+	'S_INCORRECT_FUNCTION_IS_USED'=>			'Incorrect function is used',
+	'S_UNKNOWN_MACRO'=>					'Unknown macro',
+	'S_DELETED_SMALL'=>					'deleted',
+	'S_FROM_HOST_SMALL'=>					'from host',
+	'S_UPDATED_SMALL'=>					'updated',
+	'S_TRIGGER_IN_TEMPLATE'=>				'Trigger in template',
+	'S_HAS_DEPENDENCY_WITH_TRIGGER_IN_TEMPLATE'=>		'has dependency with trigger in template',
+	'S_IS_NOT_THE_HIGHEST_LEVEL_TEMPLATE'=>			'is not the highest level template',
+	'S_NO_FUNCTION_WITH'=>					'No function with',
+	'S_SPECIFY_THE_CONDITIONAL_EXPR_FOR_THE_TARGET'=>	'Specify the conditional expression for the target.',
+	
+	
+	
+	
+
 //	Menu
 
 	'S_HELP'=>				'Help',
Index: include/triggers.inc.php
===================================================================
--- include/triggers.inc.php	(revision 9555)
+++ include/triggers.inc.php	(working copy)
@@ -416,7 +416,7 @@
 		if($row){
 			return	$row;
 		}
-		error('No trigger with triggerid=['.$triggerid.']');
+		error(S_NO_TRIGGER_WITH.' triggerid=['.$triggerid.']');
 		return FALSE;
 	}
 
@@ -601,7 +601,7 @@
 		}
 
 		if( $quoted ){
-			error('Incorrect usage of quotes. ['.$string.']');
+			error(S_INCORRECT_USAGE_OF_QUOTES.'. ['.$string.']');
 			return null;
 		}
 
@@ -628,7 +628,7 @@
 		global $ZBX_TR_EXPR_SIMPLE_MACROS, $ZBX_TR_EXPR_REPLACE_TO, $ZBX_TR_EXPR_ALLOWED_FUNCTIONS;
 
 		if( empty($expression) ){
-			error('Expression can\'t be empty');
+			error(S_EXPRESSION_CANNOT_BE_EMPTY);
 		}
 
 		$expr = $expression;
@@ -658,11 +658,11 @@
 
 				$row=DBfetch(DBselect($sql));
 				if($row['cnt']==0){
-					error('No such host ('.$host.')');
+					error(S_NO_SUCH_HOST.' ('.$host.')');
 					return false;
 				}
 				else if($row['cnt']!=1){
-					error('Too many hosts ('.$host.')');
+					error(S_TOO_MANY_HOSTS.' ('.$host.')');
 					return false;
 				}
 
@@ -677,13 +677,13 @@
 							' AND '.DBin_node('h.hostid', false);
 
 				if(!$item = DBfetch(DBselect($sql))){
-					error('No such monitored parameter ('.$key.') for host ('.$host.')');
+					error(S_NO_SUCH_MONITORED_PARAMETER.' ('.$key.') '.S_FOR_HOST_SMALL.' ('.$host.')');
 					return false;
 				}
 
 // Check function
 				if(!isset($ZBX_TR_EXPR_ALLOWED_FUNCTIONS[$function])){
-					error('Unknown function ['.$function.']');
+					error(S_UNKNOWN_FUNCTION.SPACE.'['.$function.']');
 					return false;
 				}
 
@@ -694,8 +694,8 @@
 					$allowed_types = array();
 					foreach($fnc_valid['item_types'] as $type)
 						$allowed_types[] = item_value_type2str($type);
-					info('Function ('.$function.') available only for items with value types ['.implode(',',$allowed_types).']');
-					error('Incorrect value type ['.item_value_type2str($item['value_type']).'] for function ('.$function.') of key ('.$host.':'.$key.')');
+					info(S_FUNCTION.' ('.$function.') '.S_AVAILABLE_ONLY_FOR_ITEMS_WITH_VALUE_TYPES_SMALL.' ['.implode(',',$allowed_types).']');
+					error(S_INCORRECT_VALUE_TYPE.' ['.item_value_type2str($item['value_type']).'] '.S_FOR_FUNCTION_SMALL.' ('.$function.') '.S_OF_KEY_SMALL.' ('.$host.':'.$key.')');
 					return false;
 				}
 
@@ -710,7 +710,7 @@
 								continue;
 							}
 						 	else{
-								error('Missing mandatory parameter for function ('.$function.')');
+								error(S_MISSING_MANDATORY_PARAMETER_FOR_FUNCTION.' ('.$function.')');
 								return false;
 							}
 						}
@@ -718,12 +718,12 @@
 						if(preg_match('/^'.ZBX_PREG_EXPRESSION_USER_MACROS.'$/', $parameter[$pid])) continue;
 
 						if(('sec' == $params['type']) && (validate_float($parameter[$pid])!=0) ){
-							error('['.$parameter[$pid].'] is not a float or macro for function ('.$function.')');
+							error('['.$parameter[$pid].'] '.S_NOT_FLOAT_OR_MACRO_FOR_FUNCTION_SMALL.' ('.$function.')');
 							return false;
 						}
 
 						if(('sec_num' == $params['type']) && (validate_ticks($parameter[$pid])!=0) ){
-							error('['.$parameter[$pid].'] is not a float or counter or macro for function ('.$function.')');
+							error('['.$parameter[$pid].'] '.S_NOT_FLOAT_OR_MACRO_OR_COUNTER_FOR_FUNCTION_SMALL.' ('.$function.')');
 							return false;
 						}
 					}
@@ -735,12 +735,12 @@
 		}
 
 		if($item_count == 0){
-			error('An item key must be used in trigger expression');
+			error(S_ITEM_KEY_MUST_BE_USED_IN_TRIGGER_EXPRESSION);
 			return false;
 		}
 
 		if( isset($h_status[HOST_STATUS_TEMPLATE]) && ( count($h_status) > 1 || count($h_status[HOST_STATUS_TEMPLATE]) > 1 )){
-			error('Incorrect trigger expression. You can not use template hosts in mixed expressions.');
+			error(S_INCORRECT_TRIGGER_EXPRESSION.'.'.SPACE.S_YOU_CAN_NOT_USE_TEMPLATE_HOSTS_MIXED_EXPR);
 			return false;
 		}
 
@@ -768,7 +768,7 @@
 */
 
 		if($ZBX_TR_EXPR_REPLACE_TO != $expr){
-			error('Incorrect trigger expression. ['.str_replace($ZBX_TR_EXPR_REPLACE_TO, ' ... ', $expr).']');
+			error(S_INCORRECT_TRIGGER_EXPRESSION.'. ['.str_replace($ZBX_TR_EXPR_REPLACE_TO, ' ... ', $expr).']');
 			return false;
 		}
 
@@ -815,9 +815,9 @@
 		$trig_host = DBfetch($trig_hosts);
 
 		if($result){
-			$msg = 'Added trigger "'.$description.'"';
+			$msg = S_ADDED_TRIGGER.SPACE.'"'.$description.'"';
 			if($trig_host){
-				$msg .= ' to host "'.$trig_host['host'].'"';
+				$msg .= SPACE.S_TO_HOST_SMALL.SPACE.'"'.$trig_host['host'].'"';
 			}
 			info($msg);
 		}
@@ -910,7 +910,7 @@
 			$host_items = DBselect('SELECT * FROM items WHERE key_='.zbx_dbstr($item['key_']).' AND hostid='.$host['hostid']);
 			$host_item = DBfetch($host_items);
 			if(!$host_item){
-				error('Missing key "'.$item['key_'].'" for host "'.$host['host'].'"');
+				error(S_MISSING_KEY.SPACE.'"'.$item['key_'].'"'.SPACE.S_FOR_HOST_SMALL.SPACE.'"'.$host['host'].'"');
 				return FALSE;
 			}
 
@@ -933,7 +933,7 @@
 			add_trigger_dependency($newtriggerid, $dep_id);
 		}
 
-		info('Added trigger "'.$trigger['description'].'" to host "'.$host['host'].'"');
+		info(S_ADDED_TRIGGER.SPACE.'"'.$trigger['description'].'"'.SPACE.S_TO_HOST_SMALL.SPACE.'"'.$host['host'].'"');
 		add_audit_ext(AUDIT_ACTION_ADD, AUDIT_RESOURCE_TRIGGER, $newtriggerid, $trigger['description'], NULL, NULL, NULL);
 // Copy triggers to the child hosts
 		$child_hosts = get_hosts_by_templateid($hostid);
@@ -958,7 +958,7 @@
 		$prefix = $host['host'].':'.$item['key_'].'.';
 
 		if(empty($expressions)){
-			error('Expression can\'t be empty');
+			error(S_EXPRESSION_CANNOT_BE_EMPTY);
 		}
 		$functions = array('regexp'=>1,'iregexp'=>1);
 
@@ -1013,7 +1013,7 @@
 				$arr[4] = strtolower($arr[4]);
 
 				if(!isset($functions[$arr[4]])){
-					error('Incorrect function is used. ['.$expression['value'].']');
+					error(S_INCORRECT_FUNCTION_IS_USED.'. ['.$expression['value'].']');
 					return false;
 				}
 
@@ -1025,7 +1025,7 @@
 			}
 
 			if(empty($expr_array)){
-				error('Incorrect trigger expression. ['.$expression['value'].']');
+				error(S_INCORRECT_TRIGGER_EXPRESSION.'. ['.$expression['value'].']');
 				return false;
 			}
 
@@ -1205,7 +1205,7 @@
 //		while(ereg(ZBX_EREG_EXPRESSION_TOKEN_FORMAT, $expr, $arr)){
 		while(preg_match('/'.ZBX_PREG_EXPRESSION_TOKEN_FORMAT.'/', $expr, $arr)){
 			if($arr[ZBX_EXPRESSION_MACRO_ID] && !isset($ZBX_TR_EXPR_SIMPLE_MACROS[$arr[ZBX_EXPRESSION_MACRO_ID]])){
-				error('[ie] Unknown macro ['.$arr[ZBX_EXPRESSION_MACRO_ID].']');
+				error('[ie]'.SPACE.S_UNKNOWN_MACRO.' ['.$arr[ZBX_EXPRESSION_MACRO_ID].']');
 				return false;
 			}
 			else if(!$arr[ZBX_EXPRESSION_MACRO_ID]) {
@@ -1565,10 +1565,10 @@
 		$result = DBexecute('DELETE FROM triggers WHERE '.DBcondition('triggerid',$triggerids));
 		if($result){
 			foreach($triggers as $triggerid => $trigger){
-				$msg = 'Trigger "'.$trigger['description'].'" deleted';
+				$msg = S_TRIGGER.SPACE.'"'.$trigger['description'].'"'.SPACE.S_DELETED_SMALL;
 				$trig_host = DBfetch($trig_hosts[$triggerid]);
 				if($trig_host){
-					$msg .= ' from host "'.$trig_host['host'].'"';
+					$msg .= SPACE.S_FROM_HOST_SMALL.SPACE.'"'.$trig_host['host'].'"';
 				}
 				info($msg);
 			}
@@ -1668,10 +1668,10 @@
 
 		if($result){
 			$trig_hosts	= get_hosts_by_triggerid($triggerid);
-			$msg = 'Trigger "'.$trigger['description'].'" updated';
+			$msg = S_TRIGGER.SPACE.'"'.$trigger['description'].'"'.SPACE.S_UPDATED_SMALL;
 			$trig_host = DBfetch($trig_hosts);
 			if($trig_host){
-				$msg .= ' for host "'.$trig_host['host'].'"';
+				$msg .= SPACE.S_FOR_HOST_SMALL.SPACE.'"'.$trig_host['host'].'"';
 			}
 			info($msg);
 		}
@@ -1930,7 +1930,7 @@
 
 			$db_dephosts = DBselect($sql);
 			while($db_dephost = DBfetch($db_dephosts)) {
-				error('Trigger in template "'.$templatename.'" has dependency with trigger in template : '.$db_dephost['host']);
+				error(S_TRIGGER_IN_TEMPLATE.SPACE.'"'.$templatename.'"'.SPACE.S_HAS_DEPENDENCY_WITH_TRIGGER_IN_TEMPLATE.' : '.$db_dephost['host']);
 				$result = false;
 			}
 		}
@@ -1971,7 +1971,7 @@
 
 				$db_lowlvltpl = DBselect($sql);
 				while($lovlvltpl = DBfetch($db_lowlvltpl)) {
-					error($templates[$lovlvltpl['templateid']]['host'].' is not the highest level template');
+					error($templates[$lovlvltpl['templateid']]['host'].SPACE.S_IS_NOT_THE_HIGHEST_LEVEL_TEMPLATE);
 					$result = false;
 				}
 			}
@@ -2441,7 +2441,7 @@
 			return	$row;
 		}
 		else{
-			error('No function with functionid=['.$functionid.']');
+			error(S_NO_FUNCTION_WITH.' functionid=['.$functionid.']');
 		}
 	return $item;
 	}
@@ -2763,7 +2763,7 @@
 // Replace all {server:key.function(param)} and {MACRO} with '$ZBX_TR_EXPR_REPLACE_TO'
 		while(preg_match('/'.ZBX_PREG_EXPRESSION_TOKEN_FORMAT.'/uU', $expr, $arr)){
 			if($arr[ZBX_EXPRESSION_MACRO_ID] && !isset($ZBX_TR_EXPR_SIMPLE_MACROS[$arr[ZBX_EXPRESSION_MACRO_ID]])){
-				error('Unknown macro [' . $arr[ZBX_EXPRESSION_MACRO_ID].']');
+				error(S_UNKNOWN_MACRO.SPACE.'[' . $arr[ZBX_EXPRESSION_MACRO_ID].']');
 				return array('', null, null);
 			}
 			else if(!$arr[ZBX_EXPRESSION_MACRO_ID]){
@@ -3013,7 +3013,7 @@
 /* Replace */
 		else if($action == 'r'){
 			if($target['expr'] == '&' || $target['expr'] == '|'){
-				info('Specify the conditional expression for the target.');
+				info(S_SPECIFY_THE_CONDITIONAL_EXPR_FOR_THE_TARGET);
 				return false;
 			}
 			$map[$target['expr']] = array('expression' => $new_expr, 'sign' => '', 'value' => '');
