Skip to content

Commit

Permalink
readme: Update architecture section with information about translatio…
Browse files Browse the repository at this point in the history
…ns in the Frontend
  • Loading branch information
mhthies committed Jun 28, 2020
1 parent 3ecbdb2 commit 12d3566
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ The web frontend is built with the CherryPy web framework and its included WSGI
In the `qaqa_bot.web` module, the Controller classes with endpoint handlers are defined.
The HTML templates are rendered with *Mako* and are located in `qaqa_bot/templates/`.

Incoming updates from the Telegram API (esp. incoming messages) are handled either by the Frontend on its own or with help of the GameServer: Typically, response messages that do not require interaction with the database, are sent by the Frontend immediately. In the other case, the Frontend's handler method identifies the correct game action, determines the action's arguments from the update data, and calls the respective method of the GameServer. The response message/s are sent by the GameServer.
Incoming updates from the Telegram API (esp. incoming messages) are handled either by the Frontend on its own or with help of the GameServer:
Typically, response messages that do not require interaction with the database, are sent by the Frontend immediately.
(It may use the GameServer's `get_translations()` or `translate_string()` methods to get the correct translation according to the chat's preferred language.)
In the other case, the Frontend's handler method identifies the correct game action, determines the action's arguments from the update data, and calls the respective method of the GameServer.
The response message/s are sent by the GameServer.

We use Alembic to manage database migrations.
To allow easy packaging and automatic migrations (see *Deployment* instructions below), the database versions are stored in `qaqa_bot/database_versions/`.
Expand Down

0 comments on commit 12d3566

Please sign in to comment.