Support for fr-FR LANG (#172)

This commit is contained in:
Simon J
2023-09-14 16:38:56 +10:00
committed by GitHub
parent a9d88bd9eb
commit 9786d9f1dd
3 changed files with 45 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import { option as O } from "fp-ts";
import _ from "underscore"; 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 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 = export type KEY =
| "AppLinkMessage" | "AppLinkMessage"
| "artists" | "artists"
@@ -129,6 +129,47 @@ const translations: Record<SUPPORTED_LANG, Record<KEY, string>> = {
LOVE: "Synes godt om", LOVE: "Synes godt om",
LOVE_SUCCESS: "Syntes 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": { "nl-NL": {
AppLinkMessage: "Sonos koppelen aan $BNB_SONOS_SERVICE_NAME", AppLinkMessage: "Sonos koppelen aan $BNB_SONOS_SERVICE_NAME",
artists: "Artiesten", artists: "Artiesten",

View File

@@ -34,7 +34,7 @@ describe("i8n", () => {
describe("langs", () => { describe("langs", () => {
it("should be all langs that are explicitly defined", () => { 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"]);
}); });
}); });

View File

@@ -135,8 +135,8 @@ describe("service config", () => {
"Sonos koppelen aan music land" "Sonos koppelen aan music land"
); );
// no fr-FR translation, so use en-US // no pt-BR translation, so use en-US
expect(sonosString("AppLinkMessage", "fr-FR")).toEqual( expect(sonosString("AppLinkMessage", "pt-BR")).toEqual(
"Linking sonos with music land" "Linking sonos with music land"
); );
}); });