Skip to content

Commit

Permalink
fix(devtools): fix the url where we link to
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Jan 15, 2022
1 parent fe5cdcd commit effc465
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/tools/librelingo_tools/lili.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def export_main_html_page(course, count, reldir, html_dir):
# course.modules[0].skills[0].phrases
# from ptpython.repl import embed
# embed(globals(), locals())
repository_url = get_repository_url(course)

html = render(
"index.html",
Expand All @@ -111,7 +110,7 @@ def export_main_html_page(course, count, reldir, html_dir):
rel="",
branch=branch,
course=course,
repository_url=repository_url,
repository_url=get_repository_url(course),
)
with open(os.path.join(html_dir, "modules.html"), "w") as fh:
fh.write(html)
Expand Down Expand Up @@ -199,14 +198,17 @@ def get_repository_url(course):
repository_url = course.repository_url
if "https://github.com/kantord/LibreLingo/tree/main/courses/" in repository_url:
repository_url = "https://github.com/kantord/LibreLingo"
if (
"https://github.com/kantord/LibreLingo/tree/main/temporarily_inactive_courses/"
in repository_url
):
repository_url = "https://github.com/kantord/LibreLingo"
return repository_url


def export_word_html_pages(course, all_words, language, reldir, words_dir):
branch = "main"

repository_url = get_repository_url(course)

for target_word in all_words:
html = render(
"word.html",
Expand All @@ -217,7 +219,7 @@ def export_word_html_pages(course, all_words, language, reldir, words_dir):
word_translations=language["words"][target_word],
dictionary_words=language["dictionary"][target_word],
phrases=language["phrases"][target_word],
repository_url=repository_url,
repository_url=get_repository_url(course),
branch=branch,
course=course,
)
Expand Down

1 comment on commit effc465

@vercel
Copy link

@vercel vercel bot commented on effc465 Jan 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.