Skip to content

Commit 2a9ebed

Browse files
feat(ui): add Japanese translation from karokaro and Traditional Chinese translation from HYA
1 parent 018f130 commit 2a9ebed

5 files changed

Lines changed: 785 additions & 0 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ Stylized and customizable Stellaris maps
3333

3434
# Credits
3535

36+
Special thanks to the translators:
37+
38+
- HYA for Traditional Chinese
39+
- karokaro for Japanese
40+
3641
The app icon is [Orbital](https://game-icons.net/1x1/lorc/orbital.html) by Lorc, licensed under [CC BY 3.0](http://creativecommons.org/licenses/by/3.0/).
3742

3843
Map icons are made by me. Basic shapes are released to the public domain, but others (Wormhole, Gateway, L-Gate, etc) are based on icons from the game Stellaris, and should not be used other than for tools or mods for the game.

src/renderer/src/intl/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import IntlMessageFormat, { type FormatXMLElementFn, type PrimitiveType } from 'intl-messageformat';
22
import { derived, writable } from 'svelte/store';
33
import enUS from './en-US';
4+
import jaJP from './ja-JP';
5+
import zhTW from './zh-TW';
46

57
type Paths<T> = T extends object
68
? {
@@ -23,6 +25,8 @@ function flattenMessages(messages: UnflattenedMessages, prefix = ''): Record<str
2325

2426
const locales = {
2527
'en-US': flattenMessages(enUS) as Record<MessageID, string>,
28+
'ja-JP': flattenMessages(jaJP) as Partial<Record<MessageID, string>>,
29+
'zh-TW': flattenMessages(zhTW) as Partial<Record<MessageID, string>>,
2630
ENGLISH: Object.fromEntries(
2731
Object.entries(flattenMessages(enUS)).map(([k, v]) => [k, v.toUpperCase()]),
2832
) as Partial<Record<MessageID, string>>,

0 commit comments

Comments
 (0)