File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
projects/packages/forms/src/store/integrations Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1+ import { __ } from '@wordpress/i18n' ;
12import {
23 RECEIVE_INTEGRATIONS ,
34 INVALIDATE_INTEGRATIONS ,
@@ -34,7 +35,7 @@ export default function reducer(
3435 return {
3536 ...state ,
3637 isLoading : false ,
37- error : action . error ?? 'Unknown error' ,
38+ error : action . error ?? __ ( 'Unknown error' , 'jetpack-forms' ) ,
3839 } ;
3940 case RECEIVE_INTEGRATIONS :
4041 return {
Original file line number Diff line number Diff line change 11import apiFetch from '@wordpress/api-fetch' ;
2+ import { __ } from '@wordpress/i18n' ;
23import { addQueryArgs } from '@wordpress/url' ;
34import { INVALIDATE_INTEGRATIONS } from './action-types' ;
45import { receiveIntegrations , setIntegrationsError , setIntegrationsLoading } from './actions' ;
@@ -14,7 +15,7 @@ export const getIntegrations =
1415 const result = await apiFetch < Integration [ ] > ( { path } ) ;
1516 dispatch ( receiveIntegrations ( result ) ) ;
1617 } catch ( e ) {
17- const message = e instanceof Error ? e . message : 'Unknown error' ;
18+ const message = e instanceof Error ? e . message : __ ( 'Unknown error' , 'jetpack-forms' ) ;
1819 dispatch ( setIntegrationsError ( message ) ) ;
1920 } finally {
2021 dispatch ( setIntegrationsLoading ( false ) ) ;
You can’t perform that action at this time.
0 commit comments