Menu

Post image 1
Post image 2
1 / 2
0

I wrote 'these fields are translatable' in five different files. Then I stopped.

DEV Community·Vadym Arnaut·22 days ago
#aFwzJiP9
Reading 0:00
15s threshold

The same fact, written in five places I'm building an LMS where teachers write courses in one language and students read them in another. So content i18n. Standard problem. What surprised me was how many places "this field gets translated" had to live. 1 . supabase / migrations / ... sql CHECK ( entity_type IN (...)) 2 . backend / app / schemas / ... py Literal [ "course" , "module" , ...] 3 . backend / app / models / ... py Mapped [ Literal [...]] 4 . backend / app / services / ... / walker . py if entity_type == "course" : ... 5 . backend / app / api / v1 / announcements call reconcile_entity (...) Enter fullscreen mode Exit fullscreen mode Each of these is its own commit, its own PR, its own author. They drift independently. You add a new translatable entity in March, you forget one of the five, and a Russian student reads English in their dashboard until somebody reports it. I shipped that bug twice in two months before I got tired of it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More