mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Support for fr-FR LANG (#172)
This commit is contained in:
43
src/i8n.ts
43
src/i8n.ts
@@ -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",
|
||||||
|
|||||||
@@ -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"]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user