1
0
Fork 0
forked from Fuji/Fuji

Add translation and language selection

This commit is contained in:
Maarceeli 2025-02-20 17:43:38 +01:00
parent bef2aadccb
commit f636f0cba9
17 changed files with 387 additions and 62 deletions

View file

@ -1,8 +1,9 @@
import flet as ft
from i18n import _
def AttendancePage():
return ft.Column([
ft.Text(" Attendance", size=30, weight="bold"),
ft.Text((_("Attendance")), size=30, weight="bold"),
ft.Placeholder()
])

View file

@ -1,8 +1,10 @@
import flet as ft
from i18n import _
def BehaviourPage():
return ft.Column([
ft.Text(" Behaviour", size=30, weight="bold"),
ft.Text((_("Behaviour")), size=30, weight="bold"),
ft.Placeholder()
])

View file

@ -1,8 +1,10 @@
import flet as ft
from i18n import _
def ExamsPage():
return ft.Column([
ft.Text(" Exams", size=30, weight="bold"),
ft.Text((_("Exams")), size=30, weight="bold"),
ft.Placeholder()
])

View file

@ -1,8 +1,10 @@
import flet as ft
from i18n import _
def GradesPage():
return ft.Column([
ft.Text(" Grades", size=30, weight="bold"),
ft.Text((_("Grades")), size=30, weight="bold"),
ft.Placeholder()
])

View file

@ -1,16 +1,19 @@
import flet as ft
from i18n import *
from vars import *
set_language("pl")
def HomePage():
return ft.Column([
ft.Text(" Home", size=30, weight="bold"),
ft.Text((_("Home")), size=30, weight="bold"),
ft.Text("\n", size=30, weight="bold"),
ft.Row([
ft.Container( # Timetable Card
content=ft.Column([
ft.Row([
ft.Icon(ft.Icons.BACKPACK_OUTLINED, size=32, color="#FFFFFF"),
ft.Text("Timetable", size=24, font_family="Roboto", weight="bold")
ft.Text((_("Timetable")), size=24, font_family="Roboto", weight="bold")
]),
ft.ListView(
controls=[
@ -35,7 +38,7 @@ def HomePage():
content=ft.Column([
ft.Row([
ft.Icon(ft.Icons.LOOKS_6_OUTLINED, size=32, color="#FFFFFF"),
ft.Text("Recent Grades", size=24, font_family="Roboto", weight="bold")
ft.Text((_("Recent Grades")), size=24, font_family="Roboto", weight="bold")
]),
ft.Placeholder()

View file

@ -1,8 +1,10 @@
import flet as ft
from i18n import _
def HomeworkPage():
return ft.Column([
ft.Text(" Homework", size=30, weight="bold"),
ft.Text((_("Homework")), size=30, weight="bold"),
ft.Placeholder()
])

View file

@ -1,8 +1,10 @@
import flet as ft
from i18n import _
def SettingsPage():
return ft.Column([
ft.Text(" Settings", size=30, weight="bold"),
ft.Text((_("Settings")), size=30, weight="bold"),
ft.Placeholder()
])

View file

@ -1,8 +1,10 @@
import flet as ft
from i18n import _
def TimetablePage():
return ft.Column([
ft.Text(" Timetable", size=30, weight="bold"),
ft.Text((_("Timetable")), size=30, weight="bold"),
ft.Placeholder()
])