Weekly review cw 03

Changing the standard language in Kirby and HTML forms in React are challenges—in one case, a self-written script is a salvation. I continue to search for the optimal solution for the forms.

4 minutes
Hero image

HTML forms with React – a complex topic

My main professional project is gaining momentum—at least, that was the plan. However, I've been struggling with React MUI components and forms and trying to implement standard behavior like form reset() correctly. In addition, I had to fine-tune some UI glitches in the components' error displays to make the overall look and feel consistent.

I wonder whether React Components is still the right approach for a form-heavy project. I certainly get a lot out of the Material UI components. However, I understand that the voices are getting louder and raising concerns about this stack. If intensive work is needed to restore the standard behavior, there's something wrong with the approach.

YADL

This year, I would like to publish three blog articles per week. I have identified publication automation as a central lever for this. I can publish articles on a desired date with a small Kirby plugin, which I call every minute using a cron job. I set the date on the corresponding page in the panel. The only problem with my current approach is that my Kirby default language is DE; therefore, the article is published in German. However, I want to address my readers on LinkedIn, Mastodon, and Bluesky in English.

For automation, changing the standard language from DE to EN is necessary. Switching the language is unavailable in the Kirby Panel. To do this, I must go into the translation files and adjust a flag in the JSON. So far, so simple. But that's where the problems started, and I realized why this function didn't exist in the panel. Not translated information (for me, this is categories, tags, publication date, etc.) is only set in the default language. A simple change in the language files results in the loss of this information.

I wrote a node script that runs recursively through my content folder to solve this. It reads the values ​​of the fields of my choice in German, sets them in English, and then removes them in German. Once that was done, I could easily switch languages ​​and use my auto-publish feature from now on!

Here is the script transfer.txt (rename it to transfer.js and run it with node) if you want to change your language. Be sure to back up your content folder in advance!

Sport

The year is picking up speed, which means the second half of the table tennis season begins—the training during the winter break paid off. I started bravely in my singles and, contrary to the first half of the season, played actively and stayed at the table. And so the first game ended with a narrow defeat in the fifth set against a better opponent. Finally, playing in a way I have planned for so long gives me strength and courage for the following games. I am looking forward to it!

After a six-month break, I started the running season this week with the first five kilometers. The muscle soreness afterward was terrible, but this is an incentive to keep going. Because endurance training takes place outside again, I was able to switch my gym training to physical fitness. So, not just my legs that burn, but also my upper body ☺️.

Newsletter

At the start of the year, I'm writing about my experiment on the "annual motto instead of just resolutions," I'm continuing my series on the Book Challenge with comments on the 11th to 15th books. Read for yourself in the current newsletter.

Sociabli

I set up an N8N workflow that automatically adds new users to a rudimentary Notion CRM. I also regularly check the workflow executions and report to the beta users. Depending on whether I see problems or everything is working well, I use email templates that I send with a personal address. The goal is to get as much feedback as possible from the first users to improve Sociabli.

call to action background image

Subscribe to my newsletter

Receive once a month news from the areas of software development and communication peppered with book and link recommendations.