Compare commits

..

2 Commits

Author SHA1 Message Date
last2014 6b35112d1e 1.0.2 2026-05-26 20:04:24 +09:00
last2014 1dee79e3ec Del: i18n.ts 2026-05-26 20:04:19 +09:00
2 changed files with 1 additions and 29 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "earthquake-bot-for-mtweet",
"version": "1.0.1",
"version": "1.0.2",
"type": "module",
"main": "dist/index.js",
"scripts": {
-28
View File
@@ -1,28 +0,0 @@
import i18next from "i18next";
import config from "@/lib/config";
import { parse as yamlParse } from "yaml";
import { readFileSync } from "node:fs";
const translation = Object.fromEntries(Object.entries(
yamlParse(readFileSync(`${import.meta.dirname}/../../locales/ja.yaml`, "utf-8"))
).map(([key, value]) => [
key,
typeof value === "string"
? value.trim()
: value,
]));
export default async function initI18n() {
await i18next.init({
lng: "ja",
debug: config.debug,
resources: {
ja: {
translation,
},
},
interpolation: {
escapeValue: false,
},
});
};