language.searchBuilder.conditions
language.searchBuilder.conditions
Hi
The page https://datatables.net/reference/option/language.searchBuilder.conditions.moment display informations about localisation of conditions used in searchBuilder
in this page we can see : https://datatables.net/reference/option/language.searchBuilder.condition.moment without s at condition word (and broken link when click on).
I expect than conditions is the correct term, because 'condition' translate the conditions placeHolder.
So I do try to localise options as
$.extend( true, $.fn.dataTable.defaults, { // datatables language
language: {
searchBuilder: {
add: 'Ajouter',
button: 'Filtres',
clearAll: 'Reset',
condition: 'Opérateur',
conditions :{
date: {
before: 'Avant le',
after: 'Après le',
equals: 'Egual à',
not: 'Différent de',
between: 'Entre',
notBetween: 'Pas entre',
empty: 'Vide',
notEmpty: 'Pas vide'
},
moment: {
before: 'Avant le',
after: 'Après le',
equals: 'Egual à',
not: 'Différent de',
between: 'Entre',
notBetween: 'Pas entre',
empty: 'Vide',
notEmpty: 'Pas vide'
},
number: {
equals: 'Egual à',
not: 'Différent de',
gt: 'Supérieur à',
gte: 'Supérieur ou égal à',
lt: 'Inférieur à',
lte: 'Inférieur ou égal à',
between: 'Entre',
notBetween: 'Pas entre',
empty: 'Vide',
notEmpty: 'Pas vide'
},
string: {
contains: 'Contient',
empty: 'Vide',
notEmpty: 'Pas vide',
equals: 'Egual à',
not: 'Différent de',
endsWith: 'Termine par',
startsWith: 'Commence par'
},
},
data: 'Colonne',
logicAnd: 'ET',
logicOr: 'OU',
title: {
0: 'Aucun Filtre',
_: 'Filtrés (%d)'
},
deleteTitle: 'Supprimer',
leftTitle: 'Gauche',
rightTitle: 'Droite',
value: 'Valeur',
},
infoFiltered: " (filtrés - _MAX_ au total)",
........
Everything is ok else localised conditions...
I try to set them directly (not using extend defaults) with same result.
Does somebody can help please ?
This question has accepted answers - jump to:
Answers
Hi @Lapointe ,
The property names that you are using are correct. I've miss-spelt in the docs and have raised an issue for this (DD-1717 for my reference). We will get that fixed soon.
Could you please link to a test case so that I can see try to see why the custom options are not being used? Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Thanks,
Sandy
Hi @sandy
http://live.datatables.net/ruvagabi/1/edit
As you can see, the column type detection is not correct (at least for age) .
It look like text comparator list (for salary too).
I post another question about localised date fields, to allow searchBuilder date picker to be set as the table is...
Thanks
Bob
That looks like a problem fixed in the nightly releases. I've updated your example here and it seems to be working as expected. Please could you take a look and confirm.
We're aiming to push this release in the next couple of weeks.
Colin
Hi @colin @sandy
For localisation it's ok
~~for field type detection, not yet... Salary and age seem to propose text comparators~~.
Else how to localise (customize) serchBuilder DatePicker to reflect editor datePicker
http://live.datatables.net/cegewowu/1/
Roberto (bob)
edit :
I just get the nightly searcBuider and it looks to work for field type detection (not in your sample http://live.datatables.net/fatopuyu/1/edit) but in mine (http://live.datatables.net/cegewowu/1/)
http://live.datatables.net/cegewowu/1 without parenthesis is better
Hi all
If filter condition is 'between' the 'and' term between start and end inputs is not localised ...
Hi @Lapointe ,
Good spot, 'and' there should indeed have an internationalisation option. I've raised an issue internally (DD-1719 for my reference) and will report back here when there is an update. This will probably be at the end of the week.
Thanks,
Sandy
Hi @sandy
I'm disapointed... On my one real case, field type de tection is not correct for numeric fields... and can't understand why...
as you can see in the json below, each field 'Montant' is numeric... and searchBuilder does not yet display the correct list for this type of column...
Is there a way to create test case with ajax file on live.datatables.net ?
You could use something like Mockjax - see here. There are sites that you can setup to send Ajax too,
Colin
hi
For information...
using
run
Using
does not...
Hi @sandy @colin
I do test and test and feel bad...
Testing ajax using colin link (Mockjax) run correctly... Numeric fields comparator list is correct...
Using directly the app with the same data does not run on my dev env...
So please if can help...
username NUJBD6DE pwd NUJBD6DE
http://dafaction.appinfo.fr/
hi @colin
using jquery-3.5.1.min.js in place of jquery-1.11.3.min.js the sample here does not run and stay at 'loading' state...
<?php ?? ?>It looks like incompatible versions with Mockjax - I updated Mockjax to 2.6.0 and it appears to be behaving as expected: http://live.datatables.net/fucamoqa/19/edit
Colin
Thank @colin
Did you have a look to why column 'Montant' is not detected as numeric in searchBuilder ?
Roberto
Hi @Lapointe ,
Running the following on your page
$('#donnees').DataTable().columns().type().toArray()
Shows that the column type for 'Montant' is 'num.', this is because you are setting the decimal place in your language plugin. This is actually the default so if you comment that line out it will work. That being said, it is also something that we should support, so, I've raised an issue internally (DD-1720 for my reference) and will report back here when there is an update. Again, probably at the end of the week.
Thanks,
Sandy
Yep...
I was feeling I was mad...
Thanks for this information.
I'll wait for update to set decimal point again...
Roberto
The fix for this is in the nightly releases here. We're aiming to release these in the next couple of weeks,
Colin
Thanks for all your support.
Bob
Thanks for all your support.
Bob
OOPS: link broken...
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
https://nightly.datatables.net/searchbuilder/js/dataTables.searchBuilder.min.js work correctly
Sorry but not OK
date fields seem to be detected as text when formatted like
If I edit the field datepicker is OK
Could you knock out a test case for that, please, it'll help us debug it.
Colin
Hi @colin
Yes I willhope monday....
This week end it's MotoGP for me.
I'll come back soon
Thanks
else do you have a private mail so I can send you a couple log/pwd to access at online system with admin privileges...