Grommash9 / tg_chat_mate

https://grommash9.github.io/tg_chat_mate/
MIT License
5 stars 6 forks source link

Multi language logic for DB and routes #139

Open Grommash9 opened 10 months ago

Grommash9 commented 10 months ago

We should add collection into MongoDB with languages, for default we will use English and Ukrainian

Each language can be enabled or disabled (so user will be able or not to choose from)

We should create POST, GET, DELETE, PATCH requests to get, create, delete and change language settings

I document we should have: language code, language friendly name, and enabled flag

We should use same language code what we have in telegram

You can save languages in json file and add them into database on first bot run, like we doing with root manager now

Maybe we want something like database init function to put all init things inside of it

Also would be amazing to modify MongoDB Dockerfile to import these data (it will be much more smarter)

https://kevinmmartins.medium.com/mongodb-with-docker-and-initial-seed-76b3d19a923f

Grommash9 commented 10 months ago

Only one language should have default flag, if we will not have text translation into language what was selected by user - we should show messages in default language