Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduces Turkish translations #1773

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -179,6 +179,7 @@ For more information: [chatboxai.app](https://chatboxai.app/)
- Français (French)
- Deutsch (German)
- Русский (Russian)
- Türkçe (Turkish)

- **And More...**
:sparkles: Constantly enhancing the experience with new features!
4 changes: 4 additions & 0 deletions src/renderer/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import ko from './locales/ko/translation.json'
import ru from './locales/ru/translation.json'
import de from './locales/de/translation.json'
import fr from './locales/fr/translation.json'
import tr from './locales/tr/translation.json'

import changelogZhHans from './changelogs/changelog_zh_Hans'
import changelogZhHant from './changelogs/changelog_zh_Hant'
@@ -40,6 +41,9 @@ i18n.use(initReactI18next).init({
fr: {
translation: fr,
},
tr: {
translation: tr,
},
},
fallbackLng: 'en',

1 change: 1 addition & 0 deletions src/renderer/i18n/locales.ts
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ export const languageNameMap = {
ru: 'Русский', // Russian
de: 'Deutsch', // German
fr: 'Français', // French
tr: 'Türkçe', // Turkish
}

export const languages = Array.from(Object.keys(languageNameMap)) as Language[]
257 changes: 257 additions & 0 deletions src/renderer/i18n/locales/tr/translation.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/renderer/i18n/parser.ts
Original file line number Diff line number Diff line change
@@ -35,5 +35,8 @@ export function parseLocale(locale: string): Language {
if (locale.startsWith('fr')) {
return 'fr'
}
if (locale.startsWith('tr')) {
return 'tr'
}
return 'en'
}
2 changes: 1 addition & 1 deletion src/shared/types.ts
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ export interface Settings extends ModelSettings {
autoGenerateTitle: boolean
}

export type Language = 'en' | 'zh-Hans' | 'zh-Hant' | 'ja' | 'ko' | 'ru' | 'de' | 'fr'
export type Language = 'en' | 'zh-Hans' | 'zh-Hant' | 'ja' | 'ko' | 'ru' | 'de' | 'fr' | 'tr'

export interface Config {
uuid: string