Skip to content

Commit

Permalink
restore eslint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Nov 25, 2024
1 parent ab17353 commit 53f7667
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/renderer/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,29 @@ 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 // eslint-disable-line import/no-named-as-default-member
.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) => {
const key = "devices." + device?.info.vendor + "." + device?.info.product + ".updateInstructions";
const instructions = {
updateInstructions: i18n.exists(key) ? i18n.t(key) : undefined,
updateInstructions: i18n.exists(key) ? i18n.t(key) : undefined, // eslint-disable-line import/no-named-as-default-member
};
i18n.addResource(code, "messages", "hardware", instructions);
});
Expand Down

0 comments on commit 53f7667

Please sign in to comment.