diff --git a/src/i8n.ts b/src/i8n.ts index 6357d71..7cc9cd4 100644 --- a/src/i8n.ts +++ b/src/i8n.ts @@ -4,7 +4,7 @@ import { option as O } from "fp-ts"; import _ from "underscore"; export type LANG = "en-US" | "da-DK" | "de-DE" | "es-ES" | "fr-FR" | "it-IT" | "ja-JP" | "nb-NO" | "nl-NL" | "pt-BR" | "sv-SE" | "zh-CN" -export type SUPPORTED_LANG = "en-US" | "da-DK" | "nl-NL"; +export type SUPPORTED_LANG = "en-US" | "da-DK" | "fr-FR" | "nl-NL"; export type KEY = | "AppLinkMessage" | "artists" @@ -129,6 +129,47 @@ const translations: Record> = { LOVE: "Synes godt om", LOVE_SUCCESS: "Syntes godt om" }, + "fr-FR": { + AppLinkMessage: "Associer Sonos à $BNB_SONOS_SERVICE_NAME", + artists: "Artistes", + albums: "Albums", + tracks: "Pistes", + playlists: "Playlists", + genres: "Genres", + random: "Aléatoire", + topRated: "Les mieux notés", + recentlyAdded: "Récemment ajouté", + recentlyPlayed: "Récemment joué", + mostPlayed: "Les plus joué", + success: "Succès", + failure: "Échec", + expectedConfig: "Configuration attendue", + existingServiceConfig: "La configuration de service existe", + noExistingServiceRegistration: "Aucun enregistrement de service existant", + register: "Inscription", + removeRegistration: "Supprimer l'inscription", + devices: "Appareils", + services: "Services", + login: "Se connecter", + logInToBonob: "Se connecter à $BNB_SONOS_SERVICE_NAME", + username: "Nom d'utilisateur", + password: "Mot de passe", + successfullyRegistered: "Connecté avec succès", + registrationFailed: "Échec de la connexion !", + successfullyRemovedRegistration: "Inscription supprimée avec succès", + failedToRemoveRegistration: "Échec de la suppression de l'inscription !", + invalidLinkCode: "Code non valide !", + loginSuccessful: "Connexion réussie !", + loginFailed: "La connexion a échoué !", + noSonosDevices: "Aucun appareil Sonos", + favourites: "Favoris", + STAR: "Suivre", + UNSTAR: "Ne plus suivre", + STAR_SUCCESS: "Piste suivie", + UNSTAR_SUCCESS: "Piste non suivie", + LOVE: "Aimer", + LOVE_SUCCESS: "Pistes aimée" + }, "nl-NL": { AppLinkMessage: "Sonos koppelen aan $BNB_SONOS_SERVICE_NAME", artists: "Artiesten", diff --git a/tests/i8n.test.ts b/tests/i8n.test.ts index 3c2b7fe..5f7cbf4 100644 --- a/tests/i8n.test.ts +++ b/tests/i8n.test.ts @@ -34,7 +34,7 @@ describe("i8n", () => { describe("langs", () => { it("should be all langs that are explicitly defined", () => { - expect(langs()).toEqual(["en-US", "da-DK", "nl-NL"]); + expect(langs()).toEqual(["en-US", "da-DK", "fr-FR", "nl-NL"]); }); }); diff --git a/tests/smapi.test.ts b/tests/smapi.test.ts index 3d195a3..f992d35 100644 --- a/tests/smapi.test.ts +++ b/tests/smapi.test.ts @@ -135,8 +135,8 @@ describe("service config", () => { "Sonos koppelen aan music land" ); - // no fr-FR translation, so use en-US - expect(sonosString("AppLinkMessage", "fr-FR")).toEqual( + // no pt-BR translation, so use en-US + expect(sonosString("AppLinkMessage", "pt-BR")).toEqual( "Linking sonos with music land" ); });