Open Source

Crap that’s happening in the open source world.

If you read the slightly older post and look at its screenshot and do some thinking – you might like me wonder this: given a bunch of JSON with multiple selections which can be modified in JavaScript using a form.. wait, modified using a form? One of the nice things about json is you can …

Continue reading Modifying JSON using a form

PHP has this really neat function, json_encode(). It can take an object of whatever type, including my own class with child arrays/classes, and make a valid JSON string out of it. I was going to write this function myself but I found PHP already has it. There’s one concern I have about it – it …

Continue reading Scary json_encode()

I got to implementing one of the primary use cases for OSTD – user uploads a template .pot file and gets a bunch of .po files with as many translated strings as possible. From a design point of view this isn’t a big deal: parse the .pot into a data structure, make a query per …

Continue reading Translating template files

If someone updates a po file with 100 translations – I need to figure out whether each translation is already in the database, and if not – insert it. The result looks like this (more about “looks” later): This is just a snippet. I am concerned that running an SQL query like this: “SELECT Translation.TranslatedString …

Continue reading Number of SQL queries per page