Skip to content

Commit

Permalink
chore(all): remove babel step to inject id to formatted messages and …
Browse files Browse the repository at this point in the history
…use eslint instead for compatibility with build tools (#4388)

* chore(all): remove babel step to inject id to formatted messages and use eslint instead for compatibility with build tools

* Fix package json

* Fix snapshots

* fix e2e test

* Fix e2e tests
  • Loading branch information
hartra344 committed Mar 19, 2024
1 parent b218871 commit f09f078
Show file tree
Hide file tree
Showing 303 changed files with 2,963 additions and 890 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
"disallowTypeAnnotations": true
}
],
"formatjs/enforce-id": [
"error",
{
"idInterpolationPattern": "[sha512:contenthash:base64:6]"
}
],
"formatjs/enforce-placeholders": [
"error",
{
Expand All @@ -90,7 +96,6 @@
"formatjs/enforce-description": ["error", "literal"],
"formatjs/no-multiple-whitespaces": [1],
"formatjs/no-multiple-plurals": ["error"],
"formatjs/no-id": ["error"],
"formatjs/no-complex-selectors": [
"error",
{
Expand Down
52 changes: 26 additions & 26 deletions Localize/lang/strings.json

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions apps/data-mapper-standalone/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ export default {
'babel-jest',
{
presets: ['@nrwl/react/babel'],
plugins: [
[
'formatjs',
{
idInterpolationPattern: '[sha512:contenthash:base64:6]',
ast: true,
},
],
],
},
],
},
Expand Down
9 changes: 0 additions & 9 deletions apps/designer-standalone/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ export default {
'babel-jest',
{
presets: ['@nrwl/react/babel'],
plugins: [
[
'formatjs',
{
idInterpolationPattern: '[sha512:contenthash:base64:6]',
ast: true,
},
],
],
},
],
},
Expand Down
9 changes: 0 additions & 9 deletions apps/vs-code-react/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ export default {
'babel-jest',
{
presets: ['@nrwl/react/babel'],
plugins: [
[
'formatjs',
{
idInterpolationPattern: '[sha512:contenthash:base64:6]',
ast: true,
},
],
],
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const SearchableDropdown: React.FC<ISearchableDropdownProps> = (props) =>
const intlText = {
SEARCH_OPTIONS: intl.formatMessage({
defaultMessage: 'Search options',
id: 'R7LyKb',
description: 'Search options description',
}),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,22 @@ export const DesignerCommandBar: React.FC<DesignerCommandBarProps> = ({ isRefres
const Resources = {
DESIGNER_SAVE: intl.formatMessage({
defaultMessage: 'Save',
id: 'ZvAp7m',
description: 'Button text for save',
}),
DESIGNER_PARAMETERS: intl.formatMessage({
defaultMessage: 'Parameters',
id: '+0ua83',
description: 'Button text for parameters',
}),
MONITORING_VIEW_REFRESH: intl.formatMessage({
defaultMessage: 'Refresh',
id: 'pr9GwA',
description: 'Button text for refresh',
}),
MONITORING_VIEW_RESUBMIT: intl.formatMessage({
defaultMessage: 'Resubmit',
id: 'sOnphB',
description: 'Button text for resubmit',
}),
};
Expand Down
2 changes: 2 additions & 0 deletions apps/vs-code-react/src/app/designer/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ export const DesignerApp = () => {
const intlText = {
ERROR_APP: intl.formatMessage({
defaultMessage: 'Something went wrong',
id: 'XtVOMn',
description: 'Something went wrong text',
}),
LOADING_APP: intl.formatMessage({
defaultMessage: 'Loading designer',
id: 'fZJWBR',
description: 'Loading designer text',
}),
};
Expand Down
1 change: 1 addition & 0 deletions apps/vs-code-react/src/app/export/export.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const ExportApp: React.FC = () => {
const intlText = {
EXPORT_LOGIC_APP: intl.formatMessage({
defaultMessage: 'Export logic app',
id: 'UKKffr',
description: 'Export logic app text',
}),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,62 @@ export const InstanceSelection: React.FC = () => {
const intlText = {
DIVIDER_REGIONS: intl.formatMessage({
defaultMessage: 'Regions',
id: 'w+aIAc',
description: 'Divider title for azure regions',
}),
DIVIDER_ISE: intl.formatMessage({
defaultMessage: 'Integration service environments',
id: 'BbQXF+',
description: 'Divider title for ISE',
}),
SELECT_TITLE: intl.formatMessage({
defaultMessage: 'Select logic app instance',
id: 'aIgACb',
description: 'Select logic app instance title',
}),
SELECT_DESCRIPTION: intl.formatMessage({
defaultMessage: 'Select the logic apps that you want to export and combine into a single logic app instance.',
id: 'rQtQpJ',
description: 'Select apps to export description',
}),
SELECTION_SUBSCRIPTION: intl.formatMessage({
defaultMessage: 'Select a subscription',
id: '4fP2Ko',
description: 'Select a subscription',
}),
SELECTION_LOCATION: intl.formatMessage({
defaultMessage: 'Select a region or an integration service environment (ISE) instance',
id: 'e7LAHT',
description: 'Select a region or an ISE instance',
}),
SELECT_OPTION: intl.formatMessage({
defaultMessage: 'Select an option',
id: '//Icb/',
description: 'Select an option placeholder',
}),
EMPTY_SUBSCRIPTION: intl.formatMessage({
defaultMessage: 'No subscriptions available',
id: 'bUIrND',
description: 'No subscriptions available',
}),
EMPTY_LOCATION: intl.formatMessage({
defaultMessage: 'No regions and integration service environment (ISE) instances available',
id: 'xxZDTu',
description: 'No regions and ISE instances available text',
}),
SEARCH_SUBSCRIPTION: intl.formatMessage({
defaultMessage: 'Find and select subscription',
id: 'bGPcRT',
description: 'Find and select subscription text',
}),
SEARCH_LOCATION: intl.formatMessage({
defaultMessage: 'Find and select region or integration service environment (ISE)',
id: 'gBRTE5',
description: 'Find region or ISE text',
}),
LOADING: intl.formatMessage({
defaultMessage: 'Loading...',
id: '2EZWf6',
description: 'Loading text',
}),
};
Expand Down
5 changes: 5 additions & 0 deletions apps/vs-code-react/src/app/export/navigation/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,27 @@ export const Navigation: React.FC = () => {
const intlText = {
NEXT: intl.formatMessage({
defaultMessage: 'Next',
id: '3Wcqsy',
description: 'Next button',
}),
BACK: intl.formatMessage({
defaultMessage: 'Back',
id: '2XH9oW',
description: 'Back button',
}),
EXPORT: intl.formatMessage({
defaultMessage: 'Export',
id: 'wPzyvX',
description: 'Export button',
}),
EXPORT_WITH_WARNINGS: intl.formatMessage({
defaultMessage: 'Export with warnings',
id: 'pK0Ir8',
description: 'Export with warnings button',
}),
FINISH: intl.formatMessage({
defaultMessage: 'finish',
id: 'mlxD6R',
description: 'Finish button',
}),
};
Expand Down
2 changes: 2 additions & 0 deletions apps/vs-code-react/src/app/export/status/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const Status: React.FC = () => {
const intlText = {
EXPORT_STATUS_TITLE: intl.formatMessage({
defaultMessage: 'Export status',
id: '3rpbrs',
description: 'Export status title',
}),
};
Expand Down Expand Up @@ -56,6 +57,7 @@ const FinalStatusGadget: React.FC<FinalStatusGadgetProps> = ({ finalStatus }) =>
const exportNextStepsPath = intl.formatMessage(
{
defaultMessage: 'For next steps, review the {path} file.',
id: 's78iEA',
description: 'Message for next steps after export',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,27 @@ export const ManagedConnections: React.FC = () => {
const intlText = {
DEPLOY_MANAGED_CONNECTIONS: intl.formatMessage({
defaultMessage: 'Deploy managed connections',
id: 'tyEqTO',
description: 'Deploy managed connections text',
}),
MANAGED_CONNECTIONS: intl.formatMessage({
defaultMessage: 'Deploy managed connections (recommended only for preproduction environments)',
id: 'UHWTjU',
description: 'Deploy managed connections warning text',
}),
SELECT_OPTION: intl.formatMessage({
defaultMessage: 'Select an option',
id: '//Icb/',
description: 'Select an option placeholder',
}),
RESOURCE_GROUP: intl.formatMessage({
defaultMessage: 'Resource group',
id: 'UKCoay',
description: 'Resource group title',
}),
SEARCH_RESOURCE_GROUP: intl.formatMessage({
defaultMessage: 'Find and select resource group',
id: 'xJv0H1',
description: 'Find and select resource group text',
}),
};
Expand Down
11 changes: 10 additions & 1 deletion apps/vs-code-react/src/app/export/summary/newResourceGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,47 @@ export const NewResourceGroup: React.FC<INewResourceGroupProps> = ({ onAddNewRes
const intlText = {
CREATE_NEW: intl.formatMessage({
defaultMessage: 'Create new',
id: 'XKQ/Lw',
description: 'Create new text',
}),
RESOURCE_GROUP_DESCRIPTION: intl.formatMessage({
defaultMessage: 'A resource group is a container that holds related resources for an Azure solution.',
id: 'fU98Nt',
description: 'Deploy managed connections warning text',
}),
OK: intl.formatMessage({
defaultMessage: 'OK',
id: '70cHmm',
description: 'OK button',
}),
CANCEL: intl.formatMessage({
defaultMessage: 'Cancel',
id: 'qz9XeG',
description: 'Cancel button',
}),
NAME: intl.formatMessage({
defaultMessage: 'Name',
id: '1kGBdP',
description: 'Name button',
}),
INVALID_CHARS: intl.formatMessage({
defaultMessage: 'The name can contain only alphanumeric characters or the following symbols: . _ - ( )',
id: '9vOq5B',
description: 'RResource group name - invalid characters error',
}),
INVALID_ENDING_CHAR: intl.formatMessage({
defaultMessage: "The name can't end with a period.",
defaultMessage: `The name can't end with a period.`,
id: 'Pe0eMX',
description: 'Resource group name ending error',
}),
INVALID_EXISTING_NAME: intl.formatMessage({
defaultMessage: 'A resource group with the same name already exists in the selected subscription.',
id: 'KtGlzI',
description: 'Resource group existing name error',
}),
NEW: intl.formatMessage({
defaultMessage: 'New',
id: 'm3H+gL',
description: 'New text',
}),
};
Expand Down
11 changes: 9 additions & 2 deletions apps/vs-code-react/src/app/export/summary/summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,42 @@ export const Summary: React.FC = () => {
const intlText = {
COMPLETE_EXPORT_TITLE: intl.formatMessage({
defaultMessage: 'Finish export',
id: 'K7KJ+a',
description: 'Finish export title',
}),
SELECT_LOCATION: intl.formatMessage({
defaultMessage: 'Select a destination to export your logic apps',
id: 'LzXRBP',
description: 'Select a location description',
}),
OPEN_FILE_EXPLORER: intl.formatMessage({
defaultMessage: 'Browse',
id: 'GIoHnS',
description: 'Browse with file explorer text',
}),
EXPORT_LOCATION: intl.formatMessage({
defaultMessage: 'Export location',
id: 'POHdG+',
description: 'Export location text',
}),
NO_DETAILS: intl.formatMessage({
defaultMessage: 'No more details',
id: 'eSQI+e',
description: 'No more details text',
}),
AFTER_EXPORT: intl.formatMessage({
defaultMessage: 'After export steps',
id: 'uWEWvx',
description: 'After export steps title',
}),
ADDITIONAL_STEPS: intl.formatMessage({
defaultMessage:
"After export, the following workflows require more steps to reestablish connections. You can find these steps in the following list or by reviewing the README file that's exported with the package.",
defaultMessage: `After export, the following workflows require more steps to reestablish connections. You can find these steps in the following list or by reviewing the README file that's exported with the package.`,
id: 'AlO/m6',
description: 'Post export required steps text',
}),
PACKAGE_WARNING: intl.formatMessage({
defaultMessage: 'The export package URL experienced an unknown problem.',
id: 'YvBfGx',
description: 'Package warning text',
}),
};
Expand Down
6 changes: 4 additions & 2 deletions apps/vs-code-react/src/app/export/validation/validation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ export const Validation: React.FC = () => {
const intlText = {
WORKFLOW_GROUP_DISPLAY_NAME: intl.formatMessage({
defaultMessage: 'Workflow',
id: '42jhB0',
description: 'Review export status title',
}),
REVIEW_TITLE: intl.formatMessage({
defaultMessage: 'Review export status',
id: 'Z1yTm5',
description: 'Review export status title',
}),
REVIEW_DESCRIPTION: intl.formatMessage({
defaultMessage:
"This section shows the export status for elements in your selected logic apps. For example, some parameters types aren't supported, and some connections might not successfully export. For guidance to resolve these issues, review the following steps.",
defaultMessage: `This section shows the export status for elements in your selected logic apps. For example, some parameters types aren't supported, and some connections might not successfully export. For guidance to resolve these issues, review the following steps.`,
id: 'bv6P+5',
description: 'Review export description',
}),
};
Expand Down

0 comments on commit f09f078

Please sign in to comment.