[Erp5-dev] translating accounting transaction lines
Jean-Paul Smets
jp at nexedi.com
Mon Jan 23 10:48:39 CET 2006
Le Dimanche 22 Janvier 2006 21:18, Bartłomiej Górny a écrit :
> Yoshinori Okuji wrote:
> > On Saturday 21 January 2006 22:03, Bartłomiej Górny wrote:
> >>> This is not required for your purpose, but personally I think it
> >>> would be better to specify income to reference rather than id. But
> >>> this would require modifying some scripts.
> >>
> >> I'm afraid I don't understand... Could you elaborate?
> >
> > Only the accounting transaction lines use "id" to specify the
> > purpose/indications of the objects. This looks inconsistent to me.
> > Usually, we use the property "reference" or a category to refer to a
> > certain object, so I prefer to change the implementation.
>
> Organisation and Person modules do the same - they have predefined,
> automatically added lines ('default_address', 'default_telephone' etc.)
> and they show their id's in the listbox.
>
> This is a big problem when it comes to i18n, because when the lines are
> automatically added, I need to (a) be able to translate what is shown in
> the listbox, and (b) distribute translation via bt5. So, for example, my
> 'hack' doesn't solve thw problem, because getTranslatedTitle uses the
> 'content' message catalog, which doesn't go to bt5.
The id is not supposed to be displayed and is not supposed to be used for
user interface but only for programming (lust like properties such as price
or quantity in objects which are not translated of course). So, I do not
think the problem you mention exists in reality (beyond the fact that IDs
are still displayed in some places in ERP5 and should stop being
displayed).
The right approach is to use properties such as title for user interface and
not to display ids. The case of title is a bit complex (this is a known
issue) because titles sometimes belong to content (ex. person title) and
sometimes to user interface (ex. module title). Until a perfect solution is
found, I suggest the following approach.
- define a title on transaction lines
- display the translated title rather than the id in listbox
- force the use of ui message catalog to translate title in listbox for
accounting transactions
JPS.
>
> Bartek
>
> > YO
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
More information about the Erp5-dev
mailing list