From 0a8ceb9e6349284e75545a01ffad608b020f78e2 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Mon, 11 Dec 2023 01:12:54 +0100 Subject: Actually run prettier --- src/api/middlewares/Translation.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/api/middlewares/Translation.ts') diff --git a/src/api/middlewares/Translation.ts b/src/api/middlewares/Translation.ts index f3a4c8df..e089407e 100644 --- a/src/api/middlewares/Translation.ts +++ b/src/api/middlewares/Translation.ts @@ -27,12 +27,8 @@ const ASSET_FOLDER_PATH = path.join(__dirname, "..", "..", "..", "assets"); export async function initTranslation(router: Router) { const languages = fs.readdirSync(path.join(ASSET_FOLDER_PATH, "locales")); - const namespaces = fs.readdirSync( - path.join(ASSET_FOLDER_PATH, "locales", "en"), - ); - const ns = namespaces - .filter((x) => x.endsWith(".json")) - .map((x) => x.slice(0, x.length - 5)); + const namespaces = fs.readdirSync(path.join(ASSET_FOLDER_PATH, "locales", "en")); + const ns = namespaces.filter((x) => x.endsWith(".json")).map((x) => x.slice(0, x.length - 5)); await i18next .use(i18nextBackend) @@ -43,9 +39,7 @@ export async function initTranslation(router: Router) { fallbackLng: "en", ns, backend: { - loadPath: - path.join(ASSET_FOLDER_PATH, "locales") + - "/{{lng}}/{{ns}}.json", + loadPath: path.join(ASSET_FOLDER_PATH, "locales") + "/{{lng}}/{{ns}}.json", }, load: "all", }); -- cgit 1.5.1