mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Fixed translation of misc module
This commit is contained in:
parent
8f8db6297d
commit
b4f821cd3f
5
misc.py
5
misc.py
|
@ -19,6 +19,11 @@
|
|||
import json, logging, sys, re
|
||||
from html.parser import HTMLParser
|
||||
from configloader import settings
|
||||
import gettext
|
||||
|
||||
# Initialize translation
|
||||
t = gettext.translation('misc', localedir='locale', languages=[settings["lang"]])
|
||||
_ = t.gettext
|
||||
|
||||
# Create a custom logger
|
||||
|
||||
|
|
|
@ -21,11 +21,14 @@
|
|||
# You have been warned
|
||||
|
||||
import time, logging.config, json, requests, datetime, re, gettext, math, random, os.path, schedule, sys, ipaddress
|
||||
import misc
|
||||
from bs4 import BeautifulSoup
|
||||
from collections import defaultdict, Counter
|
||||
from urllib.parse import quote_plus
|
||||
from html.parser import HTMLParser
|
||||
from configloader import settings
|
||||
from misc import link_formatter
|
||||
from misc import ContentParser
|
||||
|
||||
if __name__ != "__main__": # return if called as a module
|
||||
logging.critical("The file is being executed as a module. Please execute the script using the console.")
|
||||
|
@ -50,11 +53,6 @@ except FileNotFoundError:
|
|||
lang.install()
|
||||
ngettext = lang.ngettext
|
||||
|
||||
import misc
|
||||
|
||||
from misc import link_formatter
|
||||
from misc import ContentParser
|
||||
|
||||
storage = misc.load_datafile()
|
||||
|
||||
# Remove previous data holding file if exists and limitfetch allows
|
||||
|
|
Loading…
Reference in a new issue