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

Removing html angular extractor for issue 4018 #4680

Merged
merged 1 commit into from
Aug 31, 2023
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### 🛠 Maintenance

- Remove angular html extractor ([#4680](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4680))
- Removes `minimatch` manual resolution ([#3019](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3019))
- Upgrade `vega-lite` dependency from `4.17.0` to `^5.6.0` ([#3076](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3076)). Backwards-compatible version included in v2.5.0 release.
- Bump `js-yaml` from `3.14.0` to `4.1.0` ([#3770](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3770))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 8 additions & 20 deletions src/dev/i18n/extract_default_translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import path from 'path';

import { extractHtmlMessages, extractCodeMessages } from './extractors';
import { extractCodeMessages } from './extractors';
import { globAsync, readFileAsync, normalizePath } from './utils';

import { createFailError, isFailError } from '@osd/dev-utils';
Expand Down Expand Up @@ -81,33 +81,21 @@ export async function matchEntriesWithExctractors(inputPath, options = {}) {
'**/*.d.ts',
].concat(additionalIgnore);

const entries = await globAsync('*.{js,jsx,ts,tsx,html}', {
const entries = await globAsync('*.{js,jsx,ts,tsx}', {
cwd: inputPath,
matchBase: true,
ignore,
mark,
absolute,
});

const { htmlEntries, codeEntries } = entries.reduce(
(paths, entry) => {
const resolvedPath = path.resolve(inputPath, entry);
const codeEntries = entries.reduce((paths, entry) => {
const resolvedPath = path.resolve(inputPath, entry);

if (resolvedPath.endsWith('.html')) {
paths.htmlEntries.push(resolvedPath);
} else {
paths.codeEntries.push(resolvedPath);
}

return paths;
},
{ htmlEntries: [], codeEntries: [] }
);

return [
[htmlEntries, extractHtmlMessages],
[codeEntries, extractCodeMessages],
];
paths.push(resolvedPath);
return paths;
}, []);
return [[codeEntries, extractCodeMessages]];
}

export async function extractMessagesFromPathToMap(inputPath, targetMap, config, reporter) {
Expand Down
77 changes: 0 additions & 77 deletions src/dev/i18n/extractors/__snapshots__/html.test.js.snap

This file was deleted.

Loading
Loading