Menu

1 / 2

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

DEV Community·Vadym Arnaut·6 months ago
#aFwzJiP9
#architecture#python#course#route#entity
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.…

Continue reading — create a free account

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