Cut the aubergine into cubes - leave the peel, the caponata will be more tasty - sprinkle with salt and let it drain over a sieve for an hour to lose the bitterness of the aftertaste. Now take the tomatoes, remove the seeds and cut them into cubes, then clean the peppers - removing the seeds and the internal ribs - cut into squares, then wash the celery and slice it. Put the extra-virgin olive oil in a pan and, once boiling, submerge the aubergine cubes which should turn into a beautiful golden color. With a ladle take the cubes and place them on a plate with absorbent paper to remove excess grease. In a pan put the sliced onion into rings and brown for a couple of minutes in the oil, then add the peppers and cook for a few minutes, then add the capers - previously desalted under running water -, the tomato cubes, l 'raisins made to warm for ten minutes in warm water, olives and pine nuts. Stir well, cook for about 15 minutes and, at the end, add the aubergines and cook for another five minutes. At this point you can add the vinegar and sugar and cook everything over low heat for five or six minutes, letting the vinegar evaporate completely. Salt can be put at the end of cooking. Let it rest in the fridge for at least an hour and serve at room temperature. To allow the flavors to blend well together, you can prepare the caponata even the day before serving it on the table.