Skip to content

Commit

Permalink
CSV Exports: Simplify localization by setting export language to that…
Browse files Browse the repository at this point in the history
… in user profile settings (#10003)

Co-authored-by: Nagesh Pai <[email protected]>
Co-authored-by: Eric Jinks <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2025
1 parent cabcd11 commit 8802c80
Show file tree
Hide file tree
Showing 30 changed files with 75 additions and 1,037 deletions.
4 changes: 4 additions & 0 deletions changelog/update-9971-simplify-localization-csv-export
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Simplify localization of CSV exports to use user language settings from WP Admin, allowing the CSV export to match the localization of the data presented in the admin UI.
227 changes: 0 additions & 227 deletions client/components/csv-export-modal/index.tsx

This file was deleted.

51 changes: 0 additions & 51 deletions client/components/csv-export-modal/styles.scss

This file was deleted.

This file was deleted.

72 changes: 0 additions & 72 deletions client/components/csv-export-modal/test/index.test.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion client/data/deposits/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const formatQueryFilters = ( query ) => ( {
],
status_is: query.statusIs,
status_is_not: query.statusIsNot,
locale: query.locale,
locale: query.userLocale,
} );

export function getDepositsCSV( query ) {
Expand Down
2 changes: 1 addition & 1 deletion client/data/disputes/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const formatQueryFilters = ( query ) => ( {
: query.search,
status_is: query.statusIs,
status_is_not: query.statusIsNot,
locale: query.locale,
locale: query.userLocale,
} );

export function getDisputesCSV( query ) {
Expand Down
6 changes: 0 additions & 6 deletions client/data/settings/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,6 @@ export function updateDepositScheduleMonthlyAnchor(
} );
}

export function updateExportLanguage( language ) {
return updateSettingsValues( {
reporting_export_language: language,
} );
}

export function* saveSettings() {
let error = null;
try {
Expand Down
Loading

0 comments on commit 8802c80

Please sign in to comment.