Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV Exports: Simplify localization by setting export language to that in site settings #10003

Draft
wants to merge 20 commits into
base: develop
Choose a base branch
from
Draft
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
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 global site language settings from WP Admin
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.

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
10 changes: 0 additions & 10 deletions client/data/settings/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,6 @@ export const useDepositScheduleMonthlyAnchor = () => {
return [ depositScheduleMonthlyAnchor, updateDepositScheduleMonthlyAnchor ];
};

export const useReportingExportLanguage = () => {
const { updateExportLanguage } = useDispatch( STORE_NAME );

const exportLanguage = useSelect( ( select ) =>
select( STORE_NAME ).getExportLanguage()
);

return [ exportLanguage, updateExportLanguage ];
};

export const useDepositDelayDays = () =>
useSelect( ( select ) => select( STORE_NAME ).getDepositDelayDays(), [] );

Expand Down
Loading
Loading