Skip to content

Commit b22da34

Browse files
authored
Merge pull request #56312 from Krishna2323/krishna2323/issue/56181
fix: Add Explanation for Locked Category Toggle When Importing from QuickBooks.
2 parents c19715d + 5ebddb2 commit b22da34

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

src/languages/en.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ import type {
108108
MarkReimbursedFromIntegrationParams,
109109
MissingPropertyParams,
110110
MovedFromPersonalSpaceParams,
111+
NeedCategoryForExportToIntegrationParams,
111112
NoLongerHaveAccessParams,
112113
NotAllowedExtensionParams,
113114
NotYouParams,
@@ -3699,7 +3700,7 @@ const translations = {
36993700
deleteFailureMessage: 'An error occurred while deleting the category, please try again.',
37003701
categoryName: 'Category name',
37013702
requiresCategory: 'Members must categorize all expenses',
3702-
needCategoryForExportToIntegration: 'Require a category on every expense in order to export to',
3703+
needCategoryForExportToIntegration: ({connectionName}: NeedCategoryForExportToIntegrationParams) => `All expenses must be categorized in order to export to ${connectionName}.`,
37033704
subtitle: 'Get a better overview of where money is being spent. Use our default categories or add your own.',
37043705
emptyCategories: {
37053706
title: "You haven't created any categories",

src/languages/es.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ import type {
107107
MarkReimbursedFromIntegrationParams,
108108
MissingPropertyParams,
109109
MovedFromPersonalSpaceParams,
110+
NeedCategoryForExportToIntegrationParams,
110111
NoLongerHaveAccessParams,
111112
NotAllowedExtensionParams,
112113
NotYouParams,
@@ -3742,7 +3743,8 @@ const translations = {
37423743
deleteFailureMessage: 'Se ha producido un error al intentar eliminar la categoría. Por favor, inténtalo más tarde.',
37433744
categoryName: 'Nombre de la categoría',
37443745
requiresCategory: 'Los miembros deben clasificar todos los gastos',
3745-
needCategoryForExportToIntegration: 'Se requiere una categoría en cada gasto para poder exportarlo a',
3746+
needCategoryForExportToIntegration: ({connectionName}: NeedCategoryForExportToIntegrationParams) =>
3747+
`Todos los gastos deben estar categorizados para poder exportar a ${connectionName}.`,
37463748
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.',
37473749
emptyCategories: {
37483750
title: 'No has creado ninguna categoría',

src/languages/params.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ type LowerUpperParams = {lower: string; upper: string};
418418

419419
type CategoryNameParams = {categoryName: string};
420420

421+
type NeedCategoryForExportToIntegrationParams = {connectionName: string};
422+
421423
type TaxAmountParams = {taxAmount: number};
422424

423425
type SecondaryLoginParams = {secondaryLogin: string};
@@ -880,4 +882,5 @@ export type {
880882
UpdatedPolicyReportFieldDefaultValueParams,
881883
SubmitsToParams,
882884
SettlementDateParams,
885+
NeedCategoryForExportToIntegrationParams,
883886
};

src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ function WorkspaceCategoriesSettingsPage({policy, route}: WorkspaceCategoriesSet
4343
const [groupID, setGroupID] = useState<string>();
4444
const isQuickSettingsFlow = backTo;
4545

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

4849
const updateWorkspaceRequiresCategory = (value: boolean) => {
4950
setWorkspaceRequiresCategory(policyID, value);

0 commit comments

Comments
 (0)