Skip to content

Commit

Permalink
feat: add i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
KagamiChan committed Sep 29, 2024
1 parent cadd96d commit f78d965
Show file tree
Hide file tree
Showing 18 changed files with 610 additions and 21 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ninja_i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

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 }}

5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"inlang.vs-code-extension"
]
}
49 changes: 49 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"language": "English",
"name": "poi",
"description": "Scalable KanColle browser and tool.",
"github": "GitHub",
"telegram": "Telegram",
"opencollective": "OpenCollective",
"weibo": "Weibo",
"download": "Download {{version}}",
"linuxX64": "Linux (x64)",
"linuxArm": "Linux (ARM)",
"linuxDebX64": "Debian / Ubuntu (x64)",
"linuxDebArm": "Debian / Ubuntu (ARM)",
"linuxRpmX64": "Fedora / CentOS (x64)",
"macosX64": "macOS (x64)",
"macosArm": "macOS (ARM)",
"winIa32": "Windows (x86) Portable",
"winIa32Setup": "Windows (x86)",
"winX64": "Windows (x64) Portable",
"winX64Setup": "Windows (x64)",
"winArm": "Windows (ARM)",
"stableHint": "Stable, for most users",
"betaHint": "Beta, for new features",
"otherVersions": "Check the complete list",
"telegramGroupLink": "https://t.me/joinchat/ENYTx0Cr6B9OxSCRKUzYUw",
"discordChannelLink": "https://discordapp.com/channels/118339803660943369/367575898313981952",
"discordSubChannel": "Discord",
"chooseAnotherPlatform": "Choose another platform",
"lsc": "Large Scale Constructing...",
"currentTheme": "Theme ",
"chibaheit": "Chibaheit",
"lilywhite": "Lilywhite",
"nowLoading": "Now Loading",
"stable": "Stable",
"beta": "Beta",
"others": "Others",
"hostedAt": "Hosted at {{site}}",
"oldVersions": "Old versions",
"windowsNightlies": "Windows nightlies",
"linuxAndMacOsNightlies": "Linux and macOS nightlies",
"sourceCode": "Source code",
"closeDialog": "Close dialog",
"errorMessage": "Ah, the webpage has become 🐢. We will fix it.",
"reload": "Reload",
"downloads": "Downloads",
"noContent": "We're working on it, please check later.",
"returnToHome": "Return to home"
}
48 changes: 48 additions & 0 deletions messages/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"language": "français",
"name": "poi",
"description": "Navigateur et outil évolutif pour KanColle",
"github": "GitHub",
"telegram": "Telegram",
"opencollective": "OpenCollective",
"weibo": "Weibo",
"download": "Téléchargez {{version}}",
"linuxX64": "Linux (x64)",
"linuxArm": "Linux (ARM)",
"linuxDebX64": "Debian / Ubuntu (x64)",
"linuxDebArm": "Debian / Ubuntu (ARM)",
"linuxRpmX64": "Fedora / CentOS (x64)",
"macosX64": "macOS (x64)",
"macosArm": "macOS (ARM)",
"winIa32": "Windows (x86) Portable",
"winIa32Setup": "Windows (x86)",
"winX64": "Windows (x64) Portable",
"winX64Setup": "Windows (x64)",
"winArm": "Windows (ARM)",
"stableHint": "Stable, pour la plupart des utilisateurs",
"betaHint": "Beta, pour les nouvelles fonctionalités",
"telegramGroupLink": "https://t.me/joinchat/ENYTx0Cr6B9OxSCRKUzYUw",
"discordChannelLink": "https://discordapp.com/channels/118339803660943369/367575898313981952",
"discordSubChannel": "Discord",
"chooseAnotherPlatform": "Choisissez une autre plateforme",
"lsc": "Construction à grande échelle...",
"currentTheme": "Thème ",
"chibaheit": "Chibaheit",
"lilywhite": "Lilywhite",
"nowLoading": "En cours de chargement",
"stable": "Stable",
"beta": "Beta",
"others": "Autres",
"hostedAt": "Hébergé sur {{site}}",
"oldVersions": "Anciennes versions",
"windowsNightlies": "Nightlies Windows",
"linuxAndMacOsNightlies": "Nightlies Linux et macOS",
"sourceCode": "Code source",
"closeDialog": "Fermer le dialogue",
"errorMessage": "Ah, la page Web est devenue 🐢. Nous allons le réparer.",
"reload": "Rechargez",
"downloads": "Téléchargements",
"noContent": "Nous y travaillons, veuillez vérifier plus tard.",
"returnToHome": "Retourner à l'accueil"
}
51 changes: 51 additions & 0 deletions messages/ja.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"language": "日本語",
"name": "poi",
"description": "拡張可能な「艦隊これくしょん」ブラウザ",
"github": "GitHub",
"telegram": "Telegram",
"opencollective": "OpenCollective",
"weibo": "Weibo",
"download": "{{version}} をダウンロードする",
"linuxX64": "64 ビット Linux バージョン",
"linuxArm": "ARM Linux バージョン",
"linuxDebX64": "64 ビット Debian / Ubuntu バージョン",
"linuxDebArm": "ARM Debian / Ubuntu バージョン",
"linuxRpmX64": "64 ビット Fedora / CentOS バージョン",
"macosX64": "64 ビット macOS バージョン",
"macosArm": "ARM macOS バージョン",
"winIa32": "32 ビット Windows バージョン",
"winIa32Setup": "32 ビット Windows インストーラ",
"winX64": "64 ビット Windows バージョン",
"winX64Setup": "64 ビット Windows インストーラ",
"winArm": "ARM Windows バージョン",
"stableHint": "安定版・一般利用の方におすすめ",
"betaHint": "開発版・新機能が欲しい方におすすめ",
"otherVersions": "完全なリストを見る",
"telegramGroupLink": "https://t.me/joinchat/ENYTx0Cr6B9OxSCRKUzYUw",
"discordChannelLink": "https://discordapp.com/channels/118339803660943369/367575898313981952",
"discordSubChannel": "Discord チャンネル",
"chooseAnotherPlatform": "他のプラットフォームを選択",
"explore": "機能紹介",
"plugins": "プラグイン一覧",
"lsc": "大型建造中",
"currentTheme": "テーマ:",
"chibaheit": "チバハイト",
"lilywhite": "リリーホワイト",
"nowLoading": "少女祈祷中",
"stable": "安定版",
"beta": "開発版",
"others": "",
"hostedAt": "{{site}} でホストされています",
"oldVersions": "古いバージョン",
"windowsNightlies": "Windows デイリービルド",
"linuxAndMacOsNightlies": "Linux と macOS デイリービルド",
"sourceCode": "ソースコード",
"closeDialog": "ダイアログを閉じる",
"errorMessage": "ああ、ウェブページは 🐢 になっています。 修正します。",
"reload": "再起動",
"downloads": "ダウンロード",
"noContent": "作業中です。後で確認してください。",
"returnToHome": "ホームに戻る"
}
50 changes: 50 additions & 0 deletions messages/ko.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"language": "한국어",
"name": "poi",
"description": "확장 가능한 「함대 컬렉션」 브라우저",
"github": "GitHub",
"telegram": "Telegram",
"opencollective": "OpenCollective",
"weibo": "Weibo",
"download": "{{version}} 다운로드하기",
"linuxX64": "64비트 리눅스용",
"linuxArm": "ARM 리눅스용",
"linuxDebX64": "64비트 데비안/우분투용",
"linuxDebArm": "ARM 데비안/우분투용",
"linuxRpmX64": "64비트 페도라/CentOS용",
"macosX64": "64비트 macOS용",
"macosArm": "ARM macOS용",
"winIa32": "32비트 윈도우용 포터블 버전",
"winIa32Setup": "32비트 윈도우용",
"winX64": "64비트 윈도우용 포터블 버전",
"winX64Setup": "64비트 윈도우용",
"winArm": "ARM 윈도우용 포터블 버전",
"stableHint": "일반 사용자용 안정 버전",
"betaHint": "새로운 기능 맛보기용 베타 버전",
"otherVersions": "모든 버전 목록 보기",
"telegramGroupLink": "https://t.me/joinchat/ENYTx0Cr6B9OxSCRKUzYUw",
"discordChannelLink": "https://discordapp.com/channels/118339803660943369/367575898313981952",
"discordSubChannel": "디스코드 채널",
"chooseAnotherPlatform": "다른 플랫폼 고르기",
"explore": "소개",
"lsc": "대형함 건조 중...",
"currentTheme": "테마: ",
"chibaheit": "치바하이트",
"lilywhite": "릴리화이트",
"nowLoading": "로딩중",
"stable": "안정 버전",
"beta": "베타 버전",
"others": "기타",
"hostedAt": "{{site}}에서 호스팅 중",
"oldVersions": "오래된 버전",
"windowsNightlies": "윈도우 나이틀리 빌드",
"linuxAndMacOsNightlies": "리눅스와 맥OS 나이틀리 빌드",
"sourceCode": "소스코드",
"closeDialog": "창 닫기",
"errorMessage": "앗, 웹페이지가 🐢가 돼 버렸네요. 수복하겠습니다!",
"reload": "새로고침",
"downloads": "다운로드",
"noContent": "현재 공사 중입니다. 다음에 다시 방문해 주세요!",
"returnToHome": "홈으로 돌아가기"
}
51 changes: 51 additions & 0 deletions messages/zh-hans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"language": "简体中文",
"name": "poi",
"description": "可扩展的「舰队 Collection」浏览器",
"github": "GitHub",
"telegram": "Telegram",
"opencollective": "OpenCollective ",
"weibo": "新浪微博",
"download": "下载 {{version}}",
"linuxX64": "64 位 Linux 版",
"linuxArm": "ARM Linux 版",
"linuxDebX64": "64 位 Debian / Ubuntu 版",
"linuxDebArm": "ARM Debian / Ubuntu 版",
"linuxRpmX64": "64 位 Fedora / CentOS 版",
"macosX64": "64 位 macOS 版",
"macosArm": "ARM macOS 版",
"winIa32": "32 位 Windows 版",
"winIa32Setup": "32 位 Windows 安装包",
"winX64": "64 位 Windows 版",
"winX64Setup": "64 位 Windows 安装包",
"winArm": "ARM Windows 版",
"stableHint": "正式版,适合大部分人使用",
"betaHint": "测试版,包含最新的功能",
"otherVersions": "浏览完整列表",
"telegramGroupLink": "https://t.me/joinchat/ENYTx0Cr6B9OxSCRKUzYUw",
"discordChannelLink": "https://discordapp.com/channels/118339803660943369/367575898313981952",
"discordSubChannel": "Discord 频道",
"chooseAnotherPlatform": "选择其它平台",
"explore": "功能简介",
"plugins": "插件列表",
"lsc": "大型建造中",
"currentTheme": "主题:",
"chibaheit": "吃吧黑特",
"lilywhite": "莉莉白",
"nowLoading": "少女祈祷中",
"stable": "正式版",
"beta": "测试版",
"others": "其它",
"hostedAt": "托管于 {{site}}",
"oldVersions": "历史版本",
"windowsNightlies": "Windows 每夜构建",
"linuxAndMacOsNightlies": "Linux 与 macOS 每夜构建",
"sourceCode": "源代码",
"closeDialog": "关闭弹出框",
"errorMessage": "啊啦啦,网页变成了 🐢。我们会进行修复。",
"reload": "重新载入",
"downloads": "下载列表",
"noContent": "我们正在努力,请稍后再来。",
"returnToHome": "返回首页"
}
51 changes: 51 additions & 0 deletions messages/zh-hant.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"language": "繁體中文",
"name": "poi",
"description": "可擴展的「艦隊 Collection」瀏覽器",
"github": "GitHub",
"telegram": "Telegram",
"opencollective": "OpenCollective",
"weibo": "新浪微博",
"download": "下載 {{version}}",
"linuxX64": "64 位 Linux 版",
"linuxArm": "ARM Linux 版",
"linuxDebX64": "64 位 Debian / Ubuntu 版",
"linuxDebArm": "ARM Debian / Ubuntu 版",
"linuxRpmX64": "64 位 Fedora / CentOS 版",
"macosX64": "64 位 macOS 版",
"macosArm": "ARM macOS 版",
"winIa32": "32 位 Windows 版",
"winIa32Setup": "32 位 Windows 安裝包",
"winX64": "64 位 Windows 版",
"winX64Setup": "64 位 Windows 安裝包",
"winArm": "ARM Windows 版",
"stableHint": "正式版,適合大部分人使用",
"betaHint": "測試版,包含最新的功能",
"otherVersions": "瀏覽完整列表",
"telegramGroupLink": "https://t.me/joinchat/ENYTx0Cr6B9OxSCRKUzYUw",
"discordChannelLink": "https://discordapp.com/channels/118339803660943369/367575898313981952",
"discordSubChannel": "Discord 頻道",
"chooseAnotherPlatform": "選擇其它平臺",
"explore": "功能簡介",
"plugins": "擴展列表",
"lsc": "大型建造中",
"currentTheme": "主題:",
"chibaheit": "吃吧黑特",
"lilywhite": "莉莉白",
"nowLoading": "少女祈禱中",
"stable": "正式版",
"beta": "測試版",
"others": "其它",
"hostedAt": "託管於 {{site}}",
"oldVersions": "歷史版本",
"windowsNightlies": "Windows 每夜構建",
"linuxAndMacOsNightlies": "Linux 與 macOS 每夜構建",
"sourceCode": "源代碼",
"closeDialog": "關閉彈出框",
"errorMessage": "啊啦啦,網頁變成了 🐢。我們會進行修復。",
"reload": "重新載入",
"downloads": "下載列表",
"noContent": "我們正在努力,請稍後再來。",
"returnToHome": "回到首頁"
}
9 changes: 8 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { paraglide } from '@inlang/paraglide-next/plugin'
import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev'
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
Expand All @@ -22,4 +23,10 @@ if (process.env.NODE_ENV === 'development') {
await setupDevPlatform()
}

export default config
export default paraglide({
paraglide: {
project: './project.inlang',
outdir: './src/paraglide',
},
...config,
})
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@cloudflare/next-on-pages": "^1.13.3",
"@inlang/paraglide-next": "0.5.2",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-navigation-menu": "^1.2.0",
Expand Down Expand Up @@ -51,7 +52,8 @@
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.3",
"typescript": "^5.5.3"
"typescript": "^5.5.3",
"@inlang/paraglide-js": "1.11.2"
},
"ct3aMetadata": {
"initVersion": "7.37.0"
Expand Down
Loading

0 comments on commit f78d965

Please sign in to comment.