Hi,

    1) write empty strings to .pot file
    Change include/hbexprb.c line #1899:
        if( pArg->ExprType == HB_ET_STRING && pArg->ulLength > 0 )
    to:
        if( pArg->ExprType == HB_ET_STRING )

    2) do not write empty string to .pot file and do not show any warning:
    Change:
        if( pArg->ExprType == HB_ET_STRING && pArg->ulLength > 0 )
        {
           if( HB_COMP_PARAM->fI18n )
    to:
        if( pArg->ExprType == HB_ET_STRING )
        {
           if( HB_COMP_PARAM->fI18n  && pArg->ulLength > 0 )


My vote for this one (no 2). IMO empty strings may happen in translation, but there is no point in offering them for translation. And if we issue a warning it ruins -es2 -w3 setup while the source is still valid. It's also relatively easy to grep for such empty strings if someone would like to find them.
If we chose this one, will hb_i18n_gettext() always 
return an empty string without doing a lookup?
hb_i18n_gettext() return original text if lookup failed, so, it will 
return empty string if parameter is empty string, but it will happen 
after lookup. Of cause we can implement additional check for empty 
string, but do not see any reason for it. It will make empty string 
"conversion" faster, and all other lookup will take longer (because one 
more test for empty string).
Actually, I do not imagine, why we need use hb_i18n_gettext("") at 
all??? Do you have any real life sample?

Regards,
Mindaugas

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to