diff --git a/Dockerfile b/Dockerfile index 9a7b1d6..e7fea4f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ ADD main.py /main.py ADD loc.py /loc.py ADD make_bar_graph.py /make_bar_graph.py ADD colors.json /colors.json +ADD translation.json /translation.json RUN pip install -r requirements.txt ENV NPM_CONFIG_PREFIX=/home/node/.npm-global diff --git a/main.py b/main.py index fced13f..3557f65 100644 --- a/main.py +++ b/main.py @@ -492,7 +492,7 @@ if __name__ == '__main__': repo = g.get_repo(f"{username}/{username}") contents = repo.get_readme() try: - with open('translation.json', encoding='utf-8') as config_file: + with open(os.path.join(os.path.dirname(__file__), 'translation.json'), encoding='utf-8') as config_file: data = json.load(config_file) translate = data[locale] except Exception as e: