I used 4 large whole legs of chicken for this. If using very small pickling onions, use the larger amount. Mine was bigger, and I used about 5 onions.
Heat the oil and when hot, add the chicken and brown on all sides.
Then add the peeled onions, the sliced lemon, and the 4 teaspoons soy sauce. Turn heat quite low, put lid on, and fry slowly and gently until chicken is cooked through and onions are soft. You'll need to turn chicken a few times. If there's any chance of burning, add a tiny bit of water.
(You can do this in the oven as well).
In the meantime, mix the wine (use a good cabernet, merlot, or good everyday drinking wine), sugar, water and 3 tablespoons soy sauce in a small pot.
Bring to the boil, and keep at a rolling boil until the liquid has reduced by a half or less. It will thicken slightly. (Be careful not to burn yourself!).
As soon as the sauce has reduced and thickened, add the rosemary, garlic and ginger.
Transfer the chicken to an oven dish, then ladle over the sauce. Cover lightly and keep in a warming oven if necessary -- standing improves the flavour.