[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] phyp: Adding storage management driver



Justin Clift wrote:
> On 06/19/2010 09:33 AM, Eric Blake wrote:
> <snip>
>>> +    if (!(profile = phypGetLparProfile(conn, domain->id))) {
>>> +        VIR_ERROR("%s", "Unable to get VIOS profile name.");
>>> +        goto err;
>>> +    }
>>
>> Another case of a missing string translation.  How come 'make
>> syntax-check' isn't catching it?
>
> It also didn't catch some untranslated "yes" and "no" strings in
> virsh.c that were recently fixed (after being manually noticed).
>
> Guess that needs to be looked at if it's not just virsh that it's not
> working correctly on. :/

The sc_libvirt_unmarked_diagnostics rule uses heuristics to detect
uses of error-printing functions -- for which we want translations --
with a literal string argument, but with *no* use of _("...") in the
immediate vicinity.

The heuristics fail when:

   - the unmarked string is too far from the function name, either
     preceding it, as in the case of yes/no in virsh.c, or after it,
     as in two or more lines after the function name.

   - there is already one marked string, but there is another that
     is not marked.

   - a new function of this type is added to libvirt, but its name
     is not added to the msg_gen_function list in cfg.mk.

If the penalty for an unmarked string were higher, we would invest more
in automating the check, but for now, manually checking for violations
(while very tedious) will probably turn up more than a few.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]