Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add Explanation for Locked Category Toggle When Importing from QuickBooks. #56312

Merged
merged 6 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ import type {
MarkReimbursedFromIntegrationParams,
MissingPropertyParams,
MovedFromPersonalSpaceParams,
NeedCategoryForExportToIntegrationParams,
NoLongerHaveAccessParams,
NotAllowedExtensionParams,
NotYouParams,
Expand Down Expand Up @@ -3692,7 +3693,7 @@ const translations = {
deleteFailureMessage: 'An error occurred while deleting the category, please try again.',
categoryName: 'Category name',
requiresCategory: 'Members must categorize all expenses',
needCategoryForExportToIntegration: 'Require a category on every expense in order to export to',
needCategoryForExportToIntegration: ({connectionName}: NeedCategoryForExportToIntegrationParams) => `All expenses must be categorized in order to export to ${connectionName}.`,
subtitle: 'Get a better overview of where money is being spent. Use our default categories or add your own.',
emptyCategories: {
title: "You haven't created any categories",
Expand Down
4 changes: 3 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ import type {
MarkReimbursedFromIntegrationParams,
MissingPropertyParams,
MovedFromPersonalSpaceParams,
NeedCategoryForExportToIntegrationParams,
NoLongerHaveAccessParams,
NotAllowedExtensionParams,
NotYouParams,
Expand Down Expand Up @@ -3735,7 +3736,8 @@ const translations = {
deleteFailureMessage: 'Se ha producido un error al intentar eliminar la categoría. Por favor, inténtalo más tarde.',
categoryName: 'Nombre de la categoría',
requiresCategory: 'Los miembros deben clasificar todos los gastos',
needCategoryForExportToIntegration: 'Se requiere una categoría en cada gasto para poder exportarlo a',
needCategoryForExportToIntegration: ({connectionName}: NeedCategoryForExportToIntegrationParams) =>
`Todos los gastos deben estar categorizados para poder exportar a ${connectionName}.`,
subtitle: 'Obtén una visión general de dónde te gastas el dinero. Utiliza las categorías predeterminadas o añade las tuyas propias.',
emptyCategories: {
title: 'No has creado ninguna categoría',
Expand Down
3 changes: 3 additions & 0 deletions src/languages/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ type LowerUpperParams = {lower: string; upper: string};

type CategoryNameParams = {categoryName: string};

type NeedCategoryForExportToIntegrationParams = {connectionName: string};

type TaxAmountParams = {taxAmount: number};

type SecondaryLoginParams = {secondaryLogin: string};
Expand Down Expand Up @@ -874,4 +876,5 @@ export type {
UpdatedPolicyReportFieldDefaultValueParams,
SubmitsToParams,
SettlementDateParams,
NeedCategoryForExportToIntegrationParams,
};
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ function WorkspaceCategoriesSettingsPage({policy, route}: WorkspaceCategoriesSet
const [groupID, setGroupID] = useState<string>();
const isQuickSettingsFlow = backTo;

const toggleSubtitle = isConnectedToAccounting && currentConnectionName ? `${translate('workspace.categories.needCategoryForExportToIntegration')} ${currentConnectionName}.` : undefined;
const toggleSubtitle =
isConnectedToAccounting && currentConnectionName ? translate('workspace.categories.needCategoryForExportToIntegration', {connectionName: currentConnectionName}) : undefined;

const updateWorkspaceRequiresCategory = (value: boolean) => {
setWorkspaceRequiresCategory(policyID, value);
Expand Down
Loading