Dispaly a user message when a recipe is successfully deleted
This commit is contained in:
parent
d86c8ab6fe
commit
ec36391ec8
6 changed files with 182 additions and 166 deletions
|
|
@ -2,3 +2,4 @@ pub mod consts;
|
|||
pub mod ron_api;
|
||||
pub mod toast;
|
||||
pub mod utils;
|
||||
pub mod translation;
|
||||
161
common/src/translation.rs
Normal file
161
common/src/translation.rs
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
use serde::Deserialize;
|
||||
use strum::EnumCount;
|
||||
|
||||
#[repr(i64)]
|
||||
#[derive(Debug, Clone, EnumCount, Deserialize)]
|
||||
pub enum Sentence {
|
||||
MainTitle = 0,
|
||||
CreateNewRecipe,
|
||||
PrivateRecipes,
|
||||
UntitledRecipe,
|
||||
|
||||
Name,
|
||||
EmailAddress,
|
||||
Password,
|
||||
|
||||
SignOut,
|
||||
Save,
|
||||
NotLoggedIn,
|
||||
|
||||
ActionNotAuthorized,
|
||||
|
||||
DatabaseError,
|
||||
TemplateError,
|
||||
|
||||
// Sign in page.
|
||||
SignInMenu,
|
||||
SignInTitle,
|
||||
SignInButton,
|
||||
SignInSuccess,
|
||||
WrongEmailOrPassword,
|
||||
|
||||
// Sign up page.
|
||||
SignUpMenu,
|
||||
SignUpTitle,
|
||||
SignUpButton,
|
||||
SignUpEmailSent,
|
||||
SignUpEmailTitle,
|
||||
SignUpFollowEmailLink,
|
||||
SignUpEmailValidationSuccess,
|
||||
SignUpValidationExpired,
|
||||
SignUpValidationErrorTryAgain,
|
||||
SignUpClosed,
|
||||
ChooseAPassword,
|
||||
ReEnterPassword,
|
||||
|
||||
AccountMustBeValidatedFirst,
|
||||
InvalidEmail,
|
||||
PasswordDontMatch,
|
||||
InvalidPassword,
|
||||
EmailAlreadyTaken,
|
||||
UnableToSendEmail,
|
||||
|
||||
// Validation.
|
||||
ValidationSuccessful,
|
||||
ValidationExpired,
|
||||
ValidationErrorTryToSignUpAgain,
|
||||
ValidationError,
|
||||
ValidationUserAlreadyExists,
|
||||
|
||||
// Reset password page.
|
||||
LostPassword,
|
||||
AskResetChooseNewPassword,
|
||||
AskResetButton,
|
||||
AskResetAlreadyLoggedInError,
|
||||
AskResetEmailAlreadyResetError,
|
||||
AskResetEmailTitle,
|
||||
AskResetFollowEmailLink,
|
||||
AskResetEmailSent,
|
||||
AskResetTokenMissing,
|
||||
AskResetTokenExpired,
|
||||
PasswordReset,
|
||||
EmailUnknown,
|
||||
UnableToSendResetEmail,
|
||||
|
||||
// Profile
|
||||
ProfileTitle,
|
||||
ProfileEmail,
|
||||
ProfileDefaultServings,
|
||||
ProfileFirstDayOfWeek,
|
||||
ProfileNewPassword,
|
||||
ProfileFollowEmailTitle,
|
||||
ProfileFollowEmailLink,
|
||||
ProfileEmailSent,
|
||||
ProfileSaved,
|
||||
|
||||
// Recipe.
|
||||
RecipeNotAllowedToEdit,
|
||||
RecipeNotAllowedToView,
|
||||
RecipeNotFound,
|
||||
RecipeTitle,
|
||||
RecipeDescription,
|
||||
RecipeServings,
|
||||
RecipeEstimatedTime,
|
||||
RecipeDifficulty,
|
||||
RecipeDifficultyEasy,
|
||||
RecipeDifficultyMedium,
|
||||
RecipeDifficultyHard,
|
||||
RecipeTags,
|
||||
RecipeLanguage,
|
||||
RecipeIsPublic,
|
||||
RecipeDelete,
|
||||
RecipeAddAGroup,
|
||||
RecipeRemoveGroup,
|
||||
RecipeGroupName,
|
||||
RecipeGroupComment,
|
||||
RecipeAddAStep,
|
||||
RecipeRemoveStep,
|
||||
RecipeStepAction,
|
||||
RecipeAddAnIngredient,
|
||||
RecipeRemoveIngredient,
|
||||
RecipeIngredientName,
|
||||
RecipeIngredientQuantity,
|
||||
RecipeIngredientUnit,
|
||||
RecipeIngredientComment,
|
||||
RecipeDeleteConfirmation,
|
||||
RecipeSuccessfullyDeleted,
|
||||
RecipeGroupDeleteConfirmation,
|
||||
RecipeStepDeleteConfirmation,
|
||||
RecipeIngredientDeleteConfirmation,
|
||||
|
||||
// View Recipe.
|
||||
RecipeOneServing,
|
||||
RecipeSomeServings,
|
||||
RecipeEstimatedTimeMinAbbreviation,
|
||||
|
||||
// Calendar.
|
||||
CalendarMonday,
|
||||
CalendarTuesday,
|
||||
CalendarWednesday,
|
||||
CalendarThursday,
|
||||
CalendarFriday,
|
||||
CalendarSaturday,
|
||||
CalendarSunday,
|
||||
CalendarMondayAbbreviation,
|
||||
CalendarTuesdayAbbreviation,
|
||||
CalendarWednesdayAbbreviation,
|
||||
CalendarThursdayAbbreviation,
|
||||
CalendarFridayAbbreviation,
|
||||
CalendarSaturdayAbbreviation,
|
||||
CalendarSundayAbbreviation,
|
||||
CalendarJanuary,
|
||||
CalendarFebruary,
|
||||
CalendarMarch,
|
||||
CalendarApril,
|
||||
CalendarMay,
|
||||
CalendarJune,
|
||||
CalendarJuly,
|
||||
CalendarAugust,
|
||||
CalendarSeptember,
|
||||
CalendarOctober,
|
||||
CalendarNovember,
|
||||
CalendarDecember,
|
||||
CalendarAddToPlanner,
|
||||
CalendarAddToPlannerSuccess,
|
||||
CalendarAddToPlannerAlreadyExists,
|
||||
CalendarDateFormat, // See https://docs.rs/chrono/latest/chrono/format/strftime/index.html.
|
||||
CalendarAddIngredientsToShoppingList,
|
||||
CalendarRemoveIngredientsFromShoppingList,
|
||||
CalendarUnschedule,
|
||||
CalendarUnscheduleConfirmation,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue