Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
feat(i18n): 新增 i18n 支持,添加简体中文、英文、繁体中文和日语翻译
tanmantang589f3fd450bb
diff --git a/app/components/masonry/Root.vue b/app/components/masonry/Root.vueindex e922ee53..b3580578 100644--- a/app/components/masonry/Root.vue+++ b/app/components/masonry/Root.vue@@ -261,7 +261,7 @@ const updateDateRange = () => {} else if (uniqueCities.length <= 3) {visibleCities.value = uniqueCities.join('、')} else {- visibleCities.value = `${uniqueCities.slice(0, 2).join('、')} 等 ${uniqueCities.length} 个城市`+ visibleCities.value = `${uniqueCities.slice(0, 2).join('、')} `+$t('ui.indexPanelCountCity',uniqueCities.length)}if (visibleDates.length === 0) {diff --git a/app/components/photo/LoadingIndicator.vue b/app/components/photo/LoadingIndicator.vueindex e15251a8..c5ea1f22 100644--- a/app/components/photo/LoadingIndicator.vue+++ b/app/components/photo/LoadingIndicator.vue@@ -99,21 +99,21 @@ const loadingVariants = {<div class="flex flex-col min-w-0 gap-0.5"><template v-if="loadingState.isError"><p class="text-xs font-medium text-red-400">- {{ loadingState.errorMessage || '图片加载失败' }}+ {{ loadingState.errorMessage || $t('viewer.photoload.loadError')}}</p>- <p class="text-xs text-white/70">正在加载图片</p>+ <p class="text-xs text-white/70">{{ $t('viewer.photoload.loading') }}</p></template><template v-else-if="loadingState.isConverting"><p class="text-xs font-medium text-white tabular-nums">- {{ loadingState.message || '正在转换中...' }}+ {{ loadingState.message || $t('viewer.photoload.converting')}}</p></template><template v-else-if="loadingState.isWebGLLoading"><div class="flex items-center gap-2"><p class="text-xs font-medium text-white">- {{ loadingState.webglMessage || '正在加载 WebGL...' }}+ {{ loadingState.webglMessage || $t('viewer.photoload.loadingWebGL') }}</p><spanv-if="loadingState.webglQuality !== 'unknown'"@@ -132,14 +132,14 @@ const loadingVariants = {{{ loadingState.webglQuality }}</span></div>- <p class="text-xs text-white/70">正在构建纹理</p>+ <p class="text-xs text-white/70">{{ $t('viewer.photoload.loadingTexture') }}</p></template><template v-else><div class="flex items-center gap-2"><p class="text-xs font-medium text-white">{{- loadingState.isHeic ? 'HEIC 图片加载中...' : '正在加载图片'+ loadingState.isHeic ? $t('viewer.photoload.loadingHEIC') : $t('viewer.photoload.loading')}}</p><span class="text-xs text-white/60 tabular-nums">diff --git a/app/components/photo/ReactionPicker.vue b/app/components/photo/ReactionPicker.vueindex 980adb4c..a4d18116 100644--- a/app/components/photo/ReactionPicker.vue+++ b/app/components/photo/ReactionPicker.vue@@ -30,16 +30,18 @@ onClickOutside(pickerRef, () => {}})++// 可用的表态选项const reactions = computed<Reaction[]>(() => [- { id: 'like', iconName: 'fluent-emoji-flat:thumbs-up', label: 'like', count: props.reactionCounts?.like || 0 },- { id: 'love', iconName: 'fluent-emoji-flat:red-heart', label: 'love', count: props.reactionCounts?.love || 0 },- { id: 'amazing', iconName: 'fluent-emoji-flat:smiling-face-with-heart-eyes', label: 'amazing', count: props.reactionCounts?.amazing || 0 },- { id: 'funny', iconName: 'fluent-emoji-flat:face-with-tears-of-joy', label: 'funny', count: props.reactionCounts?.funny || 0 },- { id: 'wow', iconName: 'fluent-emoji-flat:face-with-open-mouth', label: 'wow', count: props.reactionCounts?.wow || 0 },- { id: 'sad', iconName: 'fluent-emoji-flat:crying-face', label: 'sad', count: props.reactionCounts?.sad || 0 },- { id: 'fire', iconName: 'fluent-emoji-flat:fire', label: 'fire', count: props.reactionCounts?.fire || 0 },- { id: 'sparkle', iconName: 'fluent-emoji-flat:sparkles', label: 'sparkle', count: props.reactionCounts?.sparkle || 0 },+ { id: 'like', iconName: 'fluent-emoji-flat:thumbs-up', label: $t('viewer.reaction.like'), count: props.reactionCounts?.like || 0 },+ { id: 'love', iconName: 'fluent-emoji-flat:red-heart', label: $t('viewer.reaction.love'), count: props.reactionCounts?.love || 0 },+ { id: 'amazing', iconName: 'fluent-emoji-flat:smiling-face-with-heart-eyes', label: $t('viewer.reaction.amazing'), count: props.reactionCounts?.amazing || 0 },+ { id: 'funny', iconName: 'fluent-emoji-flat:face-with-tears-of-joy', label: $t('viewer.reaction.funny'), count: props.reactionCounts?.funny || 0 },+ { id: 'wow', iconName: 'fluent-emoji-flat:face-with-open-mouth', label: $t('viewer.reaction.wow'), count: props.reactionCounts?.wow || 0 },+ { id: 'sad', iconName: 'fluent-emoji-flat:crying-face', label: $t('viewer.reaction.sad'), count: props.reactionCounts?.sad || 0 },+ { id: 'fire', iconName: 'fluent-emoji-flat:fire', label: $t('viewer.reaction.fire'), count: props.reactionCounts?.fire || 0 },+ { id: 'sparkle', iconName: 'fluent-emoji-flat:sparkles', label: $t('viewer.reaction.sparkle'), count: props.reactionCounts?.sparkle || 0 },])// 格式化数量显示diff --git a/app/composables/useWebGLWorkState.ts b/app/composables/useWebGLWorkState.tsindex cf2e2b7e..09512bc9 100644--- a/app/composables/useWebGLWorkState.ts+++ b/app/composables/useWebGLWorkState.ts@@ -12,9 +12,9 @@ export const useWebGLWorkState = (let message = ''if (state === LoadingState.TEXTURE_LOADING) {- message = '正在创建纹理'+ message = $t('viewer.photoload.loadingTexture')} else if (state === LoadingState.IMAGE_LOADING) {- message = '正在加载图像'+ message = $t('viewer.photoload.loading')}loadingIndicatorRef?.updateLoadingState({diff --git a/i18n/locales/en.json b/i18n/locales/en.jsonindex 0a22aaf9..6500c58b 100644--- a/i18n/locales/en.json+++ b/i18n/locales/en.json@@ -104,7 +104,8 @@"totalPhotosWithRange": "{range}, @:plural.photo total","noPhotosTip": "Nno photos yet, upload some now!"},- "livePhoto": "Live Photo"+ "livePhoto": "Live Photo",+ "indexPanelCountCity":"and more other cities"},"map": {"cluster": {@@ -127,7 +128,23 @@"reaction": {"add": "React","change": "Reacted",- "count": "no reactions | {count} reaction | {count} reactions"+ "count": "no reactions | {count} reaction | {count} reactions",+ "like":"like",+ "love":"love",+ "amazing":"amazing",+ "funny":"funny",+ "wow":"wow",+ "sad":"sad",+ "fire":"fire",+ "sparkle":"sparkle"+ },+ "photoload": {+ "loadError": "Image loading failed",+ "loading": "Loading image",+ "converting": "Converting...",+ "loadingWebGL": "Loading WebGL...",+ "loadingHEIC": "Loading HEIC image...",+ "loadingTexture": "Building texture"}},"exif": {@@ -314,7 +331,7 @@},"signin": {"title": "Sign In",- "subtitle": "Log in to ChronoFrame"+ "subtitle": "Log in to {0}"},"action": {"backToHome": "Back to Home",diff --git a/i18n/locales/ja.json b/i18n/locales/ja.jsonindex 27a62ce2..dbf89b6e 100644--- a/i18n/locales/ja.json+++ b/i18n/locales/ja.json@@ -127,7 +127,23 @@"reaction": {"add": "リアクション","change": "リアクション済み",- "count": "リアクションなし | {count} 件のリアクション | {count} 件のリアクション"+ "count": "リアクションなし | {count} 件のリアクション | {count} 件のリアクション",+ "like": "いいね",+ "love": "ハート",+ "amazing": "憧れ",+ "funny": "笑",+ "wow": "驚",+ "sad": "泣",+ "fire": "炎",+ "sparkle": "星"+ },+ "photoload": {+ "loadError": "画像の読み込みに失敗しました",+ "loading": "画像を読み込み中",+ "converting": "変換中...",+ "loadingWebGL": "WebGLを読み込み中...",+ "loadingHEIC": "HEIC画像を読み込み中...",+ "loadingTexture": "テクスチャを構築中"}},"exif": {@@ -310,7 +326,7 @@"form": {"signin": {"title": "サインイン",- "subtitle": "ChronoFrame にログインします"+ "subtitle": "{0} にログインします"},"action": {"or": "または",diff --git a/i18n/locales/zh-Hans.json b/i18n/locales/zh-Hans.jsonindex aa21d352..a7d88811 100644--- a/i18n/locales/zh-Hans.json+++ b/i18n/locales/zh-Hans.json@@ -107,7 +107,8 @@"stats": {"totalPhotosWithRange": "{range}, 共 @:plural.photo","noPhotosTip": "还没有照片,快去上传一些吧!"- }+ },+ "indexPanelCountCity":"等 {0} 个城市"},"minimap": {"loading": "加载小地图..."@@ -124,7 +125,23 @@"reaction": {"add": "表态","change": "已表态",- "count": "无表态 | {count} 个表态 | {count} 个表态"+ "count": "无表态 | {count} 个表态 | {count} 个表态",+ "like":"点赞",+ "love":"爱心",+ "amazing":"花痴",+ "funny":"笑哭了",+ "wow":"吃惊",+ "sad":"哭",+ "fire":"火焰",+ "sparkle":"星星"+ },+ "photoload": {+ "loadError":"图片加载失败",+ "loading":"正在加载图片",+ "converting":"正在转换中...",+ "loadingWebGL":"正在加载 WebGL...",+ "loadingHEIC":"HEIC 图片加载中...",+ "loadingTexture":"正在构建纹理"}},"exif": {@@ -318,8 +335,8 @@"continue": "继续"},"signin": {- "title": "登入",- "subtitle": "登录到 ChronoFrame"+ "title": "登录",+ "subtitle": "登录到 {0}"},"labels": {"email": "电子邮箱",diff --git a/i18n/locales/zh-Hant-HK.json b/i18n/locales/zh-Hant-HK.jsonindex e11bfb97..088af7e7 100644--- a/i18n/locales/zh-Hant-HK.json+++ b/i18n/locales/zh-Hant-HK.json@@ -124,7 +124,23 @@"reaction": {"add": "表態","change": "已表態",- "count": "無表態 | {count} 個表態 | {count} 個表態"+ "count": "無表態 | {count} 個表態 | {count} 個表態",+ "like": "讚好",+ "love": "心心",+ "amazing": "花癡",+ "funny": "笑哭",+ "wow": "驚訝",+ "sad": "喊",+ "fire": "火焰",+ "sparkle": "星星"+ },+ "photoload": {+ "loadError": "圖片載入失敗",+ "loading": "正在載入圖片",+ "converting": "正在轉換中...",+ "loadingWebGL": "正在載入 WebGL...",+ "loadingHEIC": "HEIC 圖片載入中...",+ "loadingTexture": "正在建立紋理"}},"exif": {@@ -310,7 +326,7 @@"form": {"signin": {"title": "登入",- "subtitle": "登錄到 ChronoFrame"+ "subtitle": "登錄到 {0}"},"action": {"or": "或",diff --git a/i18n/locales/zh-Hant-TW.json b/i18n/locales/zh-Hant-TW.jsonindex ef2dcc0c..b56afd7c 100644--- a/i18n/locales/zh-Hant-TW.json+++ b/i18n/locales/zh-Hant-TW.json@@ -124,7 +124,23 @@"reaction": {"add": "表態","change": "已表態",- "count": "無表態 | {count} 個表態 | {count} 個表態"+ "count": "無表態 | {count} 個表態 | {count} 個表態",+ "like": "讚",+ "love": "愛心",+ "amazing": "花癡",+ "funny": "笑哭",+ "wow": "驚訝",+ "sad": "哭",+ "fire": "火焰",+ "sparkle": "星星"+ },+ "photoload": {+ "loadError": "圖片載入失敗",+ "loading": "正在載入圖片",+ "converting": "正在轉換中...",+ "loadingWebGL": "正在載入 WebGL...",+ "loadingHEIC": "HEIC 圖片載入中...",+ "loadingTexture": "正在建立紋理"}},"exif": {@@ -310,7 +326,7 @@"form": {"signin": {"title": "登入",- "subtitle": "登錄到 ChronoFrame"+ "subtitle": "登錄到 {0}"},"action": {"or": "或",