Skip to content

Commit

Permalink
Fix locale issue
Browse files Browse the repository at this point in the history
  • Loading branch information
l3v11 authored Aug 30, 2022
1 parent 8ce9bfa commit 783f6d6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ WORKDIR /usr/src/app
SHELL ["/bin/bash", "-c"]
RUN chmod 777 /usr/src/app

RUN apt-get -qq update && DEBIAN_FRONTEND="noninteractive" \
apt-get -qq install -y locales python3 python3-pip \
libmagic-dev p7zip-full p7zip-rar unzip && locale-gen en_US.UTF-8
ARG DEBIAN_FRONTEND=noninteractive

ENV LANG="en_US.UTF-8" LANGUAGE="en_US:en"
ENV LANGUAGE=en_US:en \
LC_ALL=C.UTF-8 \
LANG=en_US.UTF-8

RUN apt-get -qq update && apt-get -qq install -y \
python3 python3-pip locales libmagic-dev \
p7zip-full p7zip-rar unzip && \
locale-gen en_US.UTF-8

COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
Expand Down
15 changes: 6 additions & 9 deletions bot/helper/drive_utils/gdriveTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ def __init__(self, name=None, path=None, size=0, listener=None):
self.response = {}
self.telegraph_path = []
self.telegraph_content = []
self.title = "SearchX"
self.author_name = "Levi"
self.author_url = "https://t.me/l3v11"

def speed(self):
"""
Expand Down Expand Up @@ -725,9 +722,9 @@ def __create_page(self, acc, content):
try:
self.telegraph_path.append(
acc.create_page(
title=self.title,
author_name=self.author_name,
author_url=self.author_url,
title="SearchX",
author_name="Levi",
author_url="https://t.me/l3v11",
html_content=content)['path'])
except RetryAfterError as e:
LOGGER.info(f"Cooldown: {e.retry_after} seconds")
Expand All @@ -738,9 +735,9 @@ def __edit_page(self, acc, content, path):
try:
acc.edit_page(
path=path,
title=self.title,
author_name=self.author_name,
author_url=self.author_url,
title="SearchX",
author_name="Levi",
author_url="https://t.me/l3v11",
html_content=content)
except RetryAfterError as e:
LOGGER.info(f"Cooldown: {e.retry_after} seconds")
Expand Down

0 comments on commit 783f6d6

Please sign in to comment.