cozy-harvest-lib 35.1.13 → 36.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/.storybook/StoryContainer.tsx +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/dist/components/AccountForm/CannotConnectModal.js +1 -1
  4. package/dist/components/AccountForm/ConnectionBackdrop.js +1 -1
  5. package/dist/components/AccountForm/InstallFlagshipButton.js +1 -1
  6. package/dist/components/AccountForm/InstallFlagshipButton.spec.js +1 -1
  7. package/dist/components/AccountForm/index.spec.js +1 -1
  8. package/dist/components/AccountModalWithoutTabs/Error.js +1 -1
  9. package/dist/components/AccountModalWithoutTabs/OpenOAuthWindowButton.js +1 -1
  10. package/dist/components/AccountSelectBox/CreateAccountButton.js +1 -1
  11. package/dist/components/AccountsList/AccountsList.js +1 -1
  12. package/dist/components/AccountsList/Status.js +1 -1
  13. package/dist/components/AccountsListModal.js +1 -1
  14. package/dist/components/DisconnectedAccountModal.js +1 -1
  15. package/dist/components/FlowProvider.js +1 -1
  16. package/dist/components/HarvestRoutes.js +1 -1
  17. package/dist/components/KonnectorAccounts.js +1 -1
  18. package/dist/components/KonnectorBlock.js +1 -1
  19. package/dist/components/KonnectorConfiguration/ConfigurationTab/ContractItemSecondaryText.js +1 -1
  20. package/dist/components/KonnectorConfiguration/ConfigurationTab/Contracts.js +1 -1
  21. package/dist/components/KonnectorConfiguration/ConfigurationTab/EditContract.js +1 -1
  22. package/dist/components/KonnectorConfiguration/ConfigurationTab/index.js +2 -2
  23. package/dist/components/KonnectorConfiguration/Success/DriveLink.js +1 -1
  24. package/dist/components/KonnectorSuccess.js +1 -1
  25. package/dist/components/KonnectorSuggestionModal/DataTypes.js +1 -1
  26. package/dist/components/KonnectorSuggestionModal/index.js +1 -1
  27. package/dist/components/Maintenance/MaintenanceHeader.js +1 -1
  28. package/dist/components/Maintenance/index.js +1 -1
  29. package/dist/components/Maintenance/index.spec.js +1 -1
  30. package/dist/components/NewAccountModal.js +1 -1
  31. package/dist/components/OAuthWindow.js +1 -1
  32. package/dist/components/RedirectToAccountFormButton.js +1 -1
  33. package/dist/components/TriggerManager.js +1 -1
  34. package/dist/components/TwoFAModal.js +1 -1
  35. package/dist/components/cards/AppLinkCard.js +1 -1
  36. package/dist/components/cards/InformationsCard.js +1 -1
  37. package/dist/components/cards/LaunchButton.js +1 -1
  38. package/dist/components/cards/LaunchTriggerCard.js +1 -1
  39. package/dist/components/cards/RunningAlert.js +1 -1
  40. package/dist/components/cards/RunningAlert.spec.tsx +1 -1
  41. package/dist/components/cards/TriggerAlert.js +1 -1
  42. package/dist/components/cards/UnrunnableAlert.js +1 -1
  43. package/dist/components/cards/actions/configureAction.js +1 -1
  44. package/dist/components/cards/actions/connectAction.js +1 -1
  45. package/dist/components/cards/actions/launchAction.js +1 -1
  46. package/dist/components/cards/helpers.js +1 -1
  47. package/dist/components/hoc/withKonnectorLocales.js +1 -1
  48. package/dist/components/hoc/withLocales.js +1 -2
  49. package/dist/components/infos/KonnectorUpdateInfos.js +1 -1
  50. package/dist/components/infos/TriggerErrorDescription.js +1 -1
  51. package/dist/components/infos/TriggerErrorInfo.js +1 -1
  52. package/dist/components/infos/TriggerMaintenanceDescription.js +1 -1
  53. package/dist/datacards/FileDataCard.js +1 -1
  54. package/dist/datacards/GeoDataCard.js +1 -1
  55. package/dist/helpers/konnectorBlock.spec.js +1 -1
  56. package/package.json +10 -8
  57. package/src/components/AccountForm/CannotConnectModal.jsx +1 -1
  58. package/src/components/AccountForm/ConnectionBackdrop.jsx +1 -1
  59. package/src/components/AccountForm/InstallFlagshipButton.jsx +1 -1
  60. package/src/components/AccountForm/InstallFlagshipButton.spec.jsx +1 -1
  61. package/src/components/AccountForm/index.spec.jsx +1 -1
  62. package/src/components/AccountModalWithoutTabs/Error.jsx +1 -1
  63. package/src/components/AccountModalWithoutTabs/OpenOAuthWindowButton.jsx +1 -1
  64. package/src/components/AccountSelectBox/CreateAccountButton.jsx +1 -1
  65. package/src/components/AccountsList/AccountsList.jsx +1 -1
  66. package/src/components/AccountsList/Status.jsx +1 -1
  67. package/src/components/AccountsListModal.jsx +1 -1
  68. package/src/components/DisconnectedAccountModal.jsx +1 -1
  69. package/src/components/FlowProvider.jsx +1 -1
  70. package/src/components/HarvestRoutes.jsx +1 -1
  71. package/src/components/KonnectorAccounts.jsx +1 -1
  72. package/src/components/KonnectorBlock.jsx +1 -1
  73. package/src/components/KonnectorConfiguration/ConfigurationTab/ContractItemSecondaryText.jsx +1 -1
  74. package/src/components/KonnectorConfiguration/ConfigurationTab/Contracts.jsx +1 -1
  75. package/src/components/KonnectorConfiguration/ConfigurationTab/EditContract.jsx +1 -1
  76. package/src/components/KonnectorConfiguration/ConfigurationTab/index.jsx +1 -1
  77. package/src/components/KonnectorConfiguration/Success/DriveLink.jsx +1 -1
  78. package/src/components/KonnectorSuccess.jsx +1 -1
  79. package/src/components/KonnectorSuggestionModal/DataTypes.jsx +1 -1
  80. package/src/components/KonnectorSuggestionModal/index.jsx +1 -1
  81. package/src/components/Maintenance/MaintenanceHeader.jsx +1 -1
  82. package/src/components/Maintenance/index.jsx +1 -1
  83. package/src/components/Maintenance/index.spec.jsx +1 -2
  84. package/src/components/NewAccountModal.jsx +1 -1
  85. package/src/components/OAuthWindow.jsx +1 -1
  86. package/src/components/RedirectToAccountFormButton.jsx +1 -1
  87. package/src/components/TriggerManager.jsx +1 -1
  88. package/src/components/TwoFAModal.jsx +1 -1
  89. package/src/components/cards/AppLinkCard.jsx +1 -1
  90. package/src/components/cards/InformationsCard.tsx +1 -1
  91. package/src/components/cards/LaunchButton.jsx +1 -1
  92. package/src/components/cards/LaunchTriggerCard.jsx +1 -1
  93. package/src/components/cards/RunningAlert.spec.tsx +1 -1
  94. package/src/components/cards/RunningAlert.tsx +1 -1
  95. package/src/components/cards/TriggerAlert.jsx +1 -2
  96. package/src/components/cards/UnrunnableAlert.jsx +1 -1
  97. package/src/components/cards/actions/configureAction.js +1 -1
  98. package/src/components/cards/actions/connectAction.js +1 -1
  99. package/src/components/cards/actions/launchAction.js +1 -1
  100. package/src/components/cards/helpers.js +1 -1
  101. package/src/components/hoc/withKonnectorLocales.jsx +1 -2
  102. package/src/components/hoc/withLocales.js +1 -3
  103. package/src/components/infos/KonnectorUpdateInfos.jsx +1 -1
  104. package/src/components/infos/TriggerErrorDescription.jsx +1 -1
  105. package/src/components/infos/TriggerErrorInfo.jsx +1 -1
  106. package/src/components/infos/TriggerMaintenanceDescription.jsx +1 -1
  107. package/src/datacards/FileDataCard.jsx +1 -1
  108. package/src/datacards/GeoDataCard.jsx +1 -1
  109. package/src/helpers/konnectorBlock.spec.js +2 -1
  110. package/test/AppLike.jsx +1 -1
