Judge Lanny Moriarty, who sentenced her, said when Tran appeared in his court last month for truancy, he gave her a warning, reported KHOU.com. But when she continued to miss classes, he issued a summons and arrested her in open court.
However, Tran's case of truancy is unusual because she is a highly successful student who takes advanced-placement and dual credit college-level courses, according to KHOU.com.
Moreover, Tran said her parents divorced and moved away from the city of Willis. She now works a full-time job and a part-time job to support an older brother who attends college and a younger sister who lives with relatives in Houston. She currently lives with the family of one of her employers.
The teenager claims she is often too exhausted to arrive at school on time and sometimes gets there after attendance has already been taken, KHOU.com reported.
"She goes from job to job from school. She stays up until 7 a.m. in the morning doing her homework," said a friend, CBS Atlanta reported.
Meanwhile, the judge admitted he wanted to make an example out of Tran. "If you let one run loose, what are you gonna' do with the rest of 'em? Let them go, too? A little stay in the jail for one night is not a death sentence," Moriarty said.
Tran's story struck a chord with many online communities.
Twitter was flooded with sympathy for Tran and criticism for Moriarty.
"Yes, your 'honor', let's make an example out of the abandoned 17yo working 2 jobs for her sister while getting honors," tweeted @joestump.
"Lock up Diane Tran for being poor and trying to feed her family. Call it truancy. Call it 'an example.' Call it the law. Call it discipline," tweeted @SirJoshBennett.
A Change.org petition has been started on her behalf, gathering over 8,000 signatures. Her story also became a widely read thread on Reddit, a popular social-content aggregator.
A comment on the Reddit thread stated: "Now make an example of the judge: Students are not your political cannon fodder. These people are human beings and you can treat them with the respect they deserve or you can resign. There is a reason courts treat some cases on a case by case basis and what this judge did was undermine every single case that is given an exception."