Skip to content

Commit 4c33d5d

Browse files
committed
feat: enhance localization and update AI configuration for improved translation support
1 parent bfc22a7 commit 4c33d5d

8 files changed

Lines changed: 71 additions & 71 deletions

File tree

src/lib/languages.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ export const AVAILABLE_LANGUAGES: Language[] = [
6060
nativeName: 'Português',
6161
flag: '🇵🇹',
6262
dir: 'ltr'
63-
},
64-
{
65-
code: 'ar',
66-
name: 'Arabic',
67-
nativeName: 'العربية',
68-
flag: '🇸🇦',
69-
dir: 'rtl'
7063
}
64+
// {
65+
// code: 'ar',
66+
// name: 'Arabic',
67+
// nativeName: 'العربية',
68+
// flag: '🇸🇦',
69+
// dir: 'rtl'
70+
// }
7171
];
7272

7373
/**

src/locales/de.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-29T11:50:39.124Z\n"
6-
"PO-Revision-Date: 2026-01-01T19:15:34.888Z\n"
6+
"PO-Revision-Date: 2026-01-01T19:24:10.102Z\n"
77
"Last-Translator: \n"
88
"Language: de\n"
99
"Language-Team: \n"
@@ -11334,31 +11334,31 @@ msgstr "Timer aktualisieren"
1133411334

1133511335
#: src/routes/apps/(app)/note-taker/+page.svelte
1133611336
msgid "Search notes..."
11337-
msgstr ""
11337+
msgstr "Notizen suchen..."
1133811338

1133911339
#: src/routes/apps/(app)/note-taker/+page.svelte
1134011340
msgid "Sync now"
11341-
msgstr ""
11341+
msgstr "Jetzt synchronisieren"
1134211342

1134311343
#: src/routes/apps/(app)/note-taker/+page.svelte
1134411344
msgid "<0/> You are currently offline. Changes will be saved locally and synced when you reconnect."
11345-
msgstr ""
11345+
msgstr "<0/> Du bist derzeit offline. Änderungen werden lokal gespeichert und synchronisiert, wenn du dich wieder verbindest."
1134611346

1134711347
#: src/routes/apps/(app)/note-taker/+page.svelte
1134811348
msgid "Create your first note to get started"
11349-
msgstr ""
11349+
msgstr "Erstelle deine erste Notiz, um loszulegen."
1135011350

1135111351
#: src/routes/apps/(app)/note-taker/+page.svelte
1135211352
msgid "Local"
11353-
msgstr ""
11353+
msgstr "Lokal"
1135411354

1135511355
#: src/routes/apps/(app)/note-taker/+page.svelte
1135611356
msgid "View"
11357-
msgstr ""
11357+
msgstr "Ansicht"
1135811358

1135911359
#: src/lib/components/home/Banner.svelte
1136011360
msgid "Happy New Year 2026! Check out our <0>2025 Timeline</0> <1/>"
11361-
msgstr ""
11361+
msgstr "Frohes neues Jahr 2026! Schau dir unsere <0>2025-Zeitleiste</0> <1/> an"
1136211362

1136311363
#~ msgid "🎉 New Year 2026 Edition"
1136411364
#~ msgstr ""

src/locales/es.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-24T09:30:24.050Z\n"
6-
"PO-Revision-Date: 2026-01-01T19:15:34.813Z\n"
6+
"PO-Revision-Date: 2026-01-01T19:24:09.986Z\n"
77
"Last-Translator: \n"
88
"Language: es\n"
99
"Language-Team: \n"
@@ -11247,31 +11247,31 @@ msgstr "Actualizar temporizador"
1124711247

1124811248
#: src/routes/apps/(app)/note-taker/+page.svelte
1124911249
msgid "Search notes..."
11250-
msgstr ""
11250+
msgstr "Buscar notas..."
1125111251

1125211252
#: src/routes/apps/(app)/note-taker/+page.svelte
1125311253
msgid "Sync now"
11254-
msgstr ""
11254+
msgstr "Sincronizar ahora"
1125511255

1125611256
#: src/routes/apps/(app)/note-taker/+page.svelte
1125711257
msgid "<0/> You are currently offline. Changes will be saved locally and synced when you reconnect."
11258-
msgstr ""
11258+
msgstr "<0/> Actualmente estás sin conexión. Los cambios se guardarán localmente y se sincronizarán cuando te reconectes."
1125911259

1126011260
#: src/routes/apps/(app)/note-taker/+page.svelte
1126111261
msgid "Create your first note to get started"
11262-
msgstr ""
11262+
msgstr "Crea tu primera nota para empezar"
1126311263

1126411264
#: src/routes/apps/(app)/note-taker/+page.svelte
1126511265
msgid "Local"
11266-
msgstr ""
11266+
msgstr "Local"
1126711267

1126811268
#: src/routes/apps/(app)/note-taker/+page.svelte
1126911269
msgid "View"
11270-
msgstr ""
11270+
msgstr "Ver"
1127111271

1127211272
#: src/lib/components/home/Banner.svelte
1127311273
msgid "Happy New Year 2026! Check out our <0>2025 Timeline</0> <1/>"
11274-
msgstr ""
11274+
msgstr "¡Feliz Año Nuevo 2026! Consulta nuestra <0>línea de tiempo 2025</0> <1/>"
1127511275

1127611276
#~ msgid "🎉 New Year 2026 Edition"
1127711277
#~ msgstr ""

src/locales/fr.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-24T09:30:24.086Z\n"
6-
"PO-Revision-Date: 2026-01-01T19:15:34.843Z\n"
6+
"PO-Revision-Date: 2026-01-01T19:24:10.048Z\n"
77
"Last-Translator: \n"
88
"Language: fr\n"
99
"Language-Team: \n"
@@ -11392,31 +11392,31 @@ msgstr "Mettre à jour le minuteur"
1139211392

1139311393
#: src/routes/apps/(app)/note-taker/+page.svelte
1139411394
msgid "Search notes..."
11395-
msgstr ""
11395+
msgstr "Rechercher des notes..."
1139611396

1139711397
#: src/routes/apps/(app)/note-taker/+page.svelte
1139811398
msgid "Sync now"
11399-
msgstr ""
11399+
msgstr "Synchroniser maintenant"
1140011400

1140111401
#: src/routes/apps/(app)/note-taker/+page.svelte
1140211402
msgid "<0/> You are currently offline. Changes will be saved locally and synced when you reconnect."
11403-
msgstr ""
11403+
msgstr "<0/> Vous êtes actuellement hors ligne. Les modifications seront enregistrées localement et synchronisées lorsque vous vous reconnecterez."
1140411404

1140511405
#: src/routes/apps/(app)/note-taker/+page.svelte
1140611406
msgid "Create your first note to get started"
11407-
msgstr ""
11407+
msgstr "Créez votre première note pour commencer"
1140811408

1140911409
#: src/routes/apps/(app)/note-taker/+page.svelte
1141011410
msgid "Local"
11411-
msgstr ""
11411+
msgstr "Local"
1141211412

1141311413
#: src/routes/apps/(app)/note-taker/+page.svelte
1141411414
msgid "View"
11415-
msgstr ""
11415+
msgstr "Vue"
1141611416

1141711417
#: src/lib/components/home/Banner.svelte
1141811418
msgid "Happy New Year 2026! Check out our <0>2025 Timeline</0> <1/>"
11419-
msgstr ""
11419+
msgstr "Bonne année 2026 ! Découvrez notre <0>chronologie 2025</0> <1/>"
1142011420

1142111421
#~ msgid "🎉 New Year 2026 Edition"
1142211422
#~ msgstr ""

src/locales/ja.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-11-25T13:35:46.344Z\n"
6-
"PO-Revision-Date: 2026-01-01T19:15:34.948Z\n"
6+
"PO-Revision-Date: 2026-01-01T19:24:10.155Z\n"
77
"Last-Translator: \n"
88
"Language: ja\n"
99
"Language-Team: \n"
@@ -11174,31 +11174,31 @@ msgstr "タイマーを更新"
1117411174

1117511175
#: src/routes/apps/(app)/note-taker/+page.svelte
1117611176
msgid "Search notes..."
11177-
msgstr ""
11177+
msgstr "ノートを検索..."
1117811178

1117911179
#: src/routes/apps/(app)/note-taker/+page.svelte
1118011180
msgid "Sync now"
11181-
msgstr ""
11181+
msgstr "今すぐ同期"
1118211182

1118311183
#: src/routes/apps/(app)/note-taker/+page.svelte
1118411184
msgid "<0/> You are currently offline. Changes will be saved locally and synced when you reconnect."
11185-
msgstr ""
11185+
msgstr "<0/> 現在、オフラインです。変更はローカルに保存され、再接続時に同期されます。"
1118611186

1118711187
#: src/routes/apps/(app)/note-taker/+page.svelte
1118811188
msgid "Create your first note to get started"
11189-
msgstr ""
11189+
msgstr "はじめのノートを作成して始めましょう"
1119011190

1119111191
#: src/routes/apps/(app)/note-taker/+page.svelte
1119211192
msgid "Local"
11193-
msgstr ""
11193+
msgstr "ローカル"
1119411194

1119511195
#: src/routes/apps/(app)/note-taker/+page.svelte
1119611196
msgid "View"
11197-
msgstr ""
11197+
msgstr "表示"
1119811198

1119911199
#: src/lib/components/home/Banner.svelte
1120011200
msgid "Happy New Year 2026! Check out our <0>2025 Timeline</0> <1/>"
11201-
msgstr ""
11201+
msgstr "2026年、明けましておめでとうございます!私たちの <0>2025年のタイムライン</0> <1/> をご覧ください"
1120211202

1120311203
#~ msgid "🎉 New Year 2026 Edition"
1120411204
#~ msgstr ""

src/locales/pt.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-24T09:30:24.154Z\n"
6-
"PO-Revision-Date: 2026-01-01T19:15:34.969Z\n"
6+
"PO-Revision-Date: 2026-01-01T19:24:10.182Z\n"
77
"Last-Translator: \n"
88
"Language: pt\n"
99
"Language-Team: \n"
@@ -11383,31 +11383,31 @@ msgstr "Atualizar Cronômetro"
1138311383

1138411384
#: src/routes/apps/(app)/note-taker/+page.svelte
1138511385
msgid "Search notes..."
11386-
msgstr ""
11386+
msgstr "Procurar notas..."
1138711387

1138811388
#: src/routes/apps/(app)/note-taker/+page.svelte
1138911389
msgid "Sync now"
11390-
msgstr ""
11390+
msgstr "Sincronizar agora"
1139111391

1139211392
#: src/routes/apps/(app)/note-taker/+page.svelte
1139311393
msgid "<0/> You are currently offline. Changes will be saved locally and synced when you reconnect."
11394-
msgstr ""
11394+
msgstr "<0/> Você está offline no momento. As alterações serão salvas localmente e sincronizadas quando você se reconectar."
1139511395

1139611396
#: src/routes/apps/(app)/note-taker/+page.svelte
1139711397
msgid "Create your first note to get started"
11398-
msgstr ""
11398+
msgstr "Crie sua primeira nota para começar"
1139911399

1140011400
#: src/routes/apps/(app)/note-taker/+page.svelte
1140111401
msgid "Local"
11402-
msgstr ""
11402+
msgstr "Local"
1140311403

1140411404
#: src/routes/apps/(app)/note-taker/+page.svelte
1140511405
msgid "View"
11406-
msgstr ""
11406+
msgstr "Visualizar"
1140711407

1140811408
#: src/lib/components/home/Banner.svelte
1140911409
msgid "Happy New Year 2026! Check out our <0>2025 Timeline</0> <1/>"
11410-
msgstr ""
11410+
msgstr "Feliz Ano Novo de 2026! Confira nossa <0>Linha do Tempo de 2025</0> <1/>"
1141111411

1141211412
#~ msgid "🎉 New Year 2026 Edition"
1141311413
#~ msgstr ""

src/locales/zh.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-28T05:41:42.596Z\n"
6-
"PO-Revision-Date: 2026-01-01T19:15:34.922Z\n"
6+
"PO-Revision-Date: 2026-01-01T19:24:10.128Z\n"
77
"Last-Translator: \n"
88
"Language: zh\n"
99
"Language-Team: \n"
@@ -11187,31 +11187,31 @@ msgstr "更新计时器"
1118711187

1118811188
#: src/routes/apps/(app)/note-taker/+page.svelte
1118911189
msgid "Search notes..."
11190-
msgstr ""
11190+
msgstr "搜索笔记..."
1119111191

1119211192
#: src/routes/apps/(app)/note-taker/+page.svelte
1119311193
msgid "Sync now"
11194-
msgstr ""
11194+
msgstr "立即同步"
1119511195

1119611196
#: src/routes/apps/(app)/note-taker/+page.svelte
1119711197
msgid "<0/> You are currently offline. Changes will be saved locally and synced when you reconnect."
11198-
msgstr ""
11198+
msgstr "<0/> 您当前处于离线状态。更改将本地保存,并在重新连接时同步。"
1119911199

1120011200
#: src/routes/apps/(app)/note-taker/+page.svelte
1120111201
msgid "Create your first note to get started"
11202-
msgstr ""
11202+
msgstr "创建你的第一条笔记以开始使用"
1120311203

1120411204
#: src/routes/apps/(app)/note-taker/+page.svelte
1120511205
msgid "Local"
11206-
msgstr ""
11206+
msgstr "本地"
1120711207

1120811208
#: src/routes/apps/(app)/note-taker/+page.svelte
1120911209
msgid "View"
11210-
msgstr ""
11210+
msgstr "查看"
1121111211

1121211212
#: src/lib/components/home/Banner.svelte
1121311213
msgid "Happy New Year 2026! Check out our <0>2025 Timeline</0> <1/>"
11214-
msgstr ""
11214+
msgstr "新年快乐,2026 年!请查看我们的 <0>2025 时间线</0> <1/>"
1121511215

1121611216
#~ msgid "🎉 New Year 2026 Edition"
1121711217
#~ msgstr ""

wuchale.config.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ export default defineConfig({
2424
files: ['src/**/+{page,layout}.{js,ts}', 'src/**/+{page,layout}.server.{js,ts}']
2525
})
2626
},
27-
// ai: {
28-
// name: 'OpenAI GPT-5 Nano',
29-
// batchSize: 45,
30-
// parallel: 8,
31-
// translate: async (messages, instruction) => {
32-
// const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
33-
// const response = await client.chat.completions.create({
34-
// model: 'gpt-5-nano',
35-
// messages: [
36-
// { role: 'system', content: instruction },
37-
// { role: 'user', content: messages }
38-
// ]
39-
// });
40-
// return response.choices[0].message.content || '';
41-
// }
42-
// }
27+
ai: {
28+
name: 'OpenAI GPT-5 Nano',
29+
batchSize: 45,
30+
parallel: 8,
31+
translate: async (messages, instruction) => {
32+
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
33+
const response = await client.chat.completions.create({
34+
model: 'gpt-5-nano',
35+
messages: [
36+
{ role: 'system', content: instruction },
37+
{ role: 'user', content: messages }
38+
]
39+
});
40+
return response.choices[0].message.content || '';
41+
}
42+
}
4343
});

0 commit comments

Comments
 (0)