Skip to content

Commit

Permalink
fix: add missing error messages to translations
Browse files Browse the repository at this point in the history
  • Loading branch information
kolaente committed Feb 21, 2025
1 parent 65df9e5 commit 398d0c7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
20 changes: 18 additions & 2 deletions frontend/src/i18n/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1160,9 +1160,16 @@
"1016": "TOTP is not enabled for this user.",
"1017": "The TOTP passcode is invalid.",
"1018": "The user avatar type setting is invalid.",
"1019": "No email address was provided by the OpenID provider.Please make sure the openid provider publicly provides an email address for your account.",
"1020": "This account is disabled. Check your emails or ask your administrator.",
"1021": "This account is managed by a third-party authentication provider.",
"1022": "The username must not contain spaces.",
"1023": "You can't do that as a link share.",
"1024": "Invalid claim data for field {field} of type {type}.",
"1025": "The timezone '{timezone}' is invalid. Please select a valid timezone from the list.",
"2001": "ID cannot be empty or 0.",
"2002": "Some of the request data was invalid.",
"2003": "The timezone '{timezone}' is invalid.",
"3001": "The project does not exist.",
"3004": "You need to have read permissions on that project to perform that action.",
"3005": "The project title cannot be empty.",
Expand All @@ -1188,12 +1195,18 @@
"4017": "Invalid task filter comparator.",
"4018": "Invalid task filter concatenator.",
"4019": "Invalid task filter value.",
"4020": "This attachment does not belong to that task.",
"4021": "This user is already assigned to that task.",
"4022": "Please provide what the reminder date is relative to.",
"4023": "Cannot create a task relation cycle.",
"6001": "The team name cannot be empty.",
"6002": "The team does not exist.",
"6004": "The team already has access to that project.",
"6005": "The user is already a member of that team.",
"6006": "Cannot delete the last team member.",
"6007": "The team does not have access to the project to perform that action.",
"6008": "No team could be found for the given OIDC ID and issuer.",
"6009": "No Teams with property oidcId could be found for User.",
"7002": "The user already has access to that project.",
"7003": "You do not have access to that project.",
"8001": "This label already exists on that task.",
Expand All @@ -1209,9 +1222,12 @@
"11002": "Saved filters are not available for link shares.",
"12001": "The subscription entity type is invalid.",
"12002": "You are already subscribed to the entity itself or a parent entity.",
"12003": "You must provide a user to fetch subscriptions.",
"13001": "This link share requires a password for authentication, but none was provided.",
"13002": "The provided link share password was invalid.",
"14001": "The provided file is not a valid zip file."
"13002": "The provided link share password is invalid.",
"13003": "The provided link share token is invalid.",
"14001": "The provided api token is invalid.",
"14002": "The permission {permission} of group {group} is invalid."
},
"about": {
"title": "About",
Expand Down
12 changes: 10 additions & 2 deletions pkg/models/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,11 @@ const ErrCodeOIDCTeamDoesNotExist = 6008

// HTTPError holds the http error description
func (err ErrOIDCTeamDoesNotExist) HTTPError() web.HTTPError {
return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No team could be found for the given OIDC ID and issuer."}
return web.HTTPError{
HTTPCode: http.StatusNotFound,
Code: ErrCodeTeamDoesNotExist,
Message: "No team could be found for the given OIDC ID and issuer.",
}
}

// ErrOIDCTeamsDoNotExistForUser represents an error where an oidcTeam does not exist for the user
Expand All @@ -1355,7 +1359,11 @@ const ErrCodeOIDCTeamsDoNotExistForUser = 6009

// HTTPError holds the http error description
func (err ErrOIDCTeamsDoNotExistForUser) HTTPError() web.HTTPError {
return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No Teams with property oidcId could be found for User."}
return web.HTTPError{
HTTPCode: http.StatusNotFound,
Code: ErrCodeOIDCTeamsDoNotExistForUser,
Message: "No Teams with property oidcId could be found for User.",
}
}

// ====================
Expand Down

0 comments on commit 398d0c7

Please sign in to comment.