Clean up QBO export picker location helpers and copy key#92429
Clean up QBO export picker location helpers and copy key#92429MelvinBot wants to merge 2 commits into
Conversation
Extract condition-centric areLocationsImportedAsTags helper and use it in both the company-card and out-of-pocket QBO export pickers, and rename the companyCardsLocationEnabledDescription translation key to companyCardsLocationTagDescription to match its tag-specific copy. Co-authored-by: Jules <Julesssss@users.noreply.github.com>
🦜 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/fr.ts b/src/languages/fr.ts
index 620960c1eff..4e9908e05de 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2978,7 +2978,7 @@ ${amount} pour ${merchant} - ${date}`,
phoneOrEmail: 'Téléphone ou e-mail',
error: {
agentSignInBlocked:
- 'Les comptes d\u2019agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
+ 'Les comptes d’agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
invalidFormatEmailLogin: 'L’adresse e-mail saisie est invalide. Veuillez corriger le format et réessayer.',
},
cannotGetAccountDetails: 'Impossible de récupérer les détails du compte. Veuillez essayer de vous reconnecter.',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
The failing check is unrelated to this PR — The one real failure:
|
|
The two failing checks ( Root cause
This file is not in this PR's diff (it only touches QBO export helpers + language files), so the failures can't originate here. The declaration was removed in What needs to happenThis is a const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);I did not push anything to this PR, since the fix is unrelated to its scope. Once |
|
Both failing checks ( Root cause:
PR checks run against Evidence
What needs to happen: This is a broken- |
Explanation of Change
Maintainability cleanup from #92421. The
syncLocations === TAGcheck was duplicated across three call sites, so I replaced the single-usecanUseVendorBillForCompanyCardExporthelper with a condition-centricareLocationsImportedAsTagsand used it in both QBO export pickers (company-card and out-of-pocket).Also renamed the
companyCardsLocationEnabledDescriptiontranslation key tocompanyCardsLocationTagDescriptionacross all 10 locales, since its copy now describes the tag-specific case rather than the old broad "locations enabled" rule. Behaviour-preserving — no copy content changed.Fixed Issues
$ #92421
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review". Suggested coverage: with a QBO-connected workspace, toggle Locations import between "Tags" and "Report fields"/off, then open both the out-of-pocket export picker and the company-card export picker and verify the Check/Vendor bill options (and the company-card footer copy) show/hide correctly.
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari