feat: french translation (#802)

* Add French (fr) language support

- Create app/src/i18n/locales/fr/translation.json with full UI translations
- Register French in SUPPORTED_LANGUAGES and i18next resources
- Wire French locale from date-fns for relative date formatting

* Fix Vite file watcher EBUSY error on Windows by excluding Rust target directory
This commit is contained in:
youtsuho
2026-06-28 16:33:27 -07:00
committed by GitHub
parent e294b9c8f0
commit b9bb2f075c
4 changed files with 1248 additions and 2 deletions
+3
View File
@@ -6,6 +6,7 @@ import ja from './locales/ja/translation.json';
import ptBR from './locales/pt-BR/translation.json';
import zhCN from './locales/zh-CN/translation.json';
import zhTW from './locales/zh-TW/translation.json';
import fr from './locales/fr/translation.json';
export const SUPPORTED_LANGUAGES = [
{ code: 'en', label: 'English' },
@@ -13,6 +14,7 @@ export const SUPPORTED_LANGUAGES = [
{ code: 'ja', label: '日本語' },
{ code: 'zh-CN', label: '简体中文' },
{ code: 'zh-TW', label: '繁體中文' },
{ code: 'fr', label: 'Français' },
] as const;
export type LanguageCode = (typeof SUPPORTED_LANGUAGES)[number]['code'];
@@ -27,6 +29,7 @@ i18n
ja: { translation: ja },
'zh-CN': { translation: zhCN },
'zh-TW': { translation: zhTW },
fr: { translation: fr },
},
fallbackLng: 'en',
supportedLngs: SUPPORTED_LANGUAGES.map((l) => l.code),
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -1,5 +1,5 @@
import { formatDistance } from 'date-fns';
import { ja, zhCN, zhTW } from 'date-fns/locale';
import { ja, zhCN, zhTW, fr } from 'date-fns/locale';
import i18n from '@/i18n';
export function formatDuration(seconds: number): string {
@@ -16,6 +16,8 @@ function getDateLocale() {
return zhCN;
case 'zh-TW':
return zhTW;
case 'fr':
return fr;
default:
return undefined;
}
+1 -1
View File
@@ -27,7 +27,7 @@ export default defineConfig({
strictPort: true,
// Watch files in the app directory for changes
watch: {
ignored: ['!**/../app/**'],
ignored: ['!**/../app/**', '**/target/**'],
},
},
envPrefix: ['VITE_', 'TAURI_'],