diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 69fca92f6f268a8a07f4164cc7c326aafb81d1ad..2ff2700c28d451e6e6093e75469bac2cf9525d79 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -951,6 +951,10 @@ manageCustomEmojis: "カスタム絵文å—ã®ç®¡ç†" youCannotCreateAnymore: "ã“れ以上作æˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。" cannotPerformTemporary: "一時的ã«åˆ©ç”¨ã§ãã¾ã›ã‚“" cannotPerformTemporaryDescription: "æ“作回数ãŒåˆ¶é™ã‚’超éŽã™ã‚‹ãŸã‚一時的ã«åˆ©ç”¨ã§ãã¾ã›ã‚“。ã—ã°ã‚‰ã時間を置ã„ã¦ã‹ã‚‰å†åº¦ãŠè©¦ã—ãã ã•ã„。" +invalidParamError: "パラメータエラー" +invalidParamErrorDescription: "リクエストパラメータã«å•é¡ŒãŒã‚ã‚Šã¾ã™ã€‚通常ã“ã‚Œã¯ãƒã‚°ã§ã™ãŒã€å…¥åŠ›ã—ãŸæ–‡å—æ•°ãŒå¤šã™ãŽã‚‹ç‰ã®å¯èƒ½æ€§ã‚‚ã‚ã‚Šã¾ã™ã€‚" +permissionDeniedError: "æ“作ãŒæ‹’å¦ã•ã‚Œã¾ã—ãŸ" +permissionDeniedErrorDescription: "ã“ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ã¯ã“ã®æ“作を行ã†ãŸã‚ã®æ¨©é™ãŒã‚ã‚Šã¾ã›ã‚“。" preset: "プリセット" selectFromPresets: "プリセットã‹ã‚‰é¸æŠž" achievements: "実績" diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index 962f9cdd98d96369a301832468380cf087990b4b..157aa790649a203518822a05b3677086f5823c1b 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -55,6 +55,12 @@ export const apiWithDialog = (( } else if (err.code === 'RATE_LIMIT_EXCEEDED') { title = i18n.ts.cannotPerformTemporary; text = i18n.ts.cannotPerformTemporaryDescription; + } else if (err.code === 'INVALID_PARAM') { + title = i18n.ts.invalidParamError; + text = i18n.ts.invalidParamErrorDescription; + } else if (err.code === 'ROLE_PERMISSION_DENIED') { + title = i18n.ts.permissionDeniedError; + text = i18n.ts.permissionDeniedErrorDescription; } else if (err.code.startsWith('TOO_MANY')) { title = i18n.ts.youCannotCreateAnymore; text = `${i18n.ts.error}: ${err.id}`;