mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-24 00:34:10 +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
|
import json, logging, sys, re
|
||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from configloader import settings
|
from configloader import settings
|
||||||
|
import gettext
|
||||||
|
|
||||||
|
# Initialize translation
|
||||||
|
t = gettext.translation('misc', localedir='locale', languages=[settings["lang"]])
|
||||||
|
_ = t.gettext
|
||||||
|
|
||||||
# Create a custom logger
|
# Create a custom logger
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,14 @@
|
||||||
# You have been warned
|
# You have been warned
|
||||||
|
|
||||||
import time, logging.config, json, requests, datetime, re, gettext, math, random, os.path, schedule, sys, ipaddress
|
import time, logging.config, json, requests, datetime, re, gettext, math, random, os.path, schedule, sys, ipaddress
|
||||||
|
import misc
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from collections import defaultdict, Counter
|
from collections import defaultdict, Counter
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from configloader import settings
|
from configloader import settings
|
||||||
|
from misc import link_formatter
|
||||||
|
from misc import ContentParser
|
||||||
|
|
||||||
if __name__ != "__main__": # return if called as a module
|
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.")
|
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()
|
lang.install()
|
||||||
ngettext = lang.ngettext
|
ngettext = lang.ngettext
|
||||||
|
|
||||||
import misc
|
|
||||||
|
|
||||||
from misc import link_formatter
|
|
||||||
from misc import ContentParser
|
|
||||||
|
|
||||||
storage = misc.load_datafile()
|
storage = misc.load_datafile()
|
||||||
|
|
||||||
# Remove previous data holding file if exists and limitfetch allows
|
# Remove previous data holding file if exists and limitfetch allows
|
||||||
|
|
Loading…
Reference in a new issue