diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 14ab9d7c72..79b78f3f98 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -864,6 +864,8 @@ failedToFetchAccountInformation: "アカウント情報の取得に失敗しま
rateLimitExceeded: "レート制限を超えました"
cropImage: "画像のクロップ"
cropImageAsk: "画像をクロップしますか?"
+cropYes: "クロップする"
+cropNo: "そのまま使う"
file: "ファイル"
recentNHours: "直近{n}時間"
recentNDays: "直近{n}日"
diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue
index 74cb534859..da4db63406 100644
--- a/packages/frontend/src/components/MkDialog.vue
+++ b/packages/frontend/src/components/MkDialog.vue
@@ -28,8 +28,8 @@
- {{ (showCancelButton || input || select) ? i18n.ts.ok : i18n.ts.gotIt }}
- {{ i18n.ts.cancel }}
+ {{ okText ?? ((showCancelButton || input || select) ? i18n.ts.ok : i18n.ts.gotIt) }}
+ {{ cancelText ?? i18n.ts.cancel }}
{ action.callback(); close(); }">{{ action.text }}
@@ -82,6 +82,8 @@ const props = withDefaults(defineProps<{
showOkButton?: boolean;
showCancelButton?: boolean;
cancelableByBgClick?: boolean;
+ okText?: string;
+ cancelText?: string;
}>(), {
type: 'info',
showOkButton: true,
diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts
index 52469b6d04..e21a21ef76 100644
--- a/packages/frontend/src/os.ts
+++ b/packages/frontend/src/os.ts
@@ -171,6 +171,8 @@ export function confirm(props: {
type: 'error' | 'info' | 'success' | 'warning' | 'waiting' | 'question';
title?: string | null;
text?: string | null;
+ okText?: string;
+ cancelText?: string;
}): Promise<{ canceled: boolean }> {
return new Promise((resolve, reject) => {
popup(MkDialog, {
diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue
index da7d3d3703..3647e90ce7 100644
--- a/packages/frontend/src/pages/settings/profile.vue
+++ b/packages/frontend/src/pages/settings/profile.vue
@@ -150,6 +150,8 @@ function changeAvatar(ev) {
const { canceled } = await os.confirm({
type: 'question',
text: i18n.t('cropImageAsk'),
+ okText: i18n.ts.cropYes,
+ cancelText: i18n.ts.cropNo,
});
if (!canceled) {
@@ -174,6 +176,8 @@ function changeBanner(ev) {
const { canceled } = await os.confirm({
type: 'question',
text: i18n.t('cropImageAsk'),
+ okText: i18n.ts.cropYes,
+ cancelText: i18n.ts.cropNo,
});
if (!canceled) {