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
6 changes: 6 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10584,6 +10584,12 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`aktualisierte „Verhindern, dass nicht erstattungsfähige Berichte als bezahlt markiert werden“ auf „${newValue === 'true' ? 'Aktiviert' : 'Deaktiviert'}“ (zuvor „${oldValue === 'true' ? 'Aktiviert' : 'Deaktiviert'}“)`,
addedExpensifyCardFeed: (feedName: string) => `„${feedName}“-Expensify-Kartenfeed hinzugefügt`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `setzen Sie die Workspace-Zeitzone auf „${newValue}“`;
}
return `die Workspace-Zeitzone auf „${newValue}“ aktualisiert (zuvor „${oldValue}“)`;
},
},
roomMembersPage: {
memberNotFound: 'Mitglied nicht gefunden.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10750,6 +10750,12 @@ ${reportName}`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`ενημερώθηκε το «αποτροπή επισήμανσης μη αποζημιώσιμων αναφορών ως πληρωμένες» σε «${newValue === 'true' ? 'Ενεργοποιημένο' : 'Απενεργοποιημένο'}» (προηγουμένως «${oldValue === 'true' ? 'Ενεργοποιημένο' : 'Απενεργοποιημένο'}»)`,
addedExpensifyCardFeed: (feedName: string) => `προστέθηκε ροή Κάρτας Expensify «${feedName}»`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `ορίστε τη ζώνη ώρας του χώρου εργασίας σε «${newValue}»`;
}
return `ενημέρωσε τη ζώνη ώρας του χώρου εργασίας σε «${newValue}» (προηγουμένως «${oldValue}»)`;
},
},
roomMembersPage: {
memberNotFound: 'Το μέλος δεν βρέθηκε.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10404,6 +10404,12 @@ const translations = {
}
return `updated the monthly report submission date to "${newValue}" (previously "${oldValue}")`;
},
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `set the workspace timezone to "${newValue}"`;
}
return `updated the workspace timezone to "${newValue}" (previously "${oldValue}")`;
},
updateDefaultBillable: (oldValue: string, newValue: string) => `updated "Re-bill expenses to clients" to "${newValue}" (previously "${oldValue}")`,
updateDefaultReimbursable: (oldValue: string, newValue: string) => `updated "Cash expense default" to "${newValue}" (previously "${oldValue}")`,
updateDefaultTitleEnforced: (value: boolean) => `turned "Enforce default report titles" ${value ? 'on' : 'off'}`,
Expand Down
6 changes: 6 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10401,6 +10401,12 @@ ${reportName}`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`actualizó "Impedir marcar los informes no reembolsables como pagados" a "${newValue === 'true' ? 'Habilitado' : 'Deshabilitado'}" (previamente "${oldValue === 'true' ? 'Habilitado' : 'Deshabilitado'}")`,
addedExpensifyCardFeed: (feedName: string) => `añadió el feed de Tarjeta Expensify "${feedName}"`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `establece la zona horaria del espacio de trabajo en «${newValue}»`;
}
return `actualizó la zona horaria del espacio de trabajo a «${newValue}» (previamente «${oldValue}»)`;
},
},
roomMembersPage: {
memberNotFound: 'Miembro no encontrado.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10616,6 +10616,12 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`mis à jour « Empêcher de marquer les notes de frais non remboursables comme payées » en « ${newValue === 'true' ? 'Activé' : 'Désactivé'} » (auparavant « ${oldValue === 'true' ? 'Activé' : 'Désactivé'} »)`,
addedExpensifyCardFeed: (feedName: string) => `a ajouté le flux Carte Expensify « ${feedName} »`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `définir le fuseau horaire de l’espace de travail sur « ${newValue} »`;
}
return `a mis à jour le fuseau horaire de l'espace de travail sur « ${newValue} » (auparavant « ${oldValue} »)`;
},
},
roomMembersPage: {
memberNotFound: 'Membre introuvable.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10534,6 +10534,12 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`aggiornato "Impedisci di contrassegnare come pagati i report non rimborsabili" in "${newValue === 'true' ? 'Abilitato' : 'Disabilitato'}" (precedentemente "${oldValue === 'true' ? 'Abilitato' : 'Disabilitato'}")`,
addedExpensifyCardFeed: (feedName: string) => `aggiunto il feed Carta Expensify «${feedName}»`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `imposta il fuso orario dello spazio di lavoro su "${newValue}"`;
}
return `ha aggiornato il fuso orario dello spazio di lavoro a "${newValue}" (in precedenza "${oldValue}")`;
},
},
roomMembersPage: {
memberNotFound: 'Membro non trovato.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10369,6 +10369,12 @@ ${reportName}`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`「精算不要レポートを支払済みにしない」を「${newValue === 'true' ? '有効' : '無効'}」(以前は「${oldValue === 'true' ? '有効' : '無効'}」)に更新しました`,
addedExpensifyCardFeed: (feedName: string) => `「${feedName}」Expensify カードフィードを追加しました`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `ワークスペースのタイムゾーンを「${newValue}」に設定します`;
}
return `ワークスペースのタイムゾーンを「${newValue}」(以前は「${oldValue}」)に更新しました`;
},
},
roomMembersPage: {
memberNotFound: 'メンバーが見つかりません。',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10507,6 +10507,12 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`heeft "Voorkom dat niet-vergoedbare rapporten als betaald worden gemarkeerd" bijgewerkt naar "${newValue === 'true' ? 'Ingeschakeld' : 'Uitgeschakeld'}" (voorheen "${oldValue === 'true' ? 'Ingeschakeld' : 'Uitgeschakeld'}")`,
addedExpensifyCardFeed: (feedName: string) => `"${feedName}" Expensify Kaart-feed toegevoegd`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `stel de tijdzone van de werkruimte in op "${newValue}"`;
}
return `heeft de tijdzone van de werkruimte bijgewerkt naar "${newValue}" (voorheen "${oldValue}")`;
},
},
roomMembersPage: {
memberNotFound: 'Lid niet gevonden.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10522,6 +10522,12 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`zaktualizowano „Zapobiegaj oznaczaniu raportów niepodlegających zwrotowi jako opłacone” na „${newValue === 'true' ? 'Włączone' : 'Wyłączone'}” (wcześniej „${oldValue === 'true' ? 'Włączone' : 'Wyłączone'}”)`,
addedExpensifyCardFeed: (feedName: string) => `dodano źródło danych Karty Expensify „${feedName}”`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `ustaw strefę czasową miejsca pracy na „${newValue}”`;
}
return `zaktualizowano strefę czasową przestrzeni roboczej na „${newValue}” (wcześniej „${oldValue}”)`;
},
},
roomMembersPage: {
memberNotFound: 'Nie znaleziono członka.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10510,6 +10510,12 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`atualizou "Impedir marcar relatórios não reembolsáveis como pagos" para "${newValue === 'true' ? 'Ativado' : 'Desativado'}" (antes "${oldValue === 'true' ? 'Ativado' : 'Desativado'}")`,
addedExpensifyCardFeed: (feedName: string) => `adicionou o feed do Cartão Expensify "${feedName}"`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `definir o fuso horário do espaço de trabalho para "${newValue}"`;
}
return `atualizou o fuso horário do workspace para "${newValue}" (antes era "${oldValue}")`;
},
},
roomMembersPage: {
memberNotFound: 'Membro não encontrado.',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10109,6 +10109,12 @@ ${reportName}`,
preventPayoutNonReimbursableReports: (oldValue: string, newValue: string) =>
`已将“防止将不可报销报表标记为已支付”更新为“${newValue === 'true' ? '已启用' : '已禁用'}”(之前为“${oldValue === 'true' ? '已启用' : '已禁用'}”)`,
addedExpensifyCardFeed: (feedName: string) => `已添加“${feedName}”Expensify 卡交易明细馈送`,
updateWorkspaceTimezone: (oldValue: string, newValue: string) => {
if (!oldValue) {
return `将工作区时区设置为“${newValue}”`;
}
return `已将工作区时区更新为“${newValue}”(先前为“${oldValue}”)`;
},
},
roomMembersPage: {
memberNotFound: '未找到成员。',
Expand Down
3 changes: 3 additions & 0 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4350,6 +4350,9 @@ function getWorkspaceUpdateFieldMessage(translate: LocalizedTranslate, action: R
};
return translate('workspaceActions.updateMonthlyOffset', getAutoReportingOffsetToDisplay(oldValue), getAutoReportingOffsetToDisplay(newValue));
}
if (updatedField && updatedField === CONST.POLICY.COLLECTION_KEYS.TIME_ZONE && (typeof oldValue === 'string' || typeof oldValue === 'undefined') && typeof newValue === 'string') {
return translate('workspaceActions.updateWorkspaceTimezone', oldValue ?? '', newValue);
}
return getReportActionText(action);
}

Expand Down
44 changes: 44 additions & 0 deletions tests/unit/ReportActionsUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import {
getUpdatedCardFeedReimbursableMessage,
getUpdatedCardFeedStatementPeriodMessage,
getUpdatedOfficeLocationMessage,
getWorkspaceUpdateFieldMessage,
hasNextActionMadeBySameActor,
hasReasoning,
isConsecutiveActionMadeByPreviousActor,
Expand Down Expand Up @@ -5144,6 +5145,49 @@ describe('ReportActionsUtils', () => {
});
});

describe('getWorkspaceUpdateFieldMessage', () => {
it('should return the App message when the workspace timezone changes', () => {
// Given a timezone update whose server text would otherwise be shown as is
const action = {
actionName: CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_FIELD,
reportActionID: '1',
created: '',
message: [{type: 'COMMENT', text: 'updated timeZone from "America/New_York" to "Asia/Kolkata"'}],
originalMessage: {
updatedField: CONST.POLICY.COLLECTION_KEYS.TIME_ZONE,
oldValue: 'America/New_York',
newValue: 'Asia/Kolkata',
},
} as ReportAction;

// When building the message
const result = getWorkspaceUpdateFieldMessage(translateLocal, action);

// Then App wording is used so the text stays the same whichever server message arrives last
expect(result).toBe('updated the workspace timezone to "Asia/Kolkata" (previously "America/New_York")');
});

it('should return the App message when the workspace had no timezone before', () => {
// Given a timezone update for a workspace that never had a timezone, so the server sends no old value
const action = {
actionName: CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_FIELD,
reportActionID: '1',
created: '',
message: [{type: 'COMMENT', text: 'updated timeZone to "Asia/Kolkata"'}],
originalMessage: {
updatedField: CONST.POLICY.COLLECTION_KEYS.TIME_ZONE,
newValue: 'Asia/Kolkata',
},
} as ReportAction;

// When building the message
const result = getWorkspaceUpdateFieldMessage(translateLocal, action);

// Then App wording is still used instead of falling back to the server text
expect(result).toBe('set the workspace timezone to "Asia/Kolkata"');
});
});

describe('getPolicyChangeLogMaxExpenseAmountNoReceiptMessage', () => {
it('should return set message when setting from disabled to a value', () => {
const action = {
Expand Down
Loading