Skip to content
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
12 changes: 6 additions & 6 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ function MoneyReportHeader({

const isInvoiceReport = isInvoiceReportUtil(moneyRequestReport);

const [rateErrorModalVisible, setRateErrorModalVisible] = useState(false);
const [isDownloadErrorModalVisible, setIsDownloadErrorModalVisible] = useState(false);
const [isHoldEducationalModalVisible, setIsHoldEducationalModalVisible] = useState(false);
const [duplicateDistanceErrorModalVisible, setDuplicateDistanceErrorModalVisible] = useState(false);
const [duplicatePerDiemErrorModalVisible, setDuplicatePerDiemErrorModalVisible] = useState(false);
const [rejectModalAction, setRejectModalAction] = useState<ValueOf<
typeof CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.HOLD | typeof CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REJECT | typeof CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REJECT_BULK
Expand Down Expand Up @@ -1402,7 +1402,7 @@ function MoneyReportHeader({
value: CONST.REPORT.SECONDARY_ACTIONS.DUPLICATE,
onSelected: () => {
if (hasCustomUnitOutOfPolicyViolation) {
setDuplicateDistanceErrorModalVisible(true);
setRateErrorModalVisible(true);
return;
}

Expand Down Expand Up @@ -1894,11 +1894,11 @@ function MoneyReportHeader({
/>
<ConfirmModal
title={translate('common.duplicateExpense')}
isVisible={duplicateDistanceErrorModalVisible}
onConfirm={() => setDuplicateDistanceErrorModalVisible(false)}
onCancel={() => setDuplicateDistanceErrorModalVisible(false)}
isVisible={rateErrorModalVisible}
onConfirm={() => setRateErrorModalVisible(false)}
onCancel={() => setRateErrorModalVisible(false)}
confirmText={translate('common.buttonConfirm')}
prompt={translate('iou.correctDistanceRateError')}
prompt={translate('iou.correctRateError')}
shouldShowCancelButton={false}
/>
<ConfirmModal
Expand Down
12 changes: 6 additions & 6 deletions src/components/MoneyRequestHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPre
const [rejectModalAction, setRejectModalAction] = useState<ValueOf<
typeof CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.HOLD | typeof CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REJECT
> | null>(null);
const [duplicateDistanceErrorModalVisible, setDuplicateDistanceErrorModalVisible] = useState(false);
const [rateErrorModalVisible, setRateErrorModalVisible] = useState(false);
const [duplicatePerDiemErrorModalVisible, setDuplicatePerDiemErrorModalVisible] = useState(false);
const [isDuplicateActive, temporarilyDisableDuplicateAction] = useThrottledButtonState();
const [dismissedRejectUseExplanation] = useOnyx(ONYXKEYS.NVP_DISMISSED_REJECT_USE_EXPLANATION, {canBeMissing: true});
Expand Down Expand Up @@ -457,7 +457,7 @@ function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPre
value: CONST.REPORT.SECONDARY_ACTIONS.DUPLICATE,
onSelected: () => {
if (hasCustomUnitOutOfPolicyViolation) {
setDuplicateDistanceErrorModalVisible(true);
setRateErrorModalVisible(true);
return;
}

Expand Down Expand Up @@ -638,11 +638,11 @@ function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPre
/>
<ConfirmModal
title={translate('common.duplicateExpense')}
isVisible={duplicateDistanceErrorModalVisible}
onConfirm={() => setDuplicateDistanceErrorModalVisible(false)}
onCancel={() => setDuplicateDistanceErrorModalVisible(false)}
isVisible={rateErrorModalVisible}
onConfirm={() => setRateErrorModalVisible(false)}
onCancel={() => setRateErrorModalVisible(false)}
confirmText={translate('common.buttonConfirm')}
prompt={translate('iou.correctDistanceRateError')}
prompt={translate('iou.correctRateError')}
shouldShowCancelButton={false}
/>
<ConfirmModal
Expand Down
2 changes: 1 addition & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / Stunde`,
amountTooLargeError: 'Der Gesamtbetrag ist zu hoch. Verringere die Stunden oder reduziere den Satz.',
},
correctDistanceRateError: 'Behebe den Fehler beim Entfernungssatz und versuche es erneut.',
correctRateError: 'Behebe den Kursfehler und versuche es erneut.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Erklären</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'hat die Ausgabe als „erstattungsfähig“ markiert' : 'hat die Ausgabe als „nicht erstattungsfähig“ markiert'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ const translations = {
ratePreview: (rate: string) => `${rate} / hour`,
amountTooLargeError: 'The total amount is too large. Lower the hours or reduce the rate.',
},
correctDistanceRateError: 'Fix the distance rate error and try again.',
correctRateError: 'Fix the rate error and try again.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Explain</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'marked the expense as "reimbursable"' : 'marked the expense as "non-reimbursable"'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / hora`,
amountTooLargeError: 'El importe total es demasiado alto. Reduce las horas o disminuye la tasa.',
},
correctDistanceRateError: 'Corrige el error de la tasa de distancia y vuelve a intentarlo.',
correctRateError: 'Corrige el error de la tasa y vuelve a intentarlo.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Explicar</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'marcó el gasto como "reembolsable"' : 'marcó el gasto como "no reembolsable"'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / heure`,
amountTooLargeError: 'Le montant total est trop élevé. Réduisez le nombre d’heures ou diminuez le taux.',
},
correctDistanceRateError: 'Corrigez l’erreur de taux de distance, puis réessayez.',
correctRateError: 'Corrigez l’erreur de taux et réessayez.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Expliquer</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'a marqué la dépense comme « remboursable »' : 'a marqué la dépense comme « non remboursable »'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / ora`,
amountTooLargeError: 'L’importo totale è troppo alto. Riduci le ore o abbassa la tariffa.',
},
correctDistanceRateError: 'Correggi l’errore nella tariffa distanza e riprova.',
correctRateError: 'Correggi l’errore di tariffa e riprova.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Spiega</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'ha contrassegnato la spesa come "rimborsabile"' : 'ha contrassegnato la spesa come "non rimborsabile"'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / 時間`,
amountTooLargeError: '合計金額が大きすぎます。時間を減らすか、レートを下げてください。',
},
correctDistanceRateError: '距離レートのエラーを修正して、もう一度お試しください。',
correctRateError: 'レートのエラーを修正して、もう一度お試しください。',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>説明</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? '経費を「精算対象」としてマークしました' : '経費を「非精算」としてマークしました'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / uur`,
amountTooLargeError: 'Het totale bedrag is te hoog. Verlaag het aantal uren of verlaag het tarief.',
},
correctDistanceRateError: 'Los het foutieve afstandstarief op en probeer het opnieuw.',
correctRateError: 'Herstel de koersfout en probeer het opnieuw.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Uitleggen</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'heeft de uitgave gemarkeerd als „vergoedbaar”' : 'markeerde de uitgave als ‘niet-terugbetaalbaar’'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / godzinę`,
amountTooLargeError: 'Łączna kwota jest zbyt wysoka. Zmniejsz liczbę godzin lub obniż stawkę.',
},
correctDistanceRateError: 'Napraw błąd stawki za dystans i spróbuj ponownie.',
correctRateError: 'Napraw błąd stawki i spróbuj ponownie.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Wyjaśnij</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'oznaczył(a) wydatek jako „podlegający zwrotowi”' : 'oznaczył(a) wydatek jako „niepodlegający zwrotowi”'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / hora`,
amountTooLargeError: 'O valor total é muito alto. Diminua as horas ou reduza a tarifa.',
},
correctDistanceRateError: 'Corrija o erro na taxa de distância e tente novamente.',
correctRateError: 'Corrija o erro de taxa e tente novamente.',
AskToExplain: `. <a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>Explicar</strong></a> &#x2728;`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? 'marcou a despesa como "reembolsável"' : 'marcou a despesa como “não reembolsável”'),
Expand Down
2 changes: 1 addition & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ const translations: TranslationDeepObject<typeof en> = {
ratePreview: (rate: string) => `${rate} / 小时`,
amountTooLargeError: '总金额过大。请减少工时或降低费率。',
},
correctDistanceRateError: '修复距离费率错误后请重试。',
correctRateError: '修复费率错误后重试。',
AskToExplain: `。<a href="${CONST.CONCIERGE_EXPLAIN_LINK_PATH}"><strong>说明</strong></a> ✨`,
policyRulesModifiedFields: {
reimbursable: (value: boolean) => (value ? '已将该报销单标记为“可报销”' : '将该报销单标记为“不可报销”'),
Expand Down
Loading