diff --git a/src/lib/stores/language.ts b/src/lib/stores/language.ts
new file mode 100644
index 0000000..42c6d2b
--- /dev/null
+++ b/src/lib/stores/language.ts
@@ -0,0 +1,3 @@
+import { writable } from 'svelte/store';
+
+export const language = writable<'en' | 'zh'>('en');
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 5657b42..76a675b 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -3,9 +3,124 @@
import { Button, Card } from 'flowbite-svelte';
import { ArrowRight, Mic, Brain, GraduationCap, Github } from 'lucide-svelte';
import { onMount } from 'svelte';
+ import { language } from '$lib/stores/language'; // Import the global language store
let title = $state('Hinagiku');
let highlight = $state(0);
+ let lang = language; // Use the global language store directly
+
+ const translations = {
+ en: {
+ transcript: 'Real-time Transcription',
+ Itanalysis: 'Intelligent Analysis',
+ educational: 'Educational Focus',
+ tr_details:
+ 'Capture every valuable insight from your discussions with our advanced speech-to-text technology.',
+ ia_details:
+ 'Get AI-powered insights and suggestions to improve discussion quality and participation.',
+ ef_details:
+ 'Purpose-built for educational environments with features that support meaningful learning.',
+ Ai_describe:
+ 'Our AI-powered system emphasizes student-led discussions while providing structured guidance, making it easier for teachers to direct learning and analyze outcomes.',
+ intro:
+ 'Hinagiku helps educators facilitate more engaging and productive discussions through real-time transcription and intelligent analysis.',
+ welcome: 'Welcome to Hinagiku!',
+ profile: 'Profile',
+ dashboard: 'Go to Dashboard',
+ signOut: 'Sign out',
+ login: 'Login',
+ started: 'Get Started',
+ learn: 'Learn More',
+ whyChoose: 'Why Choose Hinagiku?',
+ whyChooseDesc:
+ 'Our platform combines cutting-edge technology with educational expertise to enhance learning outcomes.',
+ howItWorks: 'How It Works',
+ howItWorksDesc:
+ 'Hinagiku enhances the Think-Pair-Share learning technique with AI assistance throughout the entire process.',
+ preparation: '1. Preparation',
+ preparationDesc:
+ 'Teachers create discussion templates and set up dynamic timelines for structured learning sessions.',
+ joinSession: '2. Join Session',
+ joinSessionDesc:
+ 'Students easily join discussions by scanning a session QR code, then form or join groups.',
+ discussion: '3. Discussion',
+ discussionDesc:
+ 'AI assists in guiding individual reflection, group discussions, and helps maintain focus on the topic.',
+ analysis: '4. Analysis',
+ analysisDesc:
+ 'Get visual summaries and insights from discussions to understand class perspectives and engagement.',
+ communityDriven: 'Community-Driven Templates',
+ communityDrivenDesc:
+ 'Access and share discussion templates with educators worldwide. Build upon proven discussion frameworks or contribute your own.',
+ browseTemplates: 'Browse public templates from experienced educators',
+ forkTemplates: 'Fork and customize existing templates for your needs',
+ shareTemplates: 'Share your successful discussion formats with the community',
+ collaborateTemplates: 'Collaborate with other educators to improve templates',
+ exploreTemplates: 'Explore Templates',
+ storyBehind: 'The Story Behind Our Name',
+ storyBehindDesc:
+ 'Hinagiku (雛菊), or Daisy in English, is an intelligent system designed to support discussions in educational environments.',
+ realTime:
+ "One of Hinagiku's key features is its real-time voice transcription and analysis, which helps hosts provide timely and insightful feedback, setting it apart from other educational tools.",
+ coreValues:
+ 'We chose the name Hinagiku because it reflects our core values: resilience, simplicity, and growth—much like the daisy flower itself, which flourishes in diverse conditions.',
+ mission:
+ 'Our mission is to help participants and hosts connect meaningfully by providing tools that facilitate better communication and collaboration in classrooms.',
+ openSource: 'Open Source',
+ openSourceDesc:
+ 'Hinagiku is open source and available on GitHub. We welcome contributions from the community!',
+ viewOnGitHub: 'View on GitHub'
+ },
+ zh: {
+ transcript: '即時轉錄',
+ Itanalysis: '智慧分析',
+ educational: '教育焦點',
+ tr_details: '使用我們先進的語音轉文字技術捕獲討論中的每一個寶貴見解。',
+ ia_details: '獲取AI提供的見解和建議,以提高討論品質和參與度。',
+ ef_details: '專為教育環境而設計,具被助於有效學習的功能。',
+ Ai_describe:
+ '我們的AI系統強調學生主導的討論,同時提供結構化指導,使教師更容易引導學習並分析結果。',
+ intro: 'Hinagiku透過即時轉錄和智慧分析幫助教育工作者促進更具吸引力和生產力的討論。',
+ welcome: '歡迎來到Hinagiku!',
+ profile: '個人资料',
+ dashboard: '儀表板',
+ signOut: '登出',
+ login: '登入',
+ started: '開始使用',
+ learn: '了解更多',
+ whyChoose: '為什麼選擇Hinagiku?',
+ whyChooseDesc: '我們的平台結合了尖端技術和教育專業知識,以提高學習成果。',
+ howItWorks: '它是如何工作的',
+ howItWorksDesc: 'Hinagiku在整個過程中通過AI輔助增強了Think-Pair-Share學習技術。',
+ preparation: '1. 準備',
+ preparationDesc: '教師創建討論模板並設置動態時間表以進行結構化學習會話。',
+ joinSession: '2. 加入會話',
+ joinSessionDesc: '學生通過掃描會話二維碼輕鬆加入討論,然後組建或加入小組。',
+ discussion: '3. 討論',
+ discussionDesc: 'AI協助指導個人反思、小組討論,並幫助保持對主題的關注。',
+ analysis: '4. 分析',
+ analysisDesc: '從討論中獲取視覺摘要和見解,以了解班級的觀點和參與度。',
+ communityDriven: '社區驅動的模板',
+ communityDrivenDesc:
+ '訪問並分享來自全球教育工作者的討論模板。在經過驗證的討論框架上進行構建或貢獻您自己的模板。',
+ browseTemplates: '瀏覽來自經驗豐富的教育工作者的公共模板',
+ forkTemplates: '分叉並自定義現有模板以滿足您的需求',
+ shareTemplates: '與社區分享您成功的討論格式',
+ collaborateTemplates: '與其他教育工作者合作改進模板',
+ exploreTemplates: '探索模板',
+ storyBehind: '我們名字背後的故事',
+ storyBehindDesc:
+ 'Hinagiku(雛菊),或英文中的Daisy,是一個旨在支持教育環境中討論的智能系統。',
+ realTime:
+ 'Hinagiku的一個關鍵功能是其實時語音轉錄和分析,這有助於主持人提供及時和有見地的反饋,使其與其他教育工具區分開來。',
+ coreValues:
+ '我們選擇Hinagiku這個名字是因為它反映了我們的核心價值觀:韌性、簡單和成長——就像雛菊花一樣,在不同的條件下茁壯成長。',
+ mission: '我們的使命是通過提供促進更好溝通和協作的工具,幫助參與者和主持人有意義地聯繫。',
+ openSource: '開源',
+ openSourceDesc: 'Hinagiku是開源的,並在GitHub上可用。我們歡迎社區的貢獻!',
+ viewOnGitHub: '在GitHub上查看'
+ }
+ };
onMount(() => {
const interval = setInterval(() => {
@@ -43,21 +158,20 @@
- Hinagiku helps educators facilitate more engaging and productive discussions through
- real-time transcription and intelligent analysis.
+ {translations[$lang].intro}
{#if $user}
- Go to Dashboard
+ {translations[$lang].dashboard}
{:else}
- Get Started
+ {translations[$lang].started}
- Learn More
+ {translations[$lang].learn}
{/if}
@@ -72,10 +186,9 @@
-
Why Choose Hinagiku?
+
{translations[$lang].whyChoose}
- Our platform combines cutting-edge technology with educational expertise to enhance
- learning outcomes.
+ {translations[$lang].whyChooseDesc}
@@ -86,10 +199,9 @@
-
Real-time Transcription
+
{translations[$lang].transcript}
- Capture every valuable insight from your discussions with our advanced speech-to-text
- technology.
+ {translations[$lang].tr_details}
@@ -99,9 +211,9 @@
-
Intelligent Analysis
+
{translations[$lang].Itanalysis}
- Get AI-powered insights and suggestions to improve discussion quality and participation.
+ {translations[$lang].ia_details}
@@ -111,10 +223,9 @@
-
Educational Focus
+
{translations[$lang].educational}
- Purpose-built for educational environments with features that support meaningful
- learning.
+ {translations[$lang].ef_details}
@@ -125,51 +236,45 @@
-
How It Works
+
{translations[$lang].howItWorks}
- Hinagiku enhances the Think-Pair-Share learning technique with AI assistance throughout
- the entire process.
+ {translations[$lang].howItWorksDesc}
-
1. Preparation
+
{translations[$lang].preparation}
- Teachers create discussion templates and set up dynamic timelines for structured
- learning sessions.
+ {translations[$lang].preparationDesc}
-
2. Join Session
+
{translations[$lang].joinSession}
- Students easily join discussions by scanning a session QR code, then form or join
- groups.
+ {translations[$lang].joinSessionDesc}
-
3. Discussion
+
{translations[$lang].discussion}
- AI assists in guiding individual reflection, group discussions, and helps maintain focus
- on the topic.
+ {translations[$lang].discussionDesc}
-
4. Analysis
+
{translations[$lang].analysis}
- Get visual summaries and insights from discussions to understand class perspectives and
- engagement.
+ {translations[$lang].analysisDesc}
- Our AI-powered system emphasizes student-led discussions while providing structured
- guidance, making it easier for teachers to direct learning and analyze outcomes.
+ {translations[$lang].Ai_describe}
@@ -180,21 +285,22 @@
-
Community-Driven Templates
+
+ {translations[$lang].communityDriven}
+
- Access and share discussion templates with educators worldwide. Build upon proven
- discussion frameworks or contribute your own.
+ {translations[$lang].communityDrivenDesc}
-
Browse public templates from experienced educators
-
Fork and customize existing templates for your needs
-
Share your successful discussion formats with the community
-
Collaborate with other educators to improve templates
- Hinagiku (雛菊), or Daisy in
- English, is an intelligent system designed to support discussions in educational
- environments.
+ Hinagiku (雛菊), {translations[
+ $lang
+ ].storyBehindDesc}
- One of Hinagiku's key features is its real-time voice transcription and analysis,
- which helps hosts provide timely and insightful feedback, setting it apart from other
- educational tools.
+ {translations[$lang].realTime}
- We chose the name Hinagiku because it reflects our core values:
- resilience, simplicity, and growth—much
- like the daisy flower itself, which flourishes in diverse conditions.
+ {translations[$lang].coreValues}
- Our mission is to help participants and hosts connect meaningfully by providing tools
- that facilitate better communication and collaboration in classrooms.
+ {translations[$lang].mission}
@@ -254,10 +355,9 @@
-
Open Source
+
{translations[$lang].openSource}
- Hinagiku is open source and available on GitHub. We welcome contributions from the
- community!
+ {translations[$lang].openSourceDesc}
- View on GitHub
+ {translations[$lang].viewOnGitHub}
diff --git a/src/routes/dashboard/+page.svelte b/src/routes/dashboard/+page.svelte
index 60c8f99..7d65a77 100644
--- a/src/routes/dashboard/+page.svelte
+++ b/src/routes/dashboard/+page.svelte
@@ -27,6 +27,8 @@
import TemplateCard from '$lib/components/TemplateCard.svelte';
import SessionCard from '$lib/components/SessionCard.svelte';
+ import { language } from '$lib/stores/language'; // Import the global language store
+
let { data } = $props();
// Query for user's templates
@@ -140,6 +142,57 @@
unsubscribe2();
unsubscribe3();
});
+
+ const translations = {
+ en: {
+ welcome: 'Welcome to Hinagiku!',
+ profile: 'Profile',
+ dashboard: 'Dashboard',
+ signOut: 'Sign out',
+ login: 'Login',
+ welcomeDashboard: 'Welcome to your dashboard',
+ stats: 'Statistics',
+ recentActivity: 'Recent Activity',
+ createTemplate: 'Create Template',
+ createTemplateDesc: 'Create a new discussion template',
+ joinSession: 'Join Session',
+ joinSessionDesc: 'Join an existing discussion session',
+ editProfile: 'Edit Profile',
+ editProfileDesc: 'Update your profile settings',
+ publicTemplates: 'Public Templates',
+ viewAll: 'View All',
+ yourTemplates: 'Your Templates',
+ noTemplates: 'No templates created yet',
+ createFirstTemplate: 'Create your first template to get started',
+ createTemplateButton: 'Create Your First Template',
+ noSessions: 'No sessions created yet',
+ createSession: 'Create a new session with template'
+ },
+ zh: {
+ welcome: '歡迎來到Hinagiku!',
+ profile: '個人資料',
+ dashboard: '儀表板',
+ signOut: '登出',
+ login: '登入',
+ welcomeDashboard: '歡迎來到您的儀表板',
+ stats: '統計數據',
+ recentActivity: '最近活動',
+ createTemplate: '創建模板',
+ createTemplateDesc: '創建一個新的討論模板',
+ joinSession: '加入會話',
+ joinSessionDesc: '加入現有的討論會話',
+ editProfile: '編輯個人資料',
+ editProfileDesc: '更新您的個人資料設置',
+ publicTemplates: '公開模板',
+ viewAll: '查看全部',
+ yourTemplates: '您的模板',
+ noTemplates: '尚未創建模板',
+ createFirstTemplate: '創建您的第一個模板以開始',
+ createTemplateButton: '創建您的第一個模板',
+ noSessions: '尚未創建會話',
+ createSession: '使用模板創建新會話'
+ }
+ };
@@ -148,8 +201,10 @@
{#if group.participants.length === 0}
- No participants in this group.
+ {translations[$language].noParticipants}
{:else}
{#each group.participants as participant}
diff --git a/src/routes/template/[id]/+page.svelte b/src/routes/template/[id]/+page.svelte
index f6c78ba..d5f4bdc 100644
--- a/src/routes/template/[id]/+page.svelte
+++ b/src/routes/template/[id]/+page.svelte
@@ -10,6 +10,7 @@
import { subscribe } from '$lib/firebase/store';
import { goto } from '$app/navigation';
import { notifications } from '$lib/stores/notifications';
+ import { language } from '$lib/stores/language'; // Import the global language store
let title = '';
let task = '';
@@ -127,50 +128,105 @@
notifications.error('Failed to delete template');
}
}
+
+ const translations = {
+ en: {
+ editTemplate: 'Edit Template',
+ startSession: 'Start Session',
+ saveChanges: 'Save changes before starting a session',
+ startDiscussion: 'Start a discussion session with this template',
+ title: 'Title',
+ templateTitle: 'Template title',
+ mainTask: 'Main Task',
+ mainTaskDesc: 'Main task description',
+ subtasks: 'Subtasks',
+ subtaskDesc: 'Subtask description',
+ addSubtask: 'Add Subtask',
+ makePublic: 'Make template public',
+ backToDashboard: 'Back to Dashboard',
+ unsavedChanges: 'You have unsaved changes!',
+ deleteTemplate: 'Delete this Template',
+ saveChangesButton: 'Save Changes',
+ allChangesSaved: 'All changes saved',
+ deleteConfirmation: 'Are you sure you want to delete this template?',
+ yesDelete: 'Yes, delete it',
+ noCancel: 'No, cancel',
+ loadingTemplate: 'Loading template...'
+ },
+ zh: {
+ editTemplate: '編輯模板',
+ startSession: '開始會話',
+ saveChanges: '保存更改後再開始會話',
+ startDiscussion: '使用此模板開始討論會話',
+ title: '標題',
+ templateTitle: '模板標題',
+ mainTask: '主要任務',
+ mainTaskDesc: '主要任務描述',
+ subtasks: '子任務',
+ subtaskDesc: '子任務描述',
+ addSubtask: '添加子任務',
+ makePublic: '將模板設為公開',
+ backToDashboard: '返回儀表板',
+ unsavedChanges: '您有未保存的更改!',
+ deleteTemplate: '刪除此模板',
+ saveChangesButton: '保存更改',
+ allChangesSaved: '所有更改已保存',
+ deleteConfirmation: '您確定要刪除此模板嗎?',
+ yesDelete: '是的,刪除它',
+ noCancel: '不,取消',
+ loadingTemplate: '加載模板...'
+ }
+ };
- Edit Template | Hinagiku
+ {translations[$language].editTemplate} | Hinagiku
{#if template}
-
Edit Template
+
{translations[$language].editTemplate}
- Start Session
+ {translations[$language].startSession}
{#if unsavedChanges}
- Save changes before starting a session
+ {translations[$language].saveChanges}
{:else}
- Start a discussion session with this template
+ {translations[$language].startDiscussion}
{/if}