A binary mobile-api call with the same error shape, export proxy routes that pass Content-Type and Content-Disposition through, and an Export button under BO_LEADS_EXPORT that downloads with the current search or filters and shows EXPORT_TOO_LARGE on the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
296 lines
11 KiB
TypeScript
296 lines
11 KiB
TypeScript
// Built-in English fallback for every UI message code the admin portal
|
||
// references. Last readable resort before the raw code when the Area-A
|
||
// catalog lacks an entry, so the login screen and authenticated shell render
|
||
// correctly in English even before these codes exist in the catalog, or if
|
||
// the upstream is unreachable. Structure mirrors solvway-customer-portal's
|
||
// app/lib/i18n/defaultMessages.ts; the codes themselves are admin-portal-
|
||
// specific since there is no shared upstream MessageSource to mirror for
|
||
// this surface.
|
||
export const DEFAULT_MESSAGES: Record<string, string> = {
|
||
BackOfficeTitle: "Co-Lite",
|
||
BackOfficeMetaTitle: "Co-Lite :: BackOffice",
|
||
BackOfficeSubtitle: "Sign in to manage events, leads and your team.",
|
||
SignedInElsewhere: "You were signed out because your account signed in somewhere else.",
|
||
BackOfficeLabel: "Back office",
|
||
BackOfficePanelTitle: "Everything behind Co-Lite, in one place.",
|
||
BackOfficePanelEvents: "Events and attendees",
|
||
BackOfficePanelLeads: "Leads captured at every event",
|
||
BackOfficePanelFollowUps: "Follow-ups for your sales team",
|
||
Username: "Username",
|
||
Password: "Password",
|
||
LogIn: "Log in",
|
||
ForgotLink: "Forgot password?",
|
||
ForgotTitle: "Forgot password",
|
||
ForgotIntro: "Enter your username and email and we will send you a temporary password.",
|
||
ForgotSubmit: "Email me a temporary password",
|
||
ForgotRequired: "Username and email are required.",
|
||
ForgotSent: "If the details match an account, we have emailed a temporary password.",
|
||
ForgotBack: "Back to log in",
|
||
Logout: "Logout",
|
||
Code: "Code",
|
||
Description: "Description",
|
||
Area: "Area",
|
||
Save: "Save",
|
||
Action: "Action",
|
||
Status: "Status",
|
||
// Sidebar labels: module.name is a BO_* code resolved via t(name); BO_ROOT is never rendered.
|
||
BO_ROOT: "Co-Lite admin",
|
||
BO_USERS: "Users",
|
||
BO_ROLES: "Roles",
|
||
AllStatuses: "All statuses",
|
||
Confirm: "Confirm",
|
||
Cancel: "Cancel",
|
||
Name: "Name",
|
||
Email: "Email",
|
||
ClearFilters: "Clear filters",
|
||
PagerPrevious: "Previous",
|
||
PagerNext: "Next",
|
||
PagerPageOf: "Page {page} of {pages}",
|
||
PagerRange: "{first}–{last} of {total}",
|
||
PagerEmpty: "0 of 0",
|
||
Filters: "Filters",
|
||
Loading: "Loading…",
|
||
Surname: "Surname",
|
||
Tree: "Tree",
|
||
Matches: "matches",
|
||
Wallet: "Wallet",
|
||
SidebarCollapse: "Collapse sidebar",
|
||
SidebarExpand: "Expand sidebar",
|
||
Warehouse: "Warehouse",
|
||
HeaderOpenMenu: "Open menu",
|
||
HeaderMenu: "Menu",
|
||
HeaderSwitchToLight: "Switch to light theme",
|
||
HeaderSwitchToDark: "Switch to dark theme",
|
||
LocaleSwitcherChange: "Change language",
|
||
SidebarMainNav: "Main",
|
||
UiBreadcrumb: "breadcrumb",
|
||
UiMore: "More",
|
||
UiColumns: "Columns",
|
||
UiVisibleColumns: "Visible columns",
|
||
UiNoResults: "No results.",
|
||
UiRetry: "Retry",
|
||
UiLoading: "Loading",
|
||
NotAuthorizedTitle: "Not authorised",
|
||
NotAuthorizedBody: "You do not have access to this page.",
|
||
ShellBackToDashboard: "Back to dashboard",
|
||
NotFoundTitle: "Page not found",
|
||
NotFoundBody: "That route does not exist in the back office.",
|
||
LayoutMetaDescription: "Co-Lite admin back office",
|
||
LoginInvalidCredentials: "Invalid username or password",
|
||
LoginHidePassword: "Hide password",
|
||
LoginShowPassword: "Show password",
|
||
ResetAllRequired: "All fields are required.",
|
||
ResetMismatch: "New passwords do not match.",
|
||
ResetFailed: "Could not set the password.",
|
||
ResetTitle: "Set your password",
|
||
ResetChooseIntro: "Choose a new password to continue.",
|
||
ResetNewPassword: "New password",
|
||
ResetConfirmPassword: "Confirm new password",
|
||
ResetSubmit: "Set password",
|
||
ModulesParent: "Parent",
|
||
DashWelcome: "Welcome, {name}",
|
||
DashWelcomeFallbackName: "admin",
|
||
Close: "Close",
|
||
Enabled: "Enabled",
|
||
Admin: "Admin",
|
||
Member: "Member",
|
||
Type: "Type",
|
||
Category: "Category",
|
||
Back: "Back",
|
||
Send: "Send",
|
||
Title: "Title",
|
||
CatActions: "Actions",
|
||
SetupLoadOptionsFailed: "Failed to load form options",
|
||
CatStatusFilter: "Status filter",
|
||
Brand: "Brand",
|
||
Change: "Change",
|
||
To: "To",
|
||
All: "All",
|
||
Message: "Message",
|
||
Date: "Date",
|
||
In: "In",
|
||
Out: "Out",
|
||
Inventory: "Inventory",
|
||
Branch: "Branch",
|
||
Edit: "Edit",
|
||
Export: "Export",
|
||
UiMoreActionsFor: "More actions for {label}",
|
||
UsrUsernameRequired: "Username is required.",
|
||
UsrEmailRequired: "Email is required.",
|
||
UsrEmailInvalid: "Enter a valid email address.",
|
||
UsrSaveFailed: "Failed to save user.",
|
||
UsrRemoveRole: "Remove {role}",
|
||
UsrLoadingRoles: "Loading roles",
|
||
UsrNoRolesAvailable: "No roles available.",
|
||
UsrDisabledHint: "Disabled users cannot sign in.",
|
||
UsrOwnAccountHint: "You can't deactivate your own account",
|
||
UsrNameRequired: "Name is required.",
|
||
UsrCreatedBanner: "User created. A temporary password has been emailed to them; they will be asked to set their own at first sign-in.",
|
||
UsrCreatedNoEmail: "User created, but the temporary password email could not be sent. Open the user from the users list and use Send password reset to try again.",
|
||
UsrBackToUsers: "Back to users",
|
||
AdminPasswordHint: "At least 8 characters, with at least one capital letter and one small letter.",
|
||
UiDatePlaceholder: "DD/MM/YYYY",
|
||
UiOpenCalendarFor: "Open calendar for {label}",
|
||
UiOpenCalendar: "Open calendar",
|
||
UiClear: "Clear",
|
||
UsrLoadFailed: "Failed to load user",
|
||
UsrSaved: "User saved.",
|
||
UsrResetSent: "Password reset email sent to {email}.",
|
||
UsrResetNotAdmin: "No password reset email sent — user is not an active admin.",
|
||
UsrResetFailed: "Failed to send password reset email.",
|
||
UsrEditUser: "Edit user",
|
||
UsrNotFound: "No user found for “{id}”",
|
||
UsrEditNamed: "Edit {username}",
|
||
UsrSendReset: "Send password reset",
|
||
UsrSendResetTitle: "Send password reset email?",
|
||
UsrResetConfirmBody: "{email} will receive a new temporary password by email.",
|
||
UsrNewUser: "New user",
|
||
UsrCreateUser: "Create user",
|
||
UsrListLoadFailed: "Failed to load users",
|
||
Disabled: "Disabled",
|
||
UsrAddUser: "Add user",
|
||
UsrSearchLabel: "Username, name or email",
|
||
UsrNoMatch: "No users match your filters",
|
||
UsrNoUsers: "No users found",
|
||
RolSelfLockHint: "You can't remove your own access to Roles.",
|
||
RolAccessLoadFailed: "Failed to load access matrix",
|
||
RolAccessSaveFailed: "Failed to save access matrix",
|
||
RolAccessTitle: "Access for {role}",
|
||
RolNoModules: "No modules found",
|
||
RolChangeOne: "{count} change",
|
||
RolChangeMany: "{count} changes",
|
||
RolNoChanges: "No changes",
|
||
RolReset: "Reset",
|
||
RolConfirmChanges: "Confirm access changes",
|
||
RolGrantList: "Grant: {list}.",
|
||
RolRevokeList: "Revoke: {list}.",
|
||
RolNameRequired: "Role name is required.",
|
||
RolSaveFailed: "Failed to save role",
|
||
RolEditRole: "Edit role",
|
||
RolAddRole: "Add role",
|
||
RolRoleName: "Role name",
|
||
RolLoadFailed: "Failed to load roles",
|
||
RolColRole: "Role",
|
||
RolManageAccess: "Manage access",
|
||
RolNoRoles: "No roles found",
|
||
No: "No",
|
||
// Event form messages
|
||
EvtNameRequired: "Name is required.",
|
||
EvtLocationRequired: "Location is required.",
|
||
EvtStartDate: "Start date",
|
||
EvtEndDate: "End date",
|
||
EvtStartRequired: "Start date is required.",
|
||
EvtEndRequired: "End date is required.",
|
||
EvtEndBeforeStart: "End date must not be before start date.",
|
||
EvtNameTooLong: "Name must be 100 characters or fewer.",
|
||
EvtLocationTooLong: "Location must be 200 characters or fewer.",
|
||
EvtSaveFailed: "Failed to save event.",
|
||
EvtInactiveMember: "Inactive",
|
||
EvtTeamLabel: "Team",
|
||
Location: "Location",
|
||
Create: "Create",
|
||
BO_EVENTS: "Events",
|
||
EvtNewEvent: "New event",
|
||
EvtEdit: "Edit",
|
||
EvtNoEvents: "No events found",
|
||
EvtNoMatch: "No events match your filters",
|
||
EvtListLoadFailed: "Failed to load events",
|
||
EvtLoadFailed: "Failed to load event",
|
||
EvtEditEvent: "Edit event",
|
||
EvtEditNamed: "Edit {name}",
|
||
EvtNotFound: "No event found for \"{uuid}\"",
|
||
EvtCreatedBanner: "Event created.",
|
||
EvtSaved: "Event saved.",
|
||
EvtTeamNotSaved: "The event was saved but its team was not. Check the team and save again.",
|
||
EvtEventNameFilter: "Event name",
|
||
EvtStatusFilter: "Status filter",
|
||
// Interest (product/service) messages
|
||
BO_INTERESTS: "Interests",
|
||
IntAddInterest: "Add interest",
|
||
IntEditInterest: "Edit interest",
|
||
IntInterestName: "Name",
|
||
IntInterestOrder: "Order",
|
||
IntColInterest: "Name",
|
||
IntColOrder: "Order",
|
||
IntColStatus: "Status",
|
||
IntNoInterests: "No interests found",
|
||
IntLoadFailed: "Failed to load interests",
|
||
IntNameRequired: "Name is required.",
|
||
IntNameTooLong: "Name must be 100 characters or fewer.",
|
||
IntSaveFailed: "Failed to save interest.",
|
||
IntDuplicateName: "An interest with this name already exists.",
|
||
IntActive: "Active",
|
||
IntInactive: "Inactive",
|
||
IntActivate: "Activate",
|
||
IntDeactivate: "Deactivate",
|
||
IntActivateFailed: "Failed to activate interest.",
|
||
IntDeactivateFailed: "Failed to deactivate interest.",
|
||
// Event leads messages
|
||
BO_EVENT_LEADS: "Event leads",
|
||
LeadName: "Name",
|
||
LeadMobile: "Mobile",
|
||
LeadType: "Lead type",
|
||
LeadSalesperson: "Salesperson",
|
||
LeadTemperature: "Temperature",
|
||
LeadInterests: "Interests",
|
||
LeadNextFollowUp: "Next follow-up",
|
||
LeadAddLead: "Add lead",
|
||
LeadNoEvents: "No events found",
|
||
LeadNoLeads: "No leads found",
|
||
LeadNoMatch: "No leads match your filters",
|
||
LeadLoadFailed: "Failed to load events",
|
||
LeadListLoadFailed: "Failed to load leads",
|
||
LeadSalespersonFilter: "Salesperson filter",
|
||
LeadTemperatureFilter: "Temperature filter",
|
||
LeadStatusFilter: "Status filter",
|
||
LeadInterestFilter: "Interest filter",
|
||
LeadLeadTypeFilter: "Lead type filter",
|
||
LeadHot: "Hot",
|
||
LeadWarm: "Warm",
|
||
LeadCold: "Cold",
|
||
LeadOpen: "Open",
|
||
LeadContacted: "Contacted",
|
||
LeadQualified: "Qualified",
|
||
LeadWon: "Won",
|
||
LeadLost: "Lost",
|
||
LeadNew: "New",
|
||
LeadExisting: "Existing",
|
||
LeadCompany: "Company",
|
||
LeadJobTitle: "Job title",
|
||
LeadStatus: "Status",
|
||
LeadNotes: "Notes",
|
||
LeadNext: "Next",
|
||
LeadNone: "None",
|
||
LeadAlreadyCaptured: "Already captured",
|
||
LeadThisPerson: "This person",
|
||
LeadDifferentPerson: "Different person",
|
||
LeadOptionsLoadFailed: "Failed to load salespeople or interests",
|
||
LeadEventDisabled: "This event is closed for new leads.",
|
||
LeadSaveFailed: "Could not save the lead. Please try again.",
|
||
LeadMatchFailed: "Could not look up this contact. Please try again.",
|
||
LeadErrRequiredContact: "Mobile or email is required.",
|
||
LeadErrRequired: "This field is required.",
|
||
LeadErrTooLong: "Too long.",
|
||
LeadErrInvalidMobile: "Enter a valid mobile number.",
|
||
LeadErrInvalidEmail: "Enter a valid email address.",
|
||
LeadErrInvalidDate: "Enter a valid date.",
|
||
LeadErrNotOnTeam: "This person is not on the event team.",
|
||
LeadErrInactiveInterest: "An interest is no longer active.",
|
||
LeadErrInvalidValue: "Invalid value.",
|
||
LeadCaptured: "Captured",
|
||
LeadNotFound: "Lead not found",
|
||
LeadGetFailed: "Failed to load the lead",
|
||
BO_LEADS: "Leads",
|
||
LeadsSearch: "Search name, mobile or email",
|
||
LeadsExportTooLarge: "More than 20,000 rows. Narrow the search or filters.",
|
||
LeadsEvents: "Events",
|
||
LeadsLastEvent: "Last event",
|
||
LeadsLatestSalesperson: "Latest salesperson",
|
||
LeadsHistory: "Event history",
|
||
LeadsSaved: "Lead saved.",
|
||
LeadsSameMobileAs: "Same mobile as",
|
||
LeadsSameEmailAs: "Same email as",
|
||
LeadsSameMobileEmailAs: "Same mobile and email as",
|
||
LeadsViewLead: "View lead",
|
||
};
|