2024-07-07 22:11:18 +02:00
|
|
|
import * as React from "bloatless-react";
|
|
|
|
|
|
|
|
|
|
import { currentAddress, primaryChannel } from "./model";
|
|
|
|
|
|
2024-07-07 19:21:08 +02:00
|
|
|
const englishTranslations = {
|
2024-07-07 22:11:18 +02:00
|
|
|
// general
|
|
|
|
|
setInput: "Set",
|
|
|
|
|
connectionStatus: "Connection status",
|
|
|
|
|
connectedTo: React.createProxyState(
|
|
|
|
|
[currentAddress],
|
|
|
|
|
() => `Connected to ${currentAddress}`
|
|
|
|
|
),
|
|
|
|
|
disconnected: "Disconnected",
|
|
|
|
|
|
2024-07-07 19:21:08 +02:00
|
|
|
// settings
|
|
|
|
|
settings: "Settings",
|
2024-07-07 22:11:18 +02:00
|
|
|
connection: "Connection",
|
|
|
|
|
communication: "Communication",
|
|
|
|
|
encryption: "Encryption",
|
|
|
|
|
serverAddress: "Server Address",
|
|
|
|
|
serverAddressPlaceholder: "ws://192.168.0.69:3000",
|
|
|
|
|
connectToServer: "Connect",
|
|
|
|
|
primaryChannel: "Primary channel",
|
|
|
|
|
channelPlaceholder: "my-channel",
|
|
|
|
|
addSecondaryChannel: "Add secondary channel",
|
|
|
|
|
removeSecondaryChannel: "Remove secondary channel",
|
|
|
|
|
newSecondaryChannelPlaceholder: "Add secondary channel",
|
|
|
|
|
encryptionKey: "Encryption key",
|
|
|
|
|
encryptionKeyPlaceholder: "1jg028ej40d",
|
|
|
|
|
showEncryptionKey: "Show encryption key",
|
|
|
|
|
yourName: "Your Name",
|
|
|
|
|
yourNamePlaceholder: "Jane Doe",
|
2024-07-07 19:21:08 +02:00
|
|
|
|
|
|
|
|
// messages
|
2024-07-07 22:11:18 +02:00
|
|
|
messages: "Messages",
|
|
|
|
|
composerPlaceholder: "Type a message...",
|
|
|
|
|
sendMessage: "Send"
|
2024-07-07 19:21:08 +02:00
|
|
|
};
|
|
|
|
|
|
2024-07-07 22:11:18 +02:00
|
|
|
const allTranslations = {
|
2024-07-07 19:21:08 +02:00
|
|
|
en: englishTranslations,
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-07 22:11:18 +02:00
|
|
|
const language = navigator.language.substring(0, 2);
|
|
|
|
|
export const translation: typeof englishTranslations =
|
|
|
|
|
allTranslations[language] ?? allTranslations.en;
|