[haiku-commits] Re: haiku: hrev45001 - in src: apps/terminal preferences/sounds

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Wed, 12 Dec 2012 13:37:21 -0500

On Wed, Dec 12, 2012 at 1:01 PM,  <humdingerb@xxxxxxxxxxxxxx> wrote:
>         BMenuField* menuField = new BMenuField("filemenu",
> -               B_TRANSLATE("Sound File:"), menu);
> -       menuField->SetDivider(menuField->StringWidth(B_TRANSLATE("Sound 
> File:"))
> +               B_TRANSLATE("Sound file:"), menu);
> +       menuField->SetDivider(menuField->StringWidth(B_TRANSLATE("Sound 
> file:"))
>                 + 10);

I know that you didn't write the original code, but, this is not going
to work. B_TRANSLATE("Sound File:") should only be written once. I'm
doubt StringWidth(B_TRANSLATE("Sound file:") is going to get you the
string width of the translated string, but even if it did, it would be
better to stuff the result into a variable and then use it twice
rather than adding two entries to the catalog.

Other related posts: