Skip to content

Commit

Permalink
I18nsupport & language reset fixed (#142)
Browse files Browse the repository at this point in the history
* feat(i18n): add i18n support package
feat(i18n): modified layout and hook for i18n

* fix: add localstorag,fix language reset on refresh
  • Loading branch information
Buffett111 authored Feb 18, 2025
1 parent 029287e commit 7d0d106
Show file tree
Hide file tree
Showing 19 changed files with 1,367 additions and 21 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ninja_i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Ninja i18n action

on: pull_request_target

# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
pull-requests: write # Necessary to comment on PRs
issues: read # Necessary to read issue comments
contents: read # Necessary to access the repo content

jobs:
ninja-i18n:
name: Ninja i18n - GitHub Lint Action
runs-on: ubuntu-latest

steps:
- name: Run Ninja i18n
# @main ensures that the latest version of the action is used
uses: opral/ninja-i18n-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["inlang.vs-code-extension"]
}
44 changes: 44 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"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!"
}
45 changes: 45 additions & 0 deletions messages/zh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"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上查看"
}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,17 @@
"vite": "^5.4.14",
"vite-plugin-static-copy": "^2.2.0",
"vitest": "^2.1.9",
"zod": "^3.24.2"
"zod": "^3.24.2",
"@inlang/paraglide-js": "1.11.8"
},
"lint-staged": {
"*.{yml,yaml,json,js,ts,css,html,svelte}": [
"prettier --write",
"eslint --fix"
]
},
"packageManager": "pnpm@9.15.1"
"packageManager": "pnpm@9.15.1",
"dependencies": {
"@inlang/paraglide-sveltekit": "0.15.5"
}
}
Loading

0 comments on commit 7d0d106

Please sign in to comment.