1
0
mirror of https://github.com/NickKaramoff/toot synced 2025-02-11 01:00:53 +01:00

Enable Chinese (Simplified) locale (#85)

This commit is contained in:
Nikita Karamov 2025-01-25 10:04:16 +01:00 committed by GitHub
commit 15f4dddfcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,8 @@ and this project adheres to
### Added ### Added
- Share2Fedi now adds a proper user agent header with project information - Share2Fedi now adds a proper user agent header with project information
- new translation languages
- Simplified Chinese (thx [Poesty](https://social.qunn.eu/user)!)
### Changed ### Changed
@ -31,7 +33,7 @@ and this project adheres to
## [3.1.0] - 2024-02-12 ## [3.1.0] - 2024-02-12
## Added ### Added
- new translation languages - new translation languages
- Nederlands/Dutch (thx [Heimen](https://github.com/Vistaus)!) - Nederlands/Dutch (thx [Heimen](https://github.com/Vistaus)!)

View File

@ -13,6 +13,7 @@ import es from "./translations/es.json";
import fr from "./translations/fr.json"; import fr from "./translations/fr.json";
import nl from "./translations/nl.json"; import nl from "./translations/nl.json";
import ru from "./translations/ru.json"; import ru from "./translations/ru.json";
import zhHans from "./translations/zh-Hans.json";
export const languages = { export const languages = {
ar: { autonym: "العربية", dir: "rtl" }, ar: { autonym: "العربية", dir: "rtl" },
@ -22,6 +23,7 @@ export const languages = {
fr: { autonym: "Français", dir: "ltr" }, fr: { autonym: "Français", dir: "ltr" },
nl: { autonym: "Nederlands", dir: "ltr" }, nl: { autonym: "Nederlands", dir: "ltr" },
ru: { autonym: "Русский", dir: "ltr" }, ru: { autonym: "Русский", dir: "ltr" },
"zh-Hans": { autonym: "中文(简体)", dir: "ltr" },
}; };
export const strings: Record<keyof typeof languages, Record<string, string>> = { export const strings: Record<keyof typeof languages, Record<string, string>> = {
@ -32,6 +34,7 @@ export const strings: Record<keyof typeof languages, Record<string, string>> = {
fr, fr,
nl, nl,
ru, ru,
"zh-Hans": zhHans,
} as const; } as const;
export const defaultLanguage: keyof typeof strings = "en"; export const defaultLanguage: keyof typeof strings = "en";