Skip to content

Commit

Permalink
prettier update
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Nov 26, 2024
1 parent c1034dd commit 9b3b727
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
14 changes: 7 additions & 7 deletions src/api/focus/keymap/language_maps.js
Original file line number Diff line number Diff line change
@@ -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")
};
44 changes: 23 additions & 21 deletions src/renderer/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,49 @@ 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": {
messages: zh_Hans,
},
};

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) => {
Expand Down

0 comments on commit 9b3b727

Please sign in to comment.