diff --git a/src/api/focus/keymap/language_maps.js b/src/api/focus/keymap/language_maps.js index f48792ade..9d6f4e6ce 100644 --- a/src/api/focus/keymap/language_maps.js +++ b/src/api/focus/keymap/language_maps.js @@ -1,11 +1,11 @@ // This file is auto-generated. Do not edit manually. export const languageMaps = { - "de": require("./cldr_languages/de.json"), - "en": require("./cldr_languages/en.json"), - "es": require("./cldr_languages/es.json"), - "fr": require("./cldr_languages/fr.json"), - "id": require("./cldr_languages/id.json"), + de: require("./cldr_languages/de.json"), + en: require("./cldr_languages/en.json"), + es: require("./cldr_languages/es.json"), + fr: require("./cldr_languages/fr.json"), + id: require("./cldr_languages/id.json"), "nb-NO": require("./cldr_languages/nb_no.json"), - "nl": require("./cldr_languages/nl.json"), - "zh-Hans": require("./cldr_languages/zh_hans.json") + nl: require("./cldr_languages/nl.json"), + "zh-Hans": require("./cldr_languages/zh_hans.json"), }; diff --git a/src/renderer/i18n.js b/src/renderer/i18n.js index 62243c0ad..c98af375f 100644 --- a/src/renderer/i18n.js +++ b/src/renderer/i18n.js @@ -11,25 +11,25 @@ import i18n from "i18next"; import { initReactI18next } from "react-i18next"; const resources = { - "de": { + de: { messages: de, }, - "en": { + en: { messages: en, }, - "es": { + es: { messages: es, }, - "fr": { + fr: { messages: fr, }, - "id": { + id: { messages: id, }, "nb-NO": { messages: nb_NO, }, - "nl": { + nl: { messages: nl, }, "zh-Hans": { @@ -37,23 +37,21 @@ const resources = { }, }; -i18n - .use(initReactI18next) - .init({ - react: { - useSuspense: true, - }, - resources: resources, - lng: "en", - keySeparator: ".", - ns: ["messages"], - returnEmptyString: true, - defaultNS: "messages", - fallbackLng: "en", - interpolation: { - escapeValue: false, - }, - }); +i18n.use(initReactI18next).init({ + react: { + useSuspense: true, + }, + resources: resources, + lng: "en", + keySeparator: ".", + ns: ["messages"], + returnEmptyString: true, + defaultNS: "messages", + fallbackLng: "en", + interpolation: { + escapeValue: false, + }, +}); i18n.refreshHardware = (device) => { Object.keys(i18n.options.resources).forEach((code) => { diff --git a/src/renderer/utils/connectToSerialport.js b/src/renderer/utils/connectToSerialport.js index 72ad6fc2a..3cee2e9fa 100644 --- a/src/renderer/utils/connectToSerialport.js +++ b/src/renderer/utils/connectToSerialport.js @@ -27,13 +27,15 @@ export const connectToSerialport = async (targetVid, targetPid) => { while (!serialPort) { try { let filters = supportedDeviceVIDPIDs(); - + // If we have target VID/PID, only look for that specific device if (targetVid && targetPid) { - filters = [{ - usbVendorId: targetVid, - usbProductId: targetPid - }]; + filters = [ + { + usbVendorId: targetVid, + usbProductId: targetPid, + }, + ]; } serialPort = await navigator.serial.requestPort({