|
|
@ -4,38 +4,101 @@ const languageTranslations = { |
|
|
|
en: { |
|
|
|
bluetoothClass: "BlueTooth class", |
|
|
|
builtBy: "Built by", |
|
|
|
copy: "Copy", |
|
|
|
|
|
|
|
majorService: "Major service", |
|
|
|
majorServiceInformation: "Information", |
|
|
|
majorServiceTelephony: "Telephony", |
|
|
|
majorServiceAudio: "Audio", |
|
|
|
majorServiceObjectTransfer: "Object transfer", |
|
|
|
majorServiceCapturing: "Capturing", |
|
|
|
majorServiceRendering: "Rendering", |
|
|
|
majorServiceNetworking: "Networking", |
|
|
|
majorServicePositioning: "Positioning", |
|
|
|
majorServiceLimitedDiscovery: "Limited discovery", |
|
|
|
|
|
|
|
majorDevice: "Major device", |
|
|
|
majorDeviceUncategorized: "Uncategorized", |
|
|
|
majorDeviceMiscellaneous: "Miscellaneous", |
|
|
|
majorDeviceToy: "Toy", |
|
|
|
majorDeviceWearable: "Wearable", |
|
|
|
majorDeviceImaging: "Imaging", |
|
|
|
majorDevicePeripheral: "Peripheral", |
|
|
|
majorDeviceAudioVideo: "Audio / Video", |
|
|
|
majorDeviceNetworkAccessPoint: "Network access point", |
|
|
|
majorDevicePhone: "Phone", |
|
|
|
majorDeviceComputer: "Computer", |
|
|
|
|
|
|
|
minorDevice: "Minor device", |
|
|
|
minorDeviceToyGame: "Game", |
|
|
|
minorDeviceToyController: "Controller", |
|
|
|
minorDeviceToyDoll: "Doll", |
|
|
|
minorDeviceToyVehicle: "Vehicle", |
|
|
|
minorDeviceToyRobot: "Robot", |
|
|
|
|
|
|
|
clickToCopy: "Click to copy", |
|
|
|
majorService: { |
|
|
|
group: "Major service", |
|
|
|
Information: "Information", |
|
|
|
Telephony: "Telephony", |
|
|
|
Audio: "Audio", |
|
|
|
Transfer: "Transfer", |
|
|
|
Capturing: "Capturing", |
|
|
|
Rendering: "Rendering", |
|
|
|
AccessPoint: "Access point", |
|
|
|
Positioning: "Positioning", |
|
|
|
LimitedDiscovery: "Limited discovery", |
|
|
|
}, |
|
|
|
majorDevice: { |
|
|
|
group: "Major device", |
|
|
|
Uncategorized: "Uncategorized", |
|
|
|
Miscellaneous: "Miscellaneous", |
|
|
|
Toy: "Toy", |
|
|
|
Wearable: "Wearable", |
|
|
|
Imaging: "Imaging", |
|
|
|
Peripheral: "Peripheral", |
|
|
|
AudioVideo: "Media", |
|
|
|
AccessPoint: "Access point", |
|
|
|
Phone: "Phone", |
|
|
|
Computer: "Computer", |
|
|
|
}, |
|
|
|
minorDevice: { |
|
|
|
group: "Minor device", |
|
|
|
None: "No minor devices", |
|
|
|
Toy : { |
|
|
|
Game: "Game", |
|
|
|
Controller: "Controller", |
|
|
|
Doll: "Doll", |
|
|
|
Vehicle: "Vehicle", |
|
|
|
Robot: "Robot", |
|
|
|
}, |
|
|
|
Wearable: { |
|
|
|
Watch: "Watch", |
|
|
|
Pager: "Pager", |
|
|
|
Jacket: "Jacket", |
|
|
|
Helmet: "Helmet", |
|
|
|
Glasses: "Glasses", |
|
|
|
}, |
|
|
|
Imaging: { |
|
|
|
Display: "Display", |
|
|
|
Camera: "Camera", |
|
|
|
Scanner: "Scanner", |
|
|
|
Printer: "Printer", |
|
|
|
}, |
|
|
|
Peripheral: { |
|
|
|
Keyboard: "Keyboard", |
|
|
|
Pointer: "Pointer", |
|
|
|
Uncategorized: "Uncategorized", |
|
|
|
Joystick: "Joystick", |
|
|
|
Gamepad: "Gamepad", |
|
|
|
RemoteControl: "Remote control", |
|
|
|
Sensor: "Sensor", |
|
|
|
Digitizer: "Digitizer", |
|
|
|
CardReader: "Card reader", |
|
|
|
}, |
|
|
|
AudioVideo: { |
|
|
|
Uncategorized: "Uncategorized", |
|
|
|
Headset: "Headset", |
|
|
|
Microphone: "Microphone", |
|
|
|
Loudspeaker: "Loudspeaker", |
|
|
|
Headphones: "Headphones", |
|
|
|
CarAudio: "Car audio", |
|
|
|
VideoCamera: "Video camera", |
|
|
|
Monitor: "Monitor", |
|
|
|
Conferencing: "Conferencing", |
|
|
|
}, |
|
|
|
AccessPoint: { |
|
|
|
Available: "Available", |
|
|
|
Level1: "1-17% use", |
|
|
|
Level2: "17-33% use", |
|
|
|
Level3: "33-50% use", |
|
|
|
Level4: "50-67% use", |
|
|
|
Level5: "67-83% use", |
|
|
|
Level6: "83-99% use", |
|
|
|
Unavailable: "Unavailable", |
|
|
|
}, |
|
|
|
Phone: { |
|
|
|
Uncategorized: "Uncategorized", |
|
|
|
Cell: "Cell", |
|
|
|
Cordless: "Cordless", |
|
|
|
}, |
|
|
|
Computer: { |
|
|
|
Uncategorized: "Uncategorized", |
|
|
|
Desktop: "Desktop", |
|
|
|
Server: "Server", |
|
|
|
Laptop: "Laptop", |
|
|
|
PDA: "PDA", |
|
|
|
Watch: "Watch", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
es: { |
|
|
|
builtBy: "Construido por", |
|
|
@ -75,10 +138,22 @@ function languageChange(language) { |
|
|
|
/** |
|
|
|
* Return translated text based on key-value matching above |
|
|
|
* |
|
|
|
* @param key Translation specifier in above translation map |
|
|
|
* @param path Translation specifier in above translation map, like majorService.title |
|
|
|
*/ |
|
|
|
function translateKey(key) { |
|
|
|
return languageTranslations[languageCurrent][key]; |
|
|
|
function translateKey(path) { |
|
|
|
|
|
|
|
if (path == null) { |
|
|
|
return undefined; |
|
|
|
} |
|
|
|
|
|
|
|
let translation = languageTranslations[languageCurrent]; |
|
|
|
path.split(".").forEach((key) => { |
|
|
|
if (translation != null) { |
|
|
|
translation = translation[key]; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return translation; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|