Add support for "Require company cards for all purchases" policy changelog report action#88542
Conversation
…nslations in report names, context menu copy, sidebar, options list
…on in OptionsListUtils, ReportNameUtils, and SidebarUtils
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 9afba20b..de1e9113 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7506,6 +7506,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
`Kartenfeed-Tag für das Abrechnungsperiodenende von „${feedName}“ geändert${newValue ? ` in „${newValue}“` : ''}${previousValue ? ` (zuvor „${previousValue}“)` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) =>
`${fieldType}-Berichtsfeld „${fieldName}“${defaultValue ? ` mit Standardwert „${defaultValue}“` : ''} hinzugefügt`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `${enabled ? 'aktiviert' : 'deaktiviert'} die Anforderung für Firmenkartenkäufe`,
},
roomMembersPage: {
memberNotFound: 'Mitglied nicht gefunden.',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index ae32a792..847d89e8 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7528,6 +7528,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
`a modifié le jour de fin de période de relevé du flux de carte « ${feedName} »${newValue ? ` à « ${newValue} »` : ''}${previousValue ? ` (précédemment « ${previousValue} »)` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) =>
`a ajouté le champ de note de frais ${fieldType} « ${fieldName} »${defaultValue ? ` avec la valeur par défaut « ${defaultValue} »` : ''}`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `${enabled ? 'activé' : 'désactivé'} l’exigence d’achats par carte d’entreprise`,
},
roomMembersPage: {
memberNotFound: 'Membre introuvable.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index ef2d22f3..641af563 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7494,6 +7494,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
`ha modificato il giorno di fine periodo dell’estratto conto del flusso carta "${feedName}"${newValue ? ` a "${newValue}"` : ''}${previousValue ? ` (in precedenza "${previousValue}")` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) =>
`aggiunto campo di report ${fieldType} "${fieldName}"${defaultValue ? ` con valore predefinito "${defaultValue}"` : ''}`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `${enabled ? 'abilitato' : 'disabilitato'} il requisito per gli acquisti con carta aziendale`,
},
roomMembersPage: {
memberNotFound: 'Membro non trovato.',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 373b1521..dff99334 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7404,6 +7404,7 @@ ${reportName}
`カード明細フィード「${feedName}」の利用明細期間の終了日を変更しました${newValue ? ` を「${newValue}」に` : ''}${previousValue ? ` (以前の値:「${previousValue}」)` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) =>
`${fieldType}レポートフィールド「${fieldName}」を追加しました${defaultValue ? ` デフォルト値「${defaultValue}」付き` : ''}`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `${enabled ? '有効' : '無効'} の法人カード購入要件`,
},
roomMembersPage: {
memberNotFound: 'メンバーが見つかりません。',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index cdf9739c..9e1ab8c3 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7470,6 +7470,7 @@ Voeg meer bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
`heeft de einddag van de afrekenperiode van kaartfeed "${feedName}" gewijzigd${newValue ? ` naar "${newValue}"` : ''}${previousValue ? ` (voorheen "${previousValue}")` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) =>
`heeft ${fieldType}-rapportveld "${fieldName}" toegevoegd${defaultValue ? ` met standaardwaarde "${defaultValue}"` : ''}`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `vereiste ${enabled ? 'ingeschakeld' : 'uitgeschakeld'} voor bedrijfskaarttransacties`,
},
roomMembersPage: {
memberNotFound: 'Lid niet gevonden.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 76c129b2..136fdf37 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7460,6 +7460,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
`zmienił dzień zakończenia okresu rozliczeniowego dla źródła karty „${feedName}”${newValue ? ` na „${newValue}”` : ''}${previousValue ? ` (wcześniej „${previousValue}”)` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) =>
`dodano pole raportu typu ${fieldType} „${fieldName}”${defaultValue ? ` z domyślną wartością „${defaultValue}”` : ''}`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `${enabled ? 'włączone' : 'wyłączone'} wymóg dotyczący zakupów kartą służbową`,
},
roomMembersPage: {
memberNotFound: 'Nie znaleziono członka.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 0b8302ee..94c25057 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7461,6 +7461,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
`changed card feed "${feedName}" statement period end day${newValue ? ` para "${newValue}"` : ''}${previousValue ? `(antes " ${previousValue}")` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) =>
`adicionou o campo de relatório ${fieldType} "${fieldName}"${defaultValue ? ` com valor padrão "${defaultValue}"` : ''}`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `${enabled ? 'ativado' : 'desativado'} o requisito de compras com cartão corporativo`,
},
roomMembersPage: {
memberNotFound: 'Membro não encontrado.',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index d3e4ebf0..0e9c399d 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7274,6 +7274,7 @@ ${reportName}
updatedCardFeedStatementPeriod: (feedName: string, newValue?: string, previousValue?: string) =>
`已更改卡片流水“${feedName}”的账单周期截止日${newValue ? ` 为“${newValue}”` : ''}${previousValue ? ` (先前为“${previousValue}”)` : ''}`,
addedReportField: (fieldType: string, fieldName?: string, defaultValue?: string) => `已添加 ${fieldType} 报告字段“${fieldName}”${defaultValue ? ` 默认值为“${defaultValue}”` : ''}`,
+ updatedRequireCompanyCards: ({enabled}: {enabled: boolean}) => `${enabled ? '已启用' : '已禁用'} 公司商务卡消费要求`,
},
roomMembersPage: {
memberNotFound: '未找到成员。',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @srikarparsi has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/srikarparsi in version: 9.3.66-0 🚀
|
|
I reviewed the changes in this PR against the help site files under No help site changes are required. This PR adds a policy changelog report action — a system message displayed in the #admins room when an admin toggles the "Require company cards for all purchases" setting. The existing help article |
Explanation of Change
Add support for "Require company cards for all purchases" policy changelog report action
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/622898 (Part of it)
PROPOSAL:
Tests
Prerequisites
Test Steps 1
Steps:
enabled the company card purchases requirement9, Verify that: The LHN sidebar preview shows the correct changelog message text
Test Steps 2
disabled the company card purchases requirement7, Verify that: The LHN sidebar preview shows the correct changelog message text
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
recording.mov