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
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
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,
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
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
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=
@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
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 :
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
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
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
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
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
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
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,
15 matches
Mail list logo