Browse Source

Localization: Display of enums

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@350 a333f486-631f-4898-b8df-5754b55c2be0
romainq 15 years ago
parent
commit
ee2df2e809
1 changed files with 1 additions and 14 deletions
  1. 1 14
      core/attributedef.class.inc.php

+ 1 - 14
core/attributedef.class.inc.php

@@ -811,20 +811,7 @@ class AttributeEnum extends AttributeString
 
 
 	public function GetAsHTML($sValue)
 	public function GetAsHTML($sValue)
 	{
 	{
-		$oValDef = $this->GetValuesDef();
-		if ($oValDef)
-		{
-			$aValues = $oValDef->GetValues(array(), "");
-		}
-		if (!empty($aValues) && array_key_exists($sValue, $aValues))
-		{
-			$sLabel = $aValues[$sValue];
-		}
-		else
-		{
-			// #@# todo - record an error silently... 
-			$sLabel = $sValue;
-		}
+		$sLabel = Dict::S('Class:'.$this->GetHostClass().'/Attribute:'.$this->GetCode().'/Value:'.$sValue, $sValue);
 		// later, we could imagine a detailed description in the title
 		// later, we could imagine a detailed description in the title
 		return "<span title=\"\">".parent::GetAsHtml($sLabel)."</span>";
 		return "<span title=\"\">".parent::GetAsHtml($sLabel)."</span>";
 	}
 	}