Hi Neil et al,

browsing through some other code confirms that having the message always 
twice seems to be the way it is. While I don't like such duplication, I 
am fine with the changes.

Regards
        Thorsten

Neil Garthwaite wrote:
> Hi Thorsten,
> 
> Unfortunately, that won't work. It's my understanding that the OHAC 
> build tools use program extract_gettext to extract the text from shell 
> scripts at non-runtime vs trying to evaluate ${msgtext} at runtime. The 
> extracted text is then placed within a .po file as identified by POFILE 
> within the Makefile by I guess further build tools, i.e. a process 
> similar to xgettext for C programs.
> 
> http://src.opensolaris.org/source/xref/ohac/ohac/usr/src/tools/extract_gettext/extract_gettext.c
>  
> 
> 
> Regards
> Neil
> 
> On 28 Jul 2009, at 12:33, Thorsten Frueauf wrote:
> 
>> Hi Hemachandran et al,
>>
>> in principle I am fine with the changes, the only thing that bothers 
>> me a bit is the duplication of exactly the same message - which then 
>> means someone changing the text needs to remember to change both 
>> occasions.
>>
>> Wouldn't something instead of
>>
>> 221         typeset rc=0
>> 222         typeset msgtext
>> 223
>> 224         if [ "$(/usr/bin/uname -i)" != "i86xpv" ]
>> 225         then
>> 226            # SCMSGS
>> 227            # @explanation
>> 228            # Solaris is not booted with xVM.
>> 229            # @user_action
>> 230            # Ensure that the default boot grub menu is set to boot
>> 231            # Solaris xVM.
>> 232            scds_syslog -p daemon.error -t $(syslog_tag) -m \
>> 233                 "Node is not booted with xVM."
>> 234
>> 235            msgtext=$(gettext "Node is not booted with xVM.")
>> 236            i18n_message "${msgtext}"
>> 237
>> 238            rc=1
>> 239         fi
>>
>> rather like
>>
>> 221         typeset rc=0
>> 222         typeset msgtext
>> 223
>> 224         if [ "$(/usr/bin/uname -i)" != "i86xpv" ]
>> 225         then
>> 226            # SCMSGS
>> 227            # @explanation
>> 228            # Solaris is not booted with xVM.
>> 229            # @user_action
>> 230            # Ensure that the default boot grub menu is set to boot
>> 231            # Solaris xVM.
>> 232            msgtext="Node is not booted with xVM."
>> 233            scds_syslog -p daemon.error -t $(syslog_tag) -m \
>> 234                 "${msgtext}"
>> 235
>> 236            i18n_message $(gettext "${msgtext}")
>> 237
>> 238            rc=1
>> 239         fi
>>
>> be better to maintain?
>>
>> That should also work in cases where %s needs to get substituted by 
>> the functions later.
>>
>> Regards
>>       Thorsten
>>
>> Hemachandran Namachivayam wrote:
>>> Hi Folks,
>>> Can you please review the changes made for the below CR's. The webrev 
>>> is @ http://cr.opensolaris.org/~hnamachi/ha-ldom/.
>>> CR *6865006* ldom validate shouldn't check for password file if 
>>> migration type is set to normal
>>> Solution:
>>> The password file related checks have to be skipped if the 
>>> MIGRATION_TYPE is set to NORMAL.
>>> CR *6864993* HA-xVM validate messages need to be wrapped by gettext
>>> Solution:
>>> The validate messages which appear on the terminal are wrapped by 
>>> gettext.
>>> -Thanks and Regards
>>> Hemachandran

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Sitz der Gesellschaft:
   Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
   Amtsgericht Muenchen: HRB 161028
   Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
   Vorsitzender des Aufsichtsrates: Martin Haering
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to