Skip to content

Commit

Permalink
[ReviewEntries] Add error text when saving empty sense (#3593)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Feb 3, 2025
1 parent cd2ff38 commit 2fad544
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@
"error": {
"gloss": "Glosses cannot be left blank",
"glossAndDefinition": "Glosses and definitions cannot both be left blank",
"sense": "Cannot save an empty sense",
"senses": "Cannot save an entry with no senses",
"vernacular": "Vernacular cannot be left blank"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default function EditSenseDialog(
// Confirm nonempty senses
const cleanedSense = cleanSense(newSense, { definitionsEnabled });
if (!cleanedSense || typeof cleanedSense === "string") {
toast.error(t(cleanedSense ?? ""));
toast.error(t(cleanedSense || "reviewEntries.error.sense"));
return;
}

Expand Down

0 comments on commit 2fad544

Please sign in to comment.