Skip to content

Commit

Permalink
fix: Import on openedx-translations (#773)
Browse files Browse the repository at this point in the history
The path on the openedx-translations runner for extract-translations is different, and breaks with this new import. This is an attempt to fix it.
  • Loading branch information
bmtcril committed May 7, 2024
1 parent 8bd2b16 commit b6a78c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements/translations.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Requirements needed to run in openedx-translations to manage localization
click
ruamel.yaml
4 changes: 4 additions & 0 deletions requirements/translations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
#
click==8.1.7
# via -r requirements/translations.in
ruamel-yaml==0.18.6
# via -r requirements/translations.in
ruamel-yaml-clib==0.2.8
# via ruamel-yaml
8 changes: 8 additions & 0 deletions tutoraspects/translations/translate.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
"""Interface for the translations."""

import os
import site
import sys

import click

# Ensure that our whole source tree is on the path, otherwise actions in
# openedx-translations will fail.
site.addsitedir(os.path.join(os.path.dirname(__file__), "../.."))

# pylint: disable=wrong-import-position
from tutoraspects.translations.translate_utils import (
compile_translations,
extract_translations,
Expand Down

0 comments on commit b6a78c2

Please sign in to comment.