Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
1dac9617
Commit
1dac9617
authored
1 year ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
enhance(frontend): INVALID_PARAMおよびROLE_PERMISSION_DENIEDエラーを分かりやすく表示するように
parent
8b833c88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
locales/ja-JP.yml
+4
-0
4 additions, 0 deletions
locales/ja-JP.yml
packages/frontend/src/os.ts
+6
-0
6 additions, 0 deletions
packages/frontend/src/os.ts
with
10 additions
and
0 deletions
locales/ja-JP.yml
+
4
−
0
View file @
1dac9617
...
...
@@ -951,6 +951,10 @@ manageCustomEmojis: "カスタム絵文字の管理"
youCannotCreateAnymore
:
"
これ以上作成することはできません。"
cannotPerformTemporary
:
"
一時的に利用できません"
cannotPerformTemporaryDescription
:
"
操作回数が制限を超過するため一時的に利用できません。しばらく時間を置いてから再度お試しください。"
invalidParamError
:
"
パラメータエラー"
invalidParamErrorDescription
:
"
リクエストパラメータに問題があります。通常これはバグですが、入力した文字数が多すぎる等の可能性もあります。"
permissionDeniedError
:
"
操作が拒否されました"
permissionDeniedErrorDescription
:
"
このアカウントにはこの操作を行うための権限がありません。"
preset
:
"
プリセット"
selectFromPresets
:
"
プリセットから選択"
achievements
:
"
実績"
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/os.ts
+
6
−
0
View file @
1dac9617
...
...
@@ -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
}
`
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment