handle nested models' translations

It generates different css classes for each 
model's localised fields tab so that the 
bootstrap-tab plugin can select the correct one.

Also avoids invalid css with multiple elements
with the same id.