Im using the original cakewalk mackie settings. Rotary, faders and some buttons work perfect, but almost all the buttons on the right are far off. For example; the "click on/off" button activates "loop on/off".
As was mentioned on the official forum, X-Touch has ALL Mackie buttons. But as you have noticed, the labels are different. Take
the original layout as the reference, the number on buttons are MIDI Note number. Use some tool (AZ Controller with empty configuration is good for that, but not the only available) to see which number you get from which X-Touch button. Find it in the layout and put correct label on X-Touch.
For your example:
1) you press "click on/off" on X-Touch, it produce "Note 89".
2) search for "89" inside some button, it will be "Loop On/Off"
3) put "Loop On/Off" label on X-Touch.
While you can see the effect from some button immediately, other are not so obvious. Going throw the numbers matching procedure will give you guarantied results.
And do not forget to publish the result here or on CakeWalk forum. Someone can spend 20-30 minutes once so other can just glue labels. Why not you?

Does the programming with AZ controller happen outside sonar?
It is interactive process inside Sonar. A bit like configuring very complicated Software Synth, you can see/test the result immediately after change, some reaction is easy to get with just several clicks, but once the logic grows, configuration becomes quite complicated.