Skip to content

Commit

Permalink
feat(i18n): french translation (#83)
Browse files Browse the repository at this point in the history
Co-Authored-By: [email protected]
  • Loading branch information
gorillamoe authored Jan 22, 2025
1 parent 8fab0ea commit 98ccc5d
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bananas",
"version": "0.0.20",
"version": "0.0.21",
"description": "Bananas Screen Sharing is a simple and easy-to-use screen sharing tool for Mac, Windows, and Linux.",
"main": "./out/main/index.js",
"author": {
Expand Down
52 changes: 52 additions & 0 deletions src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { BaseTranslation } from '../i18n-types'

const fr = {
about: 'À propos',
advanced: 'Avancé',
basic: 'De base',
cancel: 'Annuler',
choose_a_color: 'Choisir une couleur',
code_of_conduct: 'Code de conduite',
color: 'Couleur',
connect: 'Connecter',
connection_established: 'Connexion établie',
copy_my_connection_string: 'Copier ma chaîne de connexion',
disconnect: 'Déconnecter',
fullscreen: 'Plein écran',
host_a_session: 'Héberger une session',
host_connection_string: 'Chaîne de connexion de l’hôte',
hosting_a_session: 'Hébergement d’une session',
is_microphone_active_on_connect: 'Le microphone est-il actif à la connexion',
join_a_session: 'Rejoindre une session',
joined_a_session: 'Session rejointe',
language: 'Langue',
language_description:
"Choisissez votre langue préférée (après avoir changé la langue, vous devez redémarrer l'application)",
media: 'Médias',
microphone_active: 'Microphone actif',
microphone_inactive: 'Microphone inactif',
not_streaming_your_display: 'Ne diffuse pas votre écran',
participant_connection_string: 'Chaîne de connexion du participant',
privacty_policy: 'Politique de confidentialité',
remote_cursors_disabled: 'Curseurs distants désactivés',
remote_cursors_enabled: 'Curseurs distants activés',
remote_screen: 'Écran distant',
report_a_bug: 'Signaler un bug',
save: 'Enregistrer',
see_the_code: 'Voir le code',
session_started: 'Session commencée',
settings: 'Paramètres',
shoulders_of_giants: 'Épaules des géants',
shoulders_of_giants_description:
'Bananas Screen Sharing est construit sur les projets open-source suivants (dans un ordre aléatoire)',
start_a_new_session: 'Commencer une nouvelle session',
streaming_your_display: 'Diffusion de votre écran',
stun_turn_server_objects: 'Objets du serveur STUN/TURN (séparés par des nouvelles lignes)',
terms_of_service: 'Conditions de service',
username: 'Nom d’utilisateur',
website: 'Site web',
zoom_in: 'Zoomer',
zoom_out: 'Dézoomer'
} satisfies BaseTranslation

export default fr
2 changes: 1 addition & 1 deletion src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'ty
export type BaseTranslation = BaseTranslationType
export type BaseLocale = 'en'

export type Locales = 'de' | 'en' | 'zh'
export type Locales = 'de' | 'en' | 'fr' | 'zh'

export type Translation = RootTranslation

Expand Down
1 change: 1 addition & 0 deletions src/i18n/i18n-util.async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { loadedFormatters, loadedLocales, locales } from './i18n-util'
const localeTranslationLoaders = {
de: () => import('./de'),
en: () => import('./en'),
fr: () => import('./fr'),
zh: () => import('./zh')
}

Expand Down
2 changes: 2 additions & 0 deletions src/i18n/i18n-util.sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import { loadedFormatters, loadedLocales, locales } from './i18n-util'

import de from './de'
import en from './en'
import fr from './fr'
import zh from './zh'

const localeTranslations = {
de,
en,
fr,
zh
}

Expand Down
2 changes: 1 addition & 1 deletion src/i18n/i18n-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { Formatters, Locales, Translations, TranslationFunctions } from './

export const baseLocale: Locales = 'en'

export const locales: Locales[] = ['de', 'en', 'zh']
export const locales: Locales[] = ['de', 'en', 'fr', 'zh']

export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales)

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
let usernameValue: string = 'Banana Joe'
let colorValue: string = '#ffffff'
let language = 'en'
const languageOptions = ['en', 'de', 'zh']
const languageOptions = ['en', 'de', 'fr', 'zh']
let iceServersValue: string = '{ "urls": "stun:stun.l.google.com:19302" }'
let isUsernameValid = false
let isColorValid = false
Expand Down

0 comments on commit 98ccc5d

Please sign in to comment.