dataculturegroup / DataBasic

A suite of focused and simple tools and activities for journalists, data journalism classrooms and community advocacy groups
http://www.databasic.io/
MIT License
62 stars 16 forks source link

json translation quotes aren't escaped properly #181

Closed kanarinka closed 8 years ago

kanarinka commented 8 years ago

bug from Juan on DDJ list: I found a bug. In the spanish version of "Word Counter" you cannot upload a file. I tried in different browsers on different computers. But it works in the english version.

rahulbot commented 8 years ago

Possible caused by error on JS console:

SyntaxError: Unexpected token '%'. Expected an identifier as property name.
(anonymous function)es-locale-data.js:6

investigating...

rahulbot commented 8 years ago

At first I thought the cause was that pojson not escaping the double quotes in our translations. But actually that output is correct (as seen in translations/es/LC_MESSAGES/messages.json. The awk or something in compile-translations.sh must be losing them. For now I fixed it by hand copying in the line into es-local-data.js.