Skip to content

Commit

Permalink
Removing html angular extractor for issue 4018
Browse files Browse the repository at this point in the history
Signed-off-by: Zashary Maskus-Lavin <zashary.maskus-lavin@oracle.com>
  • Loading branch information
zashary committed Aug 23, 2023
1 parent d7c5577 commit 919ff86
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 504 deletions.
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

0 comments on commit 919ff86

Please sign in to comment.