Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation switcher & English translation #32

Merged
merged 4 commits into from
Feb 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion config/template_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
# Config file parameters
[Config]
; Config file version. DO NOT EDIT THIS!
version = 13
version = 14
; Set this to no when you are done editing the file
is_template = yes
; Language code for string file
; Available languages:
; it_IT - Italian, by Steffo
; en_US - English, by https://github.com/DarrenWestwood (incomplete, please improve it!)
language = it_IT

# Telegram bot parameters
[Telegram]
Expand Down
4 changes: 3 additions & 1 deletion core.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import sys
import telegram
import strings
import worker
import configloader
import utils
import threading
import importlib

language = configloader.config["Config"]["language"]
strings = importlib.import_module("strings." + language)

def main():
"""The core code of the program. Should be run only in the main process!"""
Expand Down
5 changes: 4 additions & 1 deletion database.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
from sqlalchemy.ext.declarative import declarative_base
import configloader
import telegram
import strings
import requests
import utils
import importlib

language = configloader.config["Config"]["language"]
strings = importlib.import_module("strings." + language)

# Create a (lazy) database engine
engine = create_engine(configloader.config["Database"]["engine"])
Expand Down
Loading