BEIJING — Courts in the western Chinese city of Xi'an sentenced 12 people Friday to up to 10 years in prison for attacks on Japanese-brand vehicles and a driver during a wave of anti-Japanese violence in September.