Best Practice: Alerts should not use hardcoded name and description

 

What does this best practice check for?

There are certain management pack elements for which it is considered high-priority for them to have associated display names. As a best practice, alerts should not use hardcoded names and description, but should instead have this information as either references or in the language pack section of the MP.

Why is it important to follow this best practice? What is the impact of not following this best practice?

When content such as display strings or descriptions are hardcoded, this is a big problem for localization. Localization cannot detect hardcoded strings, and the only strings that get localized are those that are in the language pack section. So in situations where things are hardcoded, users with a localized copy of the MP will still see English strings.

How do I fix this in my MP?

Using the Authoring Console:

1.        In the Authoring console, name and descriptions will automatically be put into the language pack section of the MP.

Using XML:

BAD

     < UnitMonitor ID = " Microsoft.Windows.HyperV.2008.Services.ImageManagementServiceMonitor" Accessibility =" Public" Enabled =" onEssentialMonitoring" Target =" HVDisc!Microsoft.Windows.HyperV.2008.ServerRole" ParentMonitorID =" Health!System.Health.AvailabilityState" Remotable =" true" Priority =" Normal" TypeID =" Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" ConfirmDelivery =" false" >

       < Category > StateCollection </ Category >

       < AlertSettings AlertMessage = " Hyper-v 2008 Image Management Service is not running" >

 

     </ UnitMonitor >

GOOD

     < UnitMonitor ID = " Microsoft.Windows.HyperV.2008.Services.ImageManagementServiceMonitor" Accessibility =" Public" Enabled =" onEssentialMonitoring" Target =" HVDisc!Microsoft.Windows.HyperV.2008.ServerRole" ParentMonitorID =" Health!System.Health.AvailabilityState" Remotable =" true" Priority =" Normal" TypeID =" Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" ConfirmDelivery =" false" >

       < Category > StateCollection </ Category >

       < AlertSettings AlertMessage = " Microsoft.Windows.HyperV.2008.Services.ImageManagementServiceMonitor.Alert" >

 

     </ UnitMonitor >

     

       < DisplayString ElementID = " Microsoft.Windows.HyperV.2008.Services.ImageManagementServiceMonitor.Alert" >

         < Name > Hyper-V 2008 Image Management Service is not running </ Name >

         < Description > The Microsoft Windows Hyper-V 2008 Image Management Service on the computer {0} is not running. It will prevent Virtual Machines from starting. </ Description >

       </ DisplayString >