@@ -6,7 +6,7 @@ import { Provider as ReduxProvider } from 'react-redux'
6
6
 
7
7
  import CozyClient, { CozyProvider as CozyClientProvider } from 'cozy-client'
8
8
  import { useCozyDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
9
- import I18n from 'cozy-ui/transpiled/react/providers/I18n'
9
+ import I18n from 'twake-i18n'
10
10
  import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
11
11
  import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme'
12
12
  import DialogContext from '../src/components/DialogContext'
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [36.0.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@35.1.14...cozy-harvest-lib@36.0.0) (2025-12-04)
7
+
8
+ ### Features
9
+
10
+ - Add twake-i18n in packages ([f8689a9](https://github.com/cozy/cozy-libs/commit/f8689a9a58dc6384ccf494a19fd1afb595da39f0))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ - You must have `twake-i18n >= 0.3.0` and `cozy-ui >= 135.0.0`
15
+
16
+ ## [35.1.14](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@35.1.13...cozy-harvest-lib@35.1.14) (2025-12-04)
17
+
18
+ **Note:** Version bump only for package cozy-harvest-lib
19
+
6
20
  ## [35.1.13](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@35.1.12...cozy-harvest-lib@35.1.13) (2025-12-04)
7
21
 
8
22
  **Note:** Version bump only for package cozy-harvest-lib
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
4
5
  import Typography from 'cozy-ui/transpiled/react/Typography';
5
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
6
6
  import Markdown from '../Markdown';
7
7
  import { useComponentsProps } from '../Providers/ComponentsPropsProvider';
8
8
 
@@ -1,11 +1,11 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import { useWebviewIntent } from 'cozy-intent';
4
5
  import Backdrop from 'cozy-ui/transpiled/react/Backdrop';
5
6
  import LinearProgress from 'cozy-ui/transpiled/react/LinearProgress';
6
7
  import Typography from 'cozy-ui/transpiled/react/Typography';
7
8
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
8
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
9
9
  import { makeStyles } from 'cozy-ui/transpiled/react/styles';
10
10
  var useStyles = makeStyles({
11
11
  container: {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
+ import { useI18n } from 'twake-i18n';
2
3
  import { getFlagshipDownloadLink } from 'cozy-client/dist/models/utils';
3
4
  import Buttons from 'cozy-ui/transpiled/react/Buttons';
4
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
5
5
 
6
6
  var InstallFlagshipButton = function InstallFlagshipButton(_ref) {
7
7
  var className = _ref.className;
@@ -10,7 +10,7 @@ jest.mock('cozy-device-helper', function () {
10
10
  };
11
11
  });
12
12
  jest.mock('cozy-flags');
13
- jest.mock('cozy-ui/transpiled/react/providers/I18n', function () {
13
+ jest.mock('twake-i18n', function () {
14
14
  return {
15
15
  useI18n: jest.fn(function () {
16
16
  return {
@@ -12,8 +12,8 @@ import enLocale from 'locales/en.json';
12
12
  import Polyglot from 'node-polyglot';
13
13
  import PropTypes from 'prop-types';
14
14
  import React from 'react';
15
+ import I18n from 'twake-i18n';
15
16
  import { isMobile } from 'cozy-device-helper';
16
- import I18n from 'cozy-ui/transpiled/react/providers/I18n';
17
17
  var polyglot = new Polyglot();
18
18
  polyglot.extend(enLocale);
19
19
  var t = polyglot.t.bind(polyglot);
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
+ import { useI18n } from 'twake-i18n';
2
3
  import { useClient } from 'cozy-client';
3
4
  import Button from 'cozy-ui/transpiled/react/Buttons';
4
5
  import Infos from 'cozy-ui/transpiled/react/deprecated/Infos';
5
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
6
6
  import { loadSelectedAccountId } from '../../helpers/accounts';
7
7
  import withLocales from '../hoc/withLocales';
8
8
 
@@ -2,13 +2,13 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import PropTypes from 'prop-types';
4
4
  import React, { useCallback } from 'react';
5
+ import { useI18n } from 'twake-i18n';
5
6
  import { useClient } from 'cozy-client';
6
7
  import { useWebviewIntent } from 'cozy-intent';
7
8
  import Button from 'cozy-ui/transpiled/react/Buttons';
8
9
  import Icon from 'cozy-ui/transpiled/react/Icon';
9
10
  import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync';
10
11
  import { ActionMenuItem } from 'cozy-ui/transpiled/react/deprecated/ActionMenu';
11
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
12
12
  import { intentsApiProptype } from '../../helpers/proptypes';
13
13
  import { OAUTH_SERVICE_OK, openOAuthWindow } from '../OAuthService';
14
14
  import useOAuthExtraParams from '../hooks/useOAuthExtraParams';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { translate } from 'twake-i18n';
2
3
  import Button from 'cozy-ui/transpiled/react/Buttons';
3
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
4
4
  /**
5
5
  * onClick is not called when we are on mobile device.
6
6
  * It seems that react-select captures this event before us
@@ -10,12 +10,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
10
10
 
11
11
  import PropTypes from 'prop-types';
12
12
  import React from 'react';
13
+ import { translate } from 'twake-i18n';
13
14
  import Button from 'cozy-ui/transpiled/react/Buttons';
14
15
  import Card from 'cozy-ui/transpiled/react/Card';
15
16
  import { DialogContent } from 'cozy-ui/transpiled/react/Dialog';
16
17
  import Icon from 'cozy-ui/transpiled/react/Icon';
17
18
  import PlusIcon from 'cozy-ui/transpiled/react/Icons/Plus';
18
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
19
19
  import AccountsListItem from './AccountsListItem';
20
20
  export var AccountsList = /*#__PURE__*/function (_React$PureComponent) {
21
21
  _inherits(AccountsList, _React$PureComponent);
@@ -1,11 +1,11 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
+ import { translate } from 'twake-i18n';
3
4
  import Icon from 'cozy-ui/transpiled/react/Icon';
4
5
  import CheckIcon from 'cozy-ui/transpiled/react/Icons/Check';
5
6
  import WarningIcon from 'cozy-ui/transpiled/react/Icons/Warning';
6
7
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
7
8
  import Typography from 'cozy-ui/transpiled/react/Typography';
8
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
9
9
  import { getErrorLocale } from '../../helpers/konnectors';
10
10
  import FlowProvider from '../FlowProvider';
11
11
  /**
@@ -1,10 +1,10 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { useNavigate } from 'react-router-dom';
4
+ import { translate } from 'twake-i18n';
4
5
  import DialogTitle from 'cozy-ui/transpiled/react/Dialog/DialogTitle';
5
6
  import DialogContent from 'cozy-ui/transpiled/react/DialogContent';
6
7
  import Typography from 'cozy-ui/transpiled/react/Typography';
7
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
8
8
  import AccountsList from './AccountsList/AccountsList';
9
9
  import KonnectorIcon from './KonnectorIcon';
10
10
 
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import PropTypes from 'prop-types';
4
4
  import React, { useRef, useState } from 'react';
5
+ import { useI18n } from 'twake-i18n';
5
6
  import { getCreatedByApp } from 'cozy-client/dist/models/utils';
6
7
  import Card from 'cozy-ui/transpiled/react/Card';
7
8
  import { useCozyDialog, DialogCloseButton } from 'cozy-ui/transpiled/react/CozyDialogs';
@@ -10,7 +11,6 @@ import DialogContent from 'cozy-ui/transpiled/react/DialogContent';
10
11
  import Divider from 'cozy-ui/transpiled/react/Divider';
11
12
  import { Tab, Tabs } from 'cozy-ui/transpiled/react/MuiTabs';
12
13
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
13
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
14
14
  import { Contracts } from './KonnectorConfiguration/ConfigurationTab/Contracts';
15
15
  import { getAccountInstitutionLabel } from './KonnectorConfiguration/ConfigurationTab/bankAccountHelpers';
16
16
  import KonnectorModalHeader from './KonnectorModalHeader';
@@ -16,8 +16,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
16
16
 
17
17
  import PropTypes from 'prop-types';
18
18
  import React, { Component } from 'react';
19
+ import { translate } from 'twake-i18n';
19
20
  import { withClient } from 'cozy-client';
20
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
21
21
  import ConnectionBackdrop from './AccountForm/ConnectionBackdrop';
22
22
  import TwoFAModal from './TwoFAModal';
23
23
  import assert from '../assert';
@@ -1,12 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import PropTypes from 'prop-types';
3
3
  import React, { useEffect } from 'react';
4
+ import { useI18n } from 'twake-i18n';
4
5
  import { useVaultUnlockContext, VaultUnlockPlaceholder } from 'cozy-keys-lib';
5
6
  import { DialogCloseButton, useCozyDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
6
7
  import Dialog from 'cozy-ui/transpiled/react/Dialog';
7
8
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
8
9
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
9
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
10
10
  import { DatacardOptions } from './Datacards/DatacardOptionsContext';
11
11
  import DialogContext from './DialogContext';
12
12
  import HarvestWrapper from './HarvestWrapper';
@@ -18,13 +18,13 @@ import get from 'lodash/get';
18
18
  import PropTypes from 'prop-types';
19
19
  import React from 'react';
20
20
  import { useLocation } from 'react-router-dom';
21
+ import { translate } from 'twake-i18n';
21
22
  import { withClient } from 'cozy-client';
22
23
  import Button from 'cozy-ui/transpiled/react/Buttons';
23
24
  import DialogContent from 'cozy-ui/transpiled/react/DialogContent';
24
25
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
25
26
  import Typography from 'cozy-ui/transpiled/react/Typography';
26
27
  import Infos from 'cozy-ui/transpiled/react/deprecated/Infos';
27
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
28
28
  import KonnectorModalHeader from './KonnectorModalHeader';
29
29
  import { fetchAccountsFromTriggers } from '../connections/accounts';
30
30
  import { fetchTrigger } from '../connections/triggers';
@@ -6,6 +6,7 @@ import cx from 'classnames';
6
6
  import get from 'lodash/get';
7
7
  import PropTypes from 'prop-types';
8
8
  import React, { useEffect, useState } from 'react';
9
+ import { useI18n } from 'twake-i18n';
9
10
  import { useClient, generateWebLink } from 'cozy-client';
10
11
  import Divider from 'cozy-ui/transpiled/react/Divider';
11
12
  import Icon from 'cozy-ui/transpiled/react/Icon';
@@ -17,7 +18,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
17
18
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
18
19
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
19
20
  import Typography from 'cozy-ui/transpiled/react/Typography';
20
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
21
21
  import AppIcon from 'cozy-ui-plus/dist/AppIcon';
22
22
  import Markdown from './Markdown';
23
23
  import { makeLabel } from './cards/helpers';
@@ -4,10 +4,10 @@ import dateFnsLocaleEs from 'date-fns/locale/es';
4
4
  import dateFnsLocalefr from 'date-fns/locale/fr';
5
5
  import PropTypes from 'prop-types';
6
6
  import React from 'react';
7
+ import { useI18n } from 'twake-i18n';
7
8
  import Icon from 'cozy-ui/transpiled/react/Icon';
8
9
  import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync';
9
10
  import UnlinkIcon from 'cozy-ui/transpiled/react/Icons/Unlink';
10
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
11
11
  import { isDeleted, isDisabled, isErrored, isImported } from './helpers';
12
12
  var dateFnsLocales = {
13
13
  en: dateFnsLocaleEn,
@@ -2,9 +2,9 @@
2
2
  import compose from 'lodash/flowRight';
3
3
  import PropTypes from 'prop-types';
4
4
  import React from 'react';
5
+ import { useI18n } from 'twake-i18n';
5
6
  import CozyClient, { Q, queryConnect, RealTimeQueries } from 'cozy-client';
6
7
  import NavigationList, { NavigationListSection, NavigationListHeader } from 'cozy-ui/transpiled/react/NavigationList';
7
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
8
8
  import CozyTheme from 'cozy-ui-plus/dist/providers/CozyTheme';
9
9
  import BIContractActivationWindow from './BiContractActivationWindow';
10
10
  import ContractItem from './ContractItem';
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  import PropTypes from 'prop-types';
6
6
  import React, { useState, forwardRef } from 'react';
7
+ import { useI18n } from 'twake-i18n';
7
8
  import { useClient, isQueryLoading, hasQueryBeenLoaded, useQuery } from 'cozy-client';
8
9
  import Button from 'cozy-ui/transpiled/react/Buttons';
9
10
  import { DialogCloseButton, DialogBackButton, ConfirmDialog, useCozyDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
@@ -15,7 +16,6 @@ import Spinner from 'cozy-ui/transpiled/react/Spinner';
15
16
  import Stack from 'cozy-ui/transpiled/react/Stack';
16
17
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
17
18
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
18
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
19
19
  import { withStyles } from 'cozy-ui/transpiled/react/styles';
20
20
  import CollectionField from 'cozy-ui-plus/dist/CollectionField';
21
21
  import BaseContactPicker from 'cozy-ui-plus/dist/ContactPicker';
@@ -5,6 +5,7 @@ import cx from 'classnames';
5
5
  import PropTypes from 'prop-types';
6
6
  import React, { useState } from 'react';
7
7
  import { useNavigate } from 'react-router-dom';
8
+ import { useI18n } from 'twake-i18n';
8
9
  import { useClient } from 'cozy-client';
9
10
  import { Account } from 'cozy-doctypes';
10
11
  import { useVaultClient, useVaultUnlockContext } from 'cozy-keys-lib';
@@ -21,8 +22,7 @@ import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
21
22
  import NavigationList, { NavigationListSection, NavigationListHeader } from 'cozy-ui/transpiled/react/NavigationList';
22
23
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
23
24
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
24
- import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
25
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'; // @ts-ignore peerDep
25
+ import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'; // @ts-ignore peerDep
26
26
 
27
27
  import { ContractsForAccount } from './Contracts';
28
28
  import { deleteAccount } from '../../../connections/accounts';
@@ -1,9 +1,9 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React, { memo } from 'react';
3
+ import { translate } from 'twake-i18n';
3
4
  import { withClient } from 'cozy-client';
4
5
  import Button from 'cozy-ui/transpiled/react/Buttons';
5
6
  import OpenwithIcon from 'cozy-ui/transpiled/react/Icons/Openwith';
6
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
7
7
  import AppLinker from 'cozy-ui-plus/dist/AppLinker';
8
8
  import useAppLinkWithStoreFallback from '../../hooks/useAppLinkWithStoreFallback';
9
9
  var DriveLink = /*#__PURE__*/memo(function (_ref) {
@@ -13,10 +13,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  import get from 'lodash/get';
14
14
  import PropTypes from 'prop-types';
15
15
  import React, { Component } from 'react';
16
+ import { translate } from 'twake-i18n';
16
17
  import Button from 'cozy-ui/transpiled/react/Buttons';
17
18
  import DialogContent from 'cozy-ui/transpiled/react/DialogContent';
18
19
  import Typography from 'cozy-ui/transpiled/react/Typography';
19
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
20
20
  import BanksLink from './KonnectorConfiguration/Success/BanksLink';
21
21
  import DriveLink from './KonnectorConfiguration/Success/DriveLink';
22
22
  import Markdown from './Markdown';
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
+ import { translate } from 'twake-i18n';
3
4
  import Typography from 'cozy-ui/transpiled/react/Typography';
4
5
  import CompositeRow from 'cozy-ui/transpiled/react/deprecated/CompositeRow';
5
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
6
6
 
7
7
  var activityIcon = function activityIcon(props) {
8
8
  return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("g", {
@@ -9,11 +9,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
9
9
 
10
10
  import PropTypes from 'prop-types';
11
11
  import React, { useState } from 'react';
12
+ import { useI18n } from 'twake-i18n';
12
13
  import { generateWebLink, useClient } from 'cozy-client';
13
14
  import Button from 'cozy-ui/transpiled/react/Buttons';
14
15
  import { IllustrationDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
15
16
  import Typography from 'cozy-ui/transpiled/react/Typography';
16
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
17
17
  import AppLinker from 'cozy-ui-plus/dist/AppLinker';
18
18
  import CozyTheme from 'cozy-ui-plus/dist/providers/CozyTheme';
19
19
  import DataTypes from './DataTypes';
@@ -1,10 +1,10 @@
1
1
  import cx from 'classnames';
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
+ import { translate } from 'twake-i18n';
4
5
  import Stack from 'cozy-ui/transpiled/react/Stack';
5
6
  import Typography from 'cozy-ui/transpiled/react/Typography';
6
7
  import withBreakpoints from 'cozy-ui/transpiled/react/helpers/withBreakpoints';
7
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
8
8
  import MaintenanceIcon from './MaintenanceIcon';
9
9
 
10
10
  var MaintenanceHeader = function MaintenanceHeader(_ref) {
@@ -1,9 +1,9 @@
1
1
  import get from 'lodash/get';
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
+ import { translate } from 'twake-i18n';
4
5
  import Stack from 'cozy-ui/transpiled/react/Stack';
5
6
  import Typography from 'cozy-ui/transpiled/react/Typography';
6
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
7
7
  import MaintenanceHeader from './MaintenanceHeader';
8
8
  import TriggerMaintenanceDescription from '../infos/TriggerMaintenanceDescription';
9
9
 
@@ -2,7 +2,7 @@ import KonnectorMaintenance from 'components/Maintenance';
2
2
  import { mount } from 'enzyme';
3
3
  import enLocale from 'locales/en.json';
4
4
  import React from 'react';
5
- import I18n from 'cozy-ui/transpiled/react/providers/I18n';
5
+ import I18n from 'twake-i18n';
6
6
  describe('KonnectorMaintenance', function () {
7
7
  it('should match the snapshot', function () {
8
8
  var component = mount( /*#__PURE__*/React.createElement(I18n, {
@@ -3,12 +3,12 @@ import cx from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
4
  import React from 'react';
5
5
  import { useNavigate } from 'react-router-dom';
6
+ import { useI18n } from 'twake-i18n';
6
7
  import { triggers as triggersModel } from 'cozy-client/dist/models/trigger';
7
8
  import { DialogTitle } from 'cozy-ui/transpiled/react/Dialog';
8
9
  import DialogContent from 'cozy-ui/transpiled/react/DialogContent';
9
10
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
10
11
  import Typography from 'cozy-ui/transpiled/react/Typography';
11
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
12
12
  import { useDialogContext } from './DialogContext';
13
13
  import KonnectorIcon from './KonnectorIcon';
14
14
  import KonnectorModalHeader from './KonnectorModalHeader';
@@ -13,10 +13,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  // @ts-check
14
14
  import PropTypes from 'prop-types';
15
15
  import React, { PureComponent } from 'react';
16
+ import { translate } from 'twake-i18n';
16
17
  import { withClient } from 'cozy-client';
17
18
  import { isFlagshipApp } from 'cozy-device-helper';
18
19
  import CozyRealtime from 'cozy-realtime';
19
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
20
20
  import InAppBrowser from './InAppBrowser';
21
21
  import Popup from './Popup';
22
22
  import { prepareOAuth, checkOAuthData, terminateOAuth, OAUTH_REALTIME_CHANNEL } from '../helpers/oauth'; // TODO use PopUp from cozy-ui
@@ -1,8 +1,8 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useNavigate } from 'react-router-dom';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import { triggers as triggersModel } from 'cozy-client/dist/models/trigger';
4
5
  import Button from 'cozy-ui/transpiled/react/Buttons';
5
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
6
6
 
7
7
  var RedirectToAccountFormButton = function RedirectToAccountFormButton(_ref) {
8
8
  var trigger = _ref.trigger;
@@ -4,9 +4,9 @@ var _excluded = ["onLaunch", "onSuccess", "onLoginSuccess", "onError", "initialT
4
4
  _excluded2 = ["vaultUnlockFormProps"];
5
5
  import compose from 'lodash/flowRight';
6
6
  import React from 'react';
7
+ import { translate } from 'twake-i18n';
7
8
  import { withClient } from 'cozy-client';
8
9
  import { useVaultClient, withVaultUnlockContext, VaultUnlockPlaceholder } from 'cozy-keys-lib';
9
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
10
10
  import { DumbTriggerManager } from './DumbTriggerManager';
11
11
  import FlowProvider from './FlowProvider';
12
12
  import HarvestWrapper from './HarvestWrapper';
@@ -12,11 +12,11 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
12
12
  import compose from 'lodash/flowRight';
13
13
  import PropTypes from 'prop-types';
14
14
  import React, { PureComponent } from 'react';
15
+ import { translate } from 'twake-i18n';
15
16
  import Button from 'cozy-ui/transpiled/react/Buttons';
16
17
  import { IllustrationDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
17
18
  import Typography from 'cozy-ui/transpiled/react/Typography';
18
19
  import withBreakpoints from 'cozy-ui/transpiled/react/helpers/withBreakpoints';
19
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
20
20
  import Field from 'cozy-ui-plus/dist/Field';
21
21
  import KonnectorIcon from './KonnectorIcon';
22
22
  import withLocales from './hoc/withLocales';
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
+ import { useI18n } from 'twake-i18n';
4
5
  import { useClient } from 'cozy-client';
5
6
  import Button from 'cozy-ui/transpiled/react/Buttons';
6
7
  import Card from 'cozy-ui/transpiled/react/Card';
@@ -10,7 +11,6 @@ import Stack from 'cozy-ui/transpiled/react/Stack';
10
11
  import Typography from 'cozy-ui/transpiled/react/Typography';
11
12
  import palette from 'cozy-ui/transpiled/react/palette';
12
13
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
13
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
14
14
  import AppIcon from 'cozy-ui-plus/dist/AppIcon';
15
15
  import AppLinker from 'cozy-ui-plus/dist/AppLinker';
16
16
  import { useIntentProviderData } from '../Providers/IntentProvider';
@@ -3,6 +3,7 @@
3
3
  /* eslint-disable @typescript-eslint/no-unsafe-assignment */
4
4
  import cx from 'classnames';
5
5
  import React from 'react';
6
+ import { useI18n } from 'twake-i18n';
6
7
  import { useClient, generateWebLink } from 'cozy-client';
7
8
  import Card from 'cozy-ui/transpiled/react/Card';
8
9
  import Divider from 'cozy-ui/transpiled/react/Divider';
@@ -14,7 +15,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem';
14
15
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
15
16
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
16
17
  import Typography from 'cozy-ui/transpiled/react/Typography';
17
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
18
18
  import { getErrorMessage } from '../../helpers/getErrorMessage';
19
19
  import logger from '../../logger';
20
20
 
@@ -1,9 +1,9 @@
1
1
  // @ts-check on
2
2
  import React from 'react';
3
3
  import { useNavigate } from 'react-router-dom';
4
+ import { useI18n } from 'twake-i18n';
4
5
  import { triggers as triggersModel } from 'cozy-client/dist/models/trigger';
5
6
  import Button from 'cozy-ui/transpiled/react/Buttons';
6
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
7
7
  import { isDisconnected } from '../../helpers/konnectors';
8
8
  import { findKonnectorPolicy } from '../../konnector-policies';
9
9
  import OpenOAuthWindowButton from '../AccountModalWithoutTabs/OpenOAuthWindowButton';
@@ -7,8 +7,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
 
8
8
  import PropTypes from 'prop-types';
9
9
  import React from 'react';
10
+ import { translate } from 'twake-i18n';
10
11
  import Card from 'cozy-ui/transpiled/react/Card';
11
- import { translate } from 'cozy-ui/transpiled/react/providers/I18n';
12
12
  import LaunchTriggerAlert from './LaunchTriggerAlert';
13
13
  import { intentsApiProptype } from '../../helpers/proptypes';
14
14
  import FlowProvider from '../FlowProvider';
@@ -1,12 +1,12 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useState } from 'react';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import { isFlagshipApp } from 'cozy-device-helper';
4
5
  import Alert from 'cozy-ui/transpiled/react/Alert';
5
6
  import AlertTitle from 'cozy-ui/transpiled/react/AlertTitle';
6
7
  import Button from 'cozy-ui/transpiled/react/Buttons';
7
8
  import Icon from 'cozy-ui/transpiled/react/Icon';
8
9
  import ArrowUp from 'cozy-ui/transpiled/react/Icons/ArrowUp';
9
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
10
10
  export var RunningAlert = function RunningAlert() {
11
11
  var _useI18n = useI18n(),
12
12
  t = _useI18n.t;
@@ -11,7 +11,7 @@ jest.mock('cozy-device-helper', () => ({
11
11
  }))
12
12
 
13
13
  // Mock the translation hook with distinct strings
14
- jest.mock('cozy-ui/transpiled/react/providers/I18n', () => ({
14
+ jest.mock('twake-i18n', () => ({
15
15
  useI18n: (): {
16
16
  t: jest.Mock
17
17
  } => ({ t: jest.fn().mockImplementation(key => key as string) })
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
2
+ import { useI18n } from 'twake-i18n';
3
3
  import { ErrorAlert } from './ErrorAlert';
4
4
  import { MaintenanceAlert } from './MaintenanceAlert';
5
5
  import { RunnableAlert } from './RunnableAlert';
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import Icon from 'cozy-ui/transpiled/react/Icon';
4
5
  import InfoIcon from 'cozy-ui/transpiled/react/Icons/Info';
5
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
6
6
  import { TriggerAlertTemplate } from './TriggerAlertTemplate';
7
7
  /**
8
8
  * This component warns the user that the connector is not executable on their device.
@@ -1,12 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import { triggers as triggersModel } from 'cozy-client/dist/models/trigger';
4
5
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
5
6
  import Icon from 'cozy-ui/transpiled/react/Icon';
6
7
  import GearIcon from 'cozy-ui/transpiled/react/Icons/Gear';
7
8
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
8
9
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
9
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
10
10
 
11
11
  var configureAction = function configureAction(_ref) {
12
12
  var isDisconnected = _ref.isDisconnected,
@@ -1,11 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
5
  import Icon from 'cozy-ui/transpiled/react/Icon';
5
6
  import GearIcon from 'cozy-ui/transpiled/react/Icons/Gear';
6
7
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
8
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
9
9
 
10
10
  var connectAction = function connectAction(_ref) {
11
11
  var isDisconnected = _ref.isDisconnected,
@@ -1,12 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
+ import { useI18n } from 'twake-i18n';
3
4
  import { triggers as triggersModel } from 'cozy-client/dist/models/trigger';
4
5
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
5
6
  import Icon from 'cozy-ui/transpiled/react/Icon';
6
7
  import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync';
7
8
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
8
9
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
9
- import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
10
10
  import { findKonnectorPolicy } from '../../../konnector-policies';
11
11
  import OpenOAuthWindowButton from '../../AccountModalWithoutTabs/OpenOAuthWindowButton';
12
12
 
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- import { formatLocallyDistanceToNow } from 'cozy-ui/transpiled/react/providers/I18n/format';
2
+ import { formatLocallyDistanceToNow } from 'twake-i18n';
3
3
  import { isDisconnected } from '../../helpers/konnectors';
4
4
  import { getLastSuccessDate } from '../../helpers/triggers';
5
5
  var DEFAULT_TIME = 300000; // To milliseconds (5 minutes)