-
Notifications
You must be signed in to change notification settings - Fork 6
Translation, extra info from courses.auth, misc bug fixes (language modal breaking app) #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
e556095
bcd66ce
910518d
77379f7
eeffb8d
ce42f55
23be35d
f16c394
431b22b
3a632f3
e3d20cc
6aeb01c
7e2c641
2a7e2f2
a454f45
7bade49
6676e22
43f76fb
82ab612
8201863
1e2bc41
1b655d9
13b40c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,9 @@ | |
| import Course from '$components/courses/coursePage.svelte'; | ||
| import { navController } from '$components/shared/StackedNav'; | ||
| import { getSemester } from '$components/courses/getSemester'; | ||
| import { t, getLocale } from '$lib/i18n'; | ||
| import { t, getLocale, locale } from '$lib/i18n'; | ||
| import { get } from 'svelte/store'; | ||
| import { localize } from '$src/lib/translations/localize'; | ||
|
|
||
| let childrenOpen: boolean[] = []; | ||
|
|
||
|
|
@@ -51,12 +53,19 @@ | |
| <ion-item on:click={() => navigateToCourse(course)} lines="none" class="ion-no-padding"> | ||
| <div class="containerFlex"> | ||
| <div class="titlesFlex"> | ||
| <ion-label class="ion-text-wrap courseTitle">{course.courseTitle}</ion-label> | ||
| <ion-label class="ion-text-wrap courseTitle">{localize(course, "courseTitle" ,get(locale))}</ion-label> | ||
|
|
||
| {#if course.examPeriod !== null} | ||
| <ion-label class="examPeriod"> | ||
| {#if course.examPeriod && course.gradeYear} | ||
| {course.examPeriod.name} {course.gradeYear.name} | ||
| {#if course.examPeriod.name == "ΦΕΒΡΟΥΑΡΙΟΣ"} | ||
| {$t("course.exam_winter_period")} | ||
| {:else if course.examPeriod.name == "ΙΟΥΝΙΟΣ"} | ||
| {$t("course.exam_summer_period")} | ||
| {:else if course.examPeriod.name == "ΣΕΠΤΕΜΒΡΙΟΣ"} | ||
| {$t("course.exam_autumn_period")} | ||
| {/if} | ||
| {course.gradeYear.name} | ||
| {:else} | ||
| {$t('progress.declared')} | ||
| {/if} | ||
|
|
@@ -82,12 +91,19 @@ | |
| <ion-item lines="none" class="ion-no-padding"> | ||
| <div class="containerFlex"> | ||
| <div class="titlesFlex"> | ||
| <ion-label class="ion-text-wrap courseTitle">{course.courseTitle}</ion-label> | ||
| <ion-label class="ion-text-wrap courseTitle">{localize(course, "courseTitle", get(locale))}</ion-label> | ||
|
|
||
| {#if course.examPeriod !== null} | ||
| <ion-label class="examPeriod"> | ||
| {#if course.examPeriod && course.gradeYear} | ||
| {course.examPeriod.name} {course.gradeYear.name} | ||
| {#if course.examPeriod.name == "ΦΕΒΡΟΥΑΡΙΟΣ"} | ||
| {$t("course.exam_winter_period")} | ||
| {:else if course.examPeriod.name == "ΙΟΥΝΙΟΣ"} | ||
| {$t("course.exam_summer_period")} | ||
| {:else if course.examPeriod.name == "ΣΕΠΤΕΜΒΡΙΟΣ"} | ||
| {$t("course.exam_autumn_period")} | ||
| {/if} | ||
| {course.gradeYear.name} | ||
| {:else} | ||
| {$t('progress.declared')} | ||
| {/if} | ||
|
|
@@ -121,12 +137,19 @@ | |
| <div class="containerFlex"> | ||
| <div class="titlesFlex"> | ||
| <ion-label class="ion-text-wrap courseTitle" | ||
| >{childCourse.courseTitle}</ion-label | ||
| >{localize(childCourse, "courseTitle", get(locale))}</ion-label | ||
| > | ||
| {#if childCourse.examPeriod !== null} | ||
| <ion-label class="examPeriod"> | ||
| {#if childCourse.examPeriod && childCourse.gradeYear} | ||
| {childCourse.examPeriod.name} {childCourse.gradeYear.name} | ||
| {#if childCourse.examPeriod.name == "ΦΕΒΡΟΥΑΡΙΟΣ"} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. όμοια με το σχόλιό μου παραπάνω, αυτό δεν είναι σίγουρο ότι έχουν αυτά τα ονόματα, αν θέλουμε μετάφραση καλύτερα να μας τη δώσει το api
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Δεν μπορούσα να το πάρω από το API. Έκανα expand τo locale στο examPeriod αν θυμάμαι καλά, συντακτικά ήταν ορθό το request, αλλά δεν άνοιγε το locale. My guess would be ότι το API δεν το κάνει expose. |
||
| {$t("course.exam_winter_period")} | ||
| {:else if childCourse.examPeriod.name == "ΙΟΥΝΙΟΣ"} | ||
| {$t("course.exam_summer_period")} | ||
| {:else if childCourse.examPeriod.name == "ΣΕΠΤΕΜΒΡΙΟΣ"} | ||
| {$t("course.exam_autumn_period")} | ||
| {/if} | ||
| {childCourse.gradeYear.name} | ||
| {:else} | ||
| {$t('progress.declared')} | ||
| {/if} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.