gnucash maint: Add a missing gettext in plugin page owner tree

John Ralls jralls at ceridwen.us
Sat Jan 9 10:07:11 EST 2016


> On Jan 8, 2016, at 9:24 PM, Frank H. Ellenberger <frank.h.ellenberger at gmail.com> wrote:
> 
> Am 08.01.2016 um 16:03 schrieb John Ralls:
>> 
>>> On Jan 8, 2016, at 1:39 AM, Geert Janssens <geert.gnucash at kobaltwit.be> wrote:
> :
>>> Frank,
>>> 
>>> I'm not sure this is the right solution to the problem. Instead of marking the variable name as 
>>> translatable I'd be inclined to mark the label definitions themselves as translatable. These are a 
>>> few lines up in the code and currently set as N_(...). We could change them there to _(...) to 
>>> avoid marking a variable instead of a constant as translatable.
>>> 
>>> What do you think ?
>> 
>> They're effectively equivalent, see http://wiki.gnucash.org/wiki/Translation#How_to_make_strings_in_code_translatable. In both cases it's the constant that's marked as translatable. xgettext knows not to put an identifier in a potfile. With Frank's way the message catalog is searched only once at runtime for the label that's actually needed instead of four times for all of the possibilities.
>> 
>> However, I think that it's premature optimization because
>>  label = _("foo");
>>  bar(baz, label);
>> is a bit more idiomatic.
>> 
>> Regards,
>> John Ralls
> 
> I assumed, if _() were possible, the original author would have taken
> it. ;-)
> 
> simplyfied in commit 9df89b7.
> 
> 
> As we are here, I am wondering why we get the different strings
> #: ../src/gnome-utils/gnc-tree-view-owner.c:397
> msgid "Owner Name"
> msgstr ""
> 
> #: ../src/gnome-utils/gnc-tree-view-owner.c:408
> msgid "Owner ID"
> msgstr ""
> which result in strange translations. The owner of an employee - isn't
> that slavery? Yes, we have an entry about owner in the glossary, but it
> is often not remembered.
> 
> We could either simply use "Name" and "Number" or "ID", but then we have
> later "address name" and "phone number" as column labels.
> Or we could use the same strings as in the New... dialogs.

Owner is the superclass of Employee, Customer, and Vendor. It's an implementation detail that shouldn't be exposed to users, so that UI needs to be redesigned.

Regards,
John Ralls




More information about the gnucash-devel mailing list