prevent empty json to break the syntax of the generated js locale file.

Just a little tweak when dealing with empty json