-
Checkin to PRONTO
Ice coffee while Leo gets his haircut.Iced coffee -
Checkin to SOTETSU GOODS STORE δΊδΏ£ε·
Finally got the yellow train! -
byA bit more progress. Reworked the data model as I've figured out how I want the feature to work. Can also update existing trips, too.
Almost finished Trip Form -
Response to
byThe fundamental goal of the adults in any society is to protect their young and do everything they can to leave a better world than the one they inherited. The current generation of adults, and those that came before, are failing at a global scale.
I agree with that and I can't understand why the older generation doesn't seem to care. Is it really just "change is hard" and "not gonna effect me"?
Using my talents to make a direct impact to allow for systemic change is my major motivator for changing jobs. -
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 %}