Skip to content

Commit 67b8b38

Browse files
authored
Merge pull request #42470 from Expensify/rodrigo-fix-hold-text
Adds translation for hold violation
2 parents b7d6a68 + fd5c9db commit 67b8b38

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

src/CONST.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,7 @@ const CONST = {
36753675
TAX_OUT_OF_POLICY: 'taxOutOfPolicy',
36763676
TAX_RATE_CHANGED: 'taxRateChanged',
36773677
TAX_REQUIRED: 'taxRequired',
3678+
HOLD: 'hold',
36783679
},
36793680

36803681
/** Context menu types */

src/hooks/useViolations.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {TransactionViolation, ViolationName} from '@src/types/onyx';
55
/**
66
* Names of Fields where violations can occur.
77
*/
8-
type ViolationField = 'amount' | 'billable' | 'category' | 'comment' | 'date' | 'merchant' | 'receipt' | 'tag' | 'tax';
8+
type ViolationField = 'amount' | 'billable' | 'category' | 'comment' | 'date' | 'merchant' | 'receipt' | 'tag' | 'tax' | 'none';
99

1010
/**
1111
* Map from Violation Names to the field where that violation can occur.
@@ -44,6 +44,7 @@ const violationFields: Record<ViolationName, ViolationField> = {
4444
taxOutOfPolicy: 'tax',
4545
taxRateChanged: 'tax',
4646
taxRequired: 'tax',
47+
hold: 'none',
4748
};
4849

4950
type ViolationsMap = Map<ViolationField, TransactionViolation[]>;

src/languages/en.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3063,6 +3063,7 @@ export default {
30633063
taxOutOfPolicy: ({taxName}: ViolationsTaxOutOfPolicyParams) => `${taxName ?? 'Tax'} no longer valid`,
30643064
taxRateChanged: 'Tax rate was modified',
30653065
taxRequired: 'Missing tax rate',
3066+
hold: 'Hold',
30663067
},
30673068
violationDismissal: {
30683069
rter: {

src/languages/es.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3567,6 +3567,7 @@ export default {
35673567
taxOutOfPolicy: ({taxName}: ViolationsTaxOutOfPolicyParams) => `${taxName ?? 'El impuesto'} ya no es válido`,
35683568
taxRateChanged: 'La tasa de impuesto fue modificada',
35693569
taxRequired: 'Falta la tasa de impuesto',
3570+
hold: 'Bloqueada',
35703571
},
35713572
violationDismissal: {
35723573
rter: {

src/libs/Violations/ViolationsUtils.ts

+2
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ const ViolationsUtils = {
280280
return translate('violations.taxRateChanged');
281281
case 'taxRequired':
282282
return translate('violations.taxRequired');
283+
case 'hold':
284+
return translate('violations.hold');
283285
default:
284286
// The interpreter should never get here because the switch cases should be exhaustive.
285287
// If typescript is showing an error on the assertion below it means the switch statement is out of

0 commit comments

Comments
 (0)