Smoother translations in Django
I’ve been working for roughly 5 years now in an app that is localized to Swedish, so I have built up some opinions on how to manage translation of a Django project. Here’s my list of things I do currently:
Personal blog for Anders Hovmöller. Mostly programming stuff.
I’ve been working for roughly 5 years now in an app that is localized to Swedish, so I have built up some opinions on how to manage translation of a Django project. Here’s my list of things I do currently:
In the AI age the importance of readable APIs goes up, as this can mean the difference between not reading the code because it’s too much, and easily reading it to verify it is correct because it’s tiny. It’s been pretty clear that one of the superpowers of AI development is that it happily deals with enormous amounts of boilerplate and workarounds in a way that would drive a human insane. But we…
On the pytest discord channel Sviatoslav mentioned a pull request with a bunch of spelling and grammar fixes. We had a discussion about the morality of not disclosing that it was an AI driven pull request up front, but what was pretty clear was that the quality was surprisingly high. Since I have a project with extensive documentation that I’ve spelled checked thoroughly this interested me. I…
The iommi docs are more correct than most projects because we take a different approach to documentation: part of the test suite is the documentation. Let’s look at an example:
In Django 5.2 we got a way to easier customize attributes of forms. Adam Johnson posted an example on mastodon, which I’ve slightly abbreviated below:
Phil Gyford wrote an article about how nice it is that the Django admin pre-populates inputs from the GET parameters if there are any. This can be used for bookmarklets as in his examples, or just general bookmarks where you can quickly go to a page with parts of a form prefilled.
At Dryft I have the luxury of a small production database, so I can mirror prod to my local dev machine in ~3 minutes. I use this a lot to get quick local reproduction of issues. I used to copy-paste the relevant URL part to my local dev and felt quite happy with it. Then I realized that I could just paste the entire URL after http://localhost:8000/! My browser autocompleted that part anyway, and…
When I joined TriOptima back in 2010, a common pattern emerged where names of things were slightly off because of stray whitespaces. Sometimes we had duplicates like "foo" , "foo " and " foo" in the database. Sometimes we couldn’t find stuff in logs because you searched for "foo was deleted" , when actually you had to search for "foo was deleted" (notice the double space!). Sorting was “broken”…
There’s a lot of tools out there to automate taking screenshots for documentation of web apps/libraries. Screenshots are certainly sometimes a good idea, but they have some serious downsides:
This question popped up on the Django Discord: