feat: add i18n

This commit is contained in:
kawamataryo
2024-12-07 22:40:33 +09:00
parent 3c03d99a16
commit fc91c4d3a2
21 changed files with 1882 additions and 93 deletions

View File

@@ -1,5 +1,16 @@
import type { Preview } from "@storybook/react";
import "../src/style.content.css";
import messages from "../locales/en/messages.json";
const getMessage = (key: string, placeholders: string[]) => {
return messages[key].message
};
window.chrome = {
i18n: {
getMessage: getMessage,
} as typeof chrome.i18n,
} as typeof chrome;
const preview: Preview = {
parameters: {