-
How to Handle Pluralization and Internationalization in Django Templates
byThis is written in the docs, but it was a first time for me to handle. Your templates can start to get very verbose when you really start supporting i18n support.Β
For strings directly in your templates you can use the blocktrans plural tag. ( Note this changes a bit with Django 3.2, blocktrans becomes blocktranslate ).{% load i18n %} {% blocktrans count counter=object_list|length %} {{ object_list }}δ»Ά {% plural %} {{ object_list }}δ»Ά {% endblocktrans %}
For master data that has a dedicated DB column, you can use the get_language_code from the i18n package.{% get_current_language as LANGUAGE_CODE %} {% if LANGUAGE_CODE != "en" %} {{ my_model.foo }} {% else %} {{ my_model.foo_en }} {% endif %} -
by
-
π Treat yourself to the 90s club aesthetics of the Wipeout games
byVirtual clubbing, you say? Itβs tough to top Psygnosisβ Wipeout series and its legacy, starting with composer Tim Wright aka CoLD SToRAGE. So letβs queue up a mix.
Great mix. -
The Week #58
by- Delta continues its rise in Japan. I don't have much to add beyond "wow, politicians are daft". Ignoring citizens when they overwhelmingly didn't support the Olympics continuing, holding the Olympics, then telling citizens to just forget about traveling home for the holidays...I understand the request (and agree with it), but people aren't going to listen. It's like throwing a giant house party, then the next day, hungover, telling the rest of the neighborhood they can't throw parties β you've lost moral authority to make such requests.
- It's been raining non-stop for what feels like a week. Areas in Kyushu have gotten a meter of rain in a couple of days. The constant rain has saturated the ground and there's mudslide warnings in much in the mountains. How saturated you ask? Water is coming up from the ground where it shouldn't.Β While the 19 - 22 degree days have been a break from the usual 33 degree summer days, I think I'm ready for some blue skies.
- Last week was Leo's "summer vacation" from school. We didn't go much of anywhere, but Leo got to play with his cousins almost everyday as they were at the grandparent's house nearby. I know he's growing up because he declared that he's not going to school and his still on vacation. π€£
- I started working on Tanzawa again for the first time in what feels like ages. Which is funny as just a couple of weeks ago I said I wasn't going to work on it for a month. Tanzawa Trips is one of the "tent pole" features I had in my mind when I first decided to build a blogging system and I'm happy to finally be starting it.
-
π koaning.io: My New Home Setup
byBetter Patterns for Development Work.
Despite my undying love for my mid-2014, I've been itching for a new computer for the better part of a year. I really like this idea that Vincent has setup working: a beefy Intel NUC PC running Linux to handle Docker etc.. and uses VSCode to develop on it from his Mac.
I've heard of people doing this before, but they're usually using a terminal for all of their development on a server in the cloud.
While I'm reluctant to use VSCode (because I'm still not sure I trust Microsoft yet), it appears a similar can also be done with PyCharm. Maybe this is the solution to my building a PC/getting a PC itch.- Tagged with
- computing
-
byFinally started working on Tanzawa trips. The idea is to let you link your status, photos, blogs, and checkins from a trip together in a nice package soΒ you can share your journey.
Tanzawa Trips -
Checkin to IKEA Restaurant & Cafe (IKEAγ¬γΉγγ©γ³&γ«γγ§)
Plant balls -
byI feel like Iβve been spending too much time on Twitter lately.Β A year ago I set limits on my phone with screen time, but Iβve gotten into the habit of just extending it for the day.Β
I wonder if I muster the discipline to only post on my blog / syndicate for a day? A week? -
π How the Pandemic Now Ends
byCases of COVID-19 are rising fast. Vaccine uptake has plateaued. The pandemic will be over one dayβbut the way there is different now.
Most people will meet the virus eventually; we want to ensure that as many people as possible do so with two doses of vaccine in them, and that everyone else does so over as much time as possible.
That's what I've been thinking with the latest surge in Japan. Iβll probably get it, but at least I got my shots so my immune system isnβt completelyΒ naive.Β- Tagged with
- pandemic
-
The Week #57
by- Both Yumi and I got our second dose of Pfizer in Shin-Yokohama. Talk about a huge weight being lifted off your shoulders. Now everyone we meet with semi-regularly (Yumi's parents) are vaccinated, I can relax a bit more. My day-after effects included general lethargy and a 38.9 degree temperature. I wonder when kids will be eligible to get the vaccine...
- I put in my notice at my current job at BeProud, my employer of over 4 years. In October I'll be joining the Kraken team at Octopus Energy as they expand to Japan. It was a difficult decision, but I'm really looking forward to my new role. I'll went into more info in my Why I'm Joining Octopus Energy post.
- The IPCC report came out and it's a doozy. Things will get worse for the next 30 years. We've got a lot of work to do.
- The Olympics ended β and (apparently, I wasn't watching) they cut coverage right when the head of the IOC started talking because a typhoon made landfall in Fukuoka. Classic snub, even if it wasn't meant to be.
- I'll have about 3 weeks of vacation between jobs, so I'm starting to think about what I'll do. Since we're fully vaccinated, I'd like to make a small trip to another prefecture. Maybe a trip to Izu? Karuizawa?
- I know I'll spend some time on Tanzawa, getting it documented and easier to deploy. Ideally I want a button where you can click and spin up a server on DigitalOcean (via Docker?) and some method for allowing you to update your Docker container for new releases.