[Erp5-dev] translating accounting transaction lines

Bartłomiej Górny bartek at redpoint.mn.pl
Mon Jan 23 15:38:18 CET 2006


Jean-Paul Smets wrote:
> Le Lundi 23 Janvier 2006 11:36, Bartłomiej Górny a écrit :
>> Jean-Paul Smets wrote:
>>> 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
>> Could you advise how force the use of ui catalog? I thought about such a
>> solution - I put translated_title into the listbox, but couldn't figure
>> out how to change the way it is translated.
>>
> 
> An quick way is to use a script (Base_getUiTranslatedTitle) but I would 

Of course, the question is how to put it into listbox column? From what 
I figured out so far, listbox columns accept only methods and properties 
that have getters - how can I put script results into a listbox col?

B.

> prefer to discuss first with Yoshinori about this general issue.
> JPS.
> 
>> BG
>>
>>> JPS.
>>>
>>>> Bartek
>>>>
>>>>> YO
> 


-- 
"Software is largely a service industry operating under the persistent 
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"



More information about the Erp5-dev mailing list