Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
414 changes: 414 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"systeminformation": "5.21.15",
"tree-kill": "1.2.2",
"vue": "3.5.13",
"vue-i18n": "10.0.5",
"vuedraggable": "4.1.0",
"vuex": "4.0.2",
"zod": "3.22.4"
Expand All @@ -79,6 +80,7 @@
},
"devDependencies": {
"@chromatic-com/storybook": "1.5.0",
"@intlify/unplugin-vue-i18n": "6.0.3",
"@openapitools/openapi-generator-cli": "2.15.3",
"@playwright/test": "1.48.2",
"@quasar/vite-plugin": "1.8.1",
Expand Down
13 changes: 8 additions & 5 deletions src/components/Talk/AudioDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
マウスホイールを使って<br />
スライダーを微調整できます。
</p>
ホイール: ±0.1<br />
<span v-if="isMac">Command</span><span v-else>Ctrl</span> + ホイール:
±0.01<br />
<span v-if="isMac">Option</span><span v-else>Alt</span> + ホイール:
一括調整
{{ t("message.wheel") }}: ±0.1<br />
<span v-if="isMac">Command</span><span v-else>Ctrl</span> +
{{ t("message.wheel") }}: ±0.01<br />
<span v-if="isMac">Option</span><span v-else>Alt</span> +
{{ t("message.wheel") }}: 一括調整
</ToolTip>
<AccentPhrase
v-for="(accentPhrase, accentPhraseIndex) in accentPhrases"
Expand All @@ -82,6 +82,7 @@

<script setup lang="ts">
import { computed, nextTick, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import AccentPhrase from "./AccentPhrase.vue";
import ToolTip from "@/components/ToolTip.vue";
import { useStore } from "@/store";
Expand All @@ -92,6 +93,8 @@ import { useShiftKey, useAltKey } from "@/composables/useModifierKey";
import { useHotkeyManager } from "@/plugins/hotkeyPlugin";
import { handlePossiblyNotMorphableError } from "@/store/audioGenerate";

const { t } = useI18n();

const props = defineProps<{
activeAudioKey: AudioKey;
}>();
Expand Down
5 changes: 5 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"message": {
"wheel": "wheel"
}
}
5 changes: 5 additions & 0 deletions src/locales/ja.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"message": {
"wheel": "ホイール"
}
}
18 changes: 18 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { createApp } from "vue";
import { createI18n } from "vue-i18n";
import { createGtm } from "@gtm-support/vue-gtm";
import { Quasar, Dialog, Loading, Notify } from "quasar";
import iconSet from "quasar/icon-set/material-icons";
import { store, storeKey } from "./store";
import { ipcMessageReceiver } from "./plugins/ipcMessageReceiverPlugin";
import { hotkeyPlugin } from "./plugins/hotkeyPlugin";

import en from "./locales/en.json";
import ja from "./locales/ja.json";

import App from "@/components/App.vue";
import { markdownItPlugin } from "@/plugins/markdownItPlugin";

Expand All @@ -16,6 +21,18 @@ import "./styles/_index.scss";
// ため、それを防止するため自前でdataLayerをあらかじめ用意する
window.dataLayer = [];

type MessageSchema = typeof ja;

const i18n = createI18n<[MessageSchema], "en" | "ja">({
legacy: false,
locale: "ja",
fallbackLocale: "en",
messages: {
en,
ja,
},
});

createApp(App)
.use(store, storeKey)
.use(
Expand Down Expand Up @@ -43,4 +60,5 @@ createApp(App)
.use(hotkeyPlugin)
.use(ipcMessageReceiver, { store })
.use(markdownItPlugin)
.use(i18n)
.mount("#app");
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"resolveJsonModule": true,
"sourceMap": true,
"baseUrl": ".",
"types": ["vitest/globals"],
"types": ["vitest/globals", "@intlify/unplugin-vue-i18n/messages"],
"paths": {
"@/*": ["src/*"]
},
Expand Down
4 changes: 4 additions & 0 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import checker from "vite-plugin-checker";
import { BuildOptions, defineConfig, loadEnv, Plugin } from "vite";
import { quasar } from "@quasar/vite-plugin";
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
import { z } from "zod";

const isElectron = process.env.VITE_TARGET === "electron";
Expand Down Expand Up @@ -76,6 +77,9 @@
plugins: [
vue(),
quasar({ autoImportComponentCase: "pascal" }),
VueI18nPlugin({
include: path.resolve(__dirname, "./src/locales/**")

Check failure on line 81 in vite.config.mts

View workflow job for this annotation

GitHub Actions / lint

Insert `,`
}),
mode !== "test" &&
checker({
overlay: false,
Expand Down
Loading