[Dolibarr-dev] extrafields label

2014-05-23 Par sujet Christophe Battarel
Hello everybody, Extrafields are great stuff, but their labels are not using the dolibarr translation system, so it's quite useless for multi-language companies, or for module developers. I would like to do a PR to fix it, but on which branch ? Can i consider this as a dysfonctionnement or a ne

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Florian HENRY
Hello Christophe, For me it's have be consider as a new feature. I already think about it, but I don't know how to do it properly regarding the table structure. May be create llx_extrafield_langs tables, that will store the translation of label, and also the translation of values (for

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Christophe Battarel
The simple way (for the labels) is to apply $langs->trans() to the label, so if it's in a loaded language file, it's translated, otherwise it's kept as is. But you're right this also must be thinked about for stored values. Le 23/05/2014 13:33, Florian HENRY a écrit : Hello Christophe,

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Florian HENRY
In the way you want to implement it, may be we can consider this is dysfonctionnement. change the showInput and showOutput with something like if ($langs->transoentities('thelabelofextrafield') != 'thelabelofextrafield') { print $langs->trans('thelabelofextrafield'); } else { print 't

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Sasa Ostrouska
I would note one thing. Extrafields AFAIK are an per install configuration. Therefore it will be very difficult to translate them. How can you ensure that 2 different installs will have the same extra field name ? Rgds Saxa On Fri, May 23, 2014 at 9:13 AM, Florian HENRY < florian.he...@open-conc

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet charles.fr
Good way of function For information it's like this i manage the header label of mylist table... Bien cordialement, Charles-François BENKE http://www.benke.fr - 0637056117 -Message d'origine- De : dolibarr-dev-bounces+charles.fr=benke...@nongnu.org [mailto:dolibarr-dev-bounces+charles.fr=

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Christophe Battarel
@saxa Two use-cases : 1) a switzeland company with one dolibarr instance and users speaking french or german; they should see extrafields label in their own language 2) a lazy module developer (me) thinks that extrafields are great and avoid to develop lot of code; so i create extrafields whe

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Florian HENRY
About that extrafield define and use by extranal module it can be nice to be able to define them into module descriptor rather than play with SQL request to create them, but it's another story. Florian Henry +33 6 03 76 48 07 florian.he...@open-concept.pro http://www.open-concept.pro Twitter :

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Sasa Ostrouska
On Fri, May 23, 2014 at 9:27 AM, Christophe Battarel < christophe.batta...@altairis.fr> wrote: > @saxa > Two use-cases : > > 1) a switzeland company with one dolibarr instance and users speaking > french or german; they should see extrafields label in their own language > > 2) a lazy module devel

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Philippe Grand
Le 23/05/2014 14:35, Florian HENRY a écrit : About that extrafield define and use by extranal module it can be nice to be able to define them into module descriptor rather than play with SQL request to create them, but it's another story. I rather see what you mean ;-) and agree one hundred tim

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Christophe Battarel
Finally , i have found a way to skirt the problem with some jquery and a hook; i give you the code below if you face the same problem : function formObjectOptions($parameters, $object, $action) { // translate extrafields labels print ' $(document).ready(func

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Doursenaud , Raphaël
Wow, what a hack ! I can't figure why in the world you need javascript for that. I understand you want to use a quick and dirty fix like that to get the feature right now, but please try to fix the root problem so we can all benefit from this. If you don't want to do it right now, fine, just open a

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Florian HENRY
https://doliforge.org/tracker/?func=detail&aid=1413&group_id=144 Florian Henry +33 6 03 76 48 07 florian.he...@open-concept.pro http://www.open-concept.pro Twitter : @_Open_Concept_ Le 23/05/2014 15:17, Doursenaud, Raphaël a écrit : Wow, what a hack ! I can't figure why in the world you need ja

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Christophe Battarel
you may find this quick fix dirty, but it has the advantaging of working right now (even maybe from 3.3 release). the problem for a module developer when he faces something like that is that he cannot say to his customer, well we will have to wait until 3.7 release because the extrafields la

Re: [Dolibarr-dev] extrafields label

2014-05-23 Par sujet Doursenaud , Raphaël
Hey Christophe, I understand your position perfectly, please read my previous message again. I think you should pursue fixing the root problem anyway by, at least, opening a task and leaving a comment on your hack to remove it and use the correct feature when available. Don't you think so? Cheers,