forked from gooberinc/goober
replaced translations with easier one and added demotivators (not polished)
This commit is contained in:
parent
d641908a8c
commit
22d454dd42
15 changed files with 304 additions and 244 deletions
|
@ -3,7 +3,7 @@ import json
|
|||
import markovify
|
||||
import pickle
|
||||
from modules.globalvars import *
|
||||
from modules.translations import *
|
||||
from modules.translations import _
|
||||
|
||||
# Get file size and line count for a given file path
|
||||
def get_file_info(file_path):
|
||||
|
@ -64,8 +64,8 @@ def load_markov_model(filename='markov_model.pkl'):
|
|||
try:
|
||||
with open(filename, 'rb') as f:
|
||||
model = pickle.load(f)
|
||||
print(f"{GREEN}{get_translation(LOCALE, 'model_loaded')} {filename}.{RESET}")
|
||||
print(f"{GREEN}{_('model_loaded')} {filename}.{RESET}")
|
||||
return model
|
||||
except FileNotFoundError:
|
||||
print(f"{RED}{filename} {get_translation(LOCALE, 'not_found')}{RESET}")
|
||||
print(f"{RED}{filename} {_('not_found')}{RESET}")
|
||||
return None
|
Loading…
Add table
Add a link
Reference in a new issue