From 00d016c8046f9cb8afc1e7c2581c7b8d4502bf9e Mon Sep 17 00:00:00 2001 From: Alexei Karikov Date: Fri, 17 Mar 2023 21:42:26 +0600 Subject: [PATCH 1/6] Changes related to i18n configs Signed-off-by: Alexei Karikov --- src/dev/i18n/integrate_locale_files.ts | 2 +- src/dev/i18n/utils/verify_icu_message.ts | 24 ++++++++++-------- src/dev/run_i18n_check.ts | 23 ++++++++++++------ src/dev/run_i18n_extract.ts | 10 ++++---- src/dev/run_i18n_integrate.ts | 31 +++++++++++++----------- 5 files changed, 52 insertions(+), 38 deletions(-) diff --git a/src/dev/i18n/integrate_locale_files.ts b/src/dev/i18n/integrate_locale_files.ts index 2a362214d6d8..0f3a74a82faa 100644 --- a/src/dev/i18n/integrate_locale_files.ts +++ b/src/dev/i18n/integrate_locale_files.ts @@ -106,7 +106,7 @@ export function verifyMessages( typeof message === 'string' ? message : message.text, messageId ); - } catch (err) { + } catch (err: any) { if (options.ignoreIncompatible) { localizedMessagesMap.delete(messageId); options.log.warning(`Incompatible translation ignored: ${err.message}`); diff --git a/src/dev/i18n/utils/verify_icu_message.ts b/src/dev/i18n/utils/verify_icu_message.ts index 0470cac4ea1f..94f0d8ca4664 100644 --- a/src/dev/i18n/utils/verify_icu_message.ts +++ b/src/dev/i18n/utils/verify_icu_message.ts @@ -70,16 +70,20 @@ export function verifyICUMessage(message: string) { verifySelectFormatNode(node.format); } } - } catch (error) { - if (error.name === 'SyntaxError') { - const errorWithContext = createParserErrorMessage(message, { - loc: { - line: error.location.start.line, - column: error.location.start.column - 1, - }, - message: error.message, - }); - throw errorWithContext; + } catch (error: unknown) { + if (error instanceof Error) { + if (error instanceof parser.SyntaxError) { + if (error.name === 'SyntaxError') { + const errorWithContext = createParserErrorMessage(message, { + loc: { + line: error.location.start.line, + column: error.location.start.column - 1, + }, + message: error.message, + }); + throw errorWithContext; + } + } } } } diff --git a/src/dev/run_i18n_check.ts b/src/dev/run_i18n_check.ts index fb0d9d3a3f01..d3f06fddd1b2 100644 --- a/src/dev/run_i18n_check.ts +++ b/src/dev/run_i18n_check.ts @@ -41,9 +41,14 @@ import { mergeConfigs, } from './i18n/tasks'; -const skipOnNoTranslations = ({ config }: { config: I18nConfig }) => - !config.translations.length && 'No translations found.'; +export interface ListrContext { + config?: I18nConfig; + reporter: ErrorReporter; + messages: Map; +} +const skipOnNoTranslations = (context: ListrContext) => + !context.config?.translations?.length && 'No translations found.'; run( async ({ flags: { @@ -105,16 +110,17 @@ run( { title: 'Validating Default Messages', skip: skipOnNoTranslations, - task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), + task: ({ config }) => { + return new Listr(extractDefaultMessages(config!, srcPaths), { exitOnError: true }); + }, }, { title: 'Compatibility Checks', skip: skipOnNoTranslations, - task: ({ config }) => + task: ({ config }) => { new Listr( checkCompatibility( - config, + config!, { ignoreMalformed: !!ignoreMalformed, ignoreIncompatible: !!ignoreIncompatible, @@ -125,7 +131,8 @@ run( log ), { exitOnError: true } - ), + ); + }, }, ], { @@ -138,7 +145,7 @@ run( const reporter = new ErrorReporter(); const messages: Map = new Map(); await list.run({ messages, reporter }); - } catch (error) { + } catch (error: ErrorReporter | Error) { process.exitCode = 1; if (error instanceof ErrorReporter) { error.errors.forEach((e: string | Error) => log.error(e)); diff --git a/src/dev/run_i18n_extract.ts b/src/dev/run_i18n_extract.ts index 28c49c3ab868..86a2c844dc7d 100644 --- a/src/dev/run_i18n_extract.ts +++ b/src/dev/run_i18n_extract.ts @@ -35,7 +35,7 @@ import { resolve } from 'path'; import { createFailError, run } from '@osd/dev-utils'; import { ErrorReporter, serializeToJson, serializeToJson5, writeFileAsync } from './i18n'; import { extractDefaultMessages, mergeConfigs } from './i18n/tasks'; - +import { ListrContext } from './run_i18n_check'; run( async ({ flags: { @@ -59,7 +59,7 @@ run( } const srcPaths = Array().concat(path || ['./src', './packages']); - const list = new Listr([ + const list = new Listr([ { title: 'Merging .i18nrc.json files', task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), @@ -67,11 +67,11 @@ run( { title: 'Extracting Default Messages', task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), + new Listr(extractDefaultMessages(config!, srcPaths), { exitOnError: true }), }, { title: 'Writing to file', - enabled: (ctx) => outputDir && ctx.messages.size, + enabled: (ctx) => Boolean(outputDir && ctx.messages.size), task: async (ctx) => { const sortedMessages = [...ctx.messages].sort(([key1], [key2]) => key1.localeCompare(key2) @@ -90,7 +90,7 @@ run( const reporter = new ErrorReporter(); const messages: Map = new Map(); await list.run({ messages, reporter }); - } catch (error) { + } catch (error: ErrorReporter | Error) { process.exitCode = 1; if (error instanceof ErrorReporter) { error.errors.forEach((e: string | Error) => log.error(e)); diff --git a/src/dev/run_i18n_integrate.ts b/src/dev/run_i18n_integrate.ts index 70c5d82422d2..ffc1fca8e2c0 100644 --- a/src/dev/run_i18n_integrate.ts +++ b/src/dev/run_i18n_integrate.ts @@ -34,6 +34,7 @@ import Listr from 'listr'; import { createFailError, run } from '@osd/dev-utils'; import { ErrorReporter, integrateLocaleFiles } from './i18n'; import { extractDefaultMessages, mergeConfigs } from './i18n/tasks'; +import { ListrContext } from './run_i18n_check'; run( async ({ @@ -90,7 +91,7 @@ run( const srcPaths = Array().concat(path || ['./src', './packages']); - const list = new Listr([ + const list = new Listr([ { title: 'Merging .i18nrc.json files', task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), @@ -98,22 +99,24 @@ run( { title: 'Extracting Default Messages', task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), + new Listr(extractDefaultMessages(config!, srcPaths), { exitOnError: true }), }, { title: 'Integrating Locale File', task: async ({ messages, config }) => { - await integrateLocaleFiles(messages, { - sourceFileName: source, - targetFileName: target, - dryRun, - ignoreIncompatible, - ignoreUnused, - ignoreMissing, - ignoreMalformed, - config, - log, - }); + if (config) { + await integrateLocaleFiles(messages, { + sourceFileName: source, + targetFileName: target, + dryRun, + ignoreIncompatible, + ignoreUnused, + ignoreMissing, + ignoreMalformed, + config, + log, + }); + } }, }, ]); @@ -123,7 +126,7 @@ run( const messages: Map = new Map(); await list.run({ messages, reporter }); process.exitCode = 0; - } catch (error) { + } catch (error: ErrorReporter | Error) { process.exitCode = 1; if (error instanceof ErrorReporter) { error.errors.forEach((e: string | Error) => log.error(e)); From cdda27ba26a5fe2054bfd52d360759f574128733 Mon Sep 17 00:00:00 2001 From: Alexei Karikov Date: Fri, 17 Mar 2023 21:43:49 +0600 Subject: [PATCH 2/6] Changes related to the 'Check i18n configs' task Signed-off-by: Alexei Karikov --- src/dev/i18n/tasks/check_compatibility.ts | 3 +++ src/dev/i18n/tasks/check_configs.ts | 6 +++--- src/dev/i18n/tasks/extract_default_translations.ts | 3 +++ .../i18n/tasks/extract_untracked_translations.ts | 14 ++++++-------- src/dev/i18n/tasks/merge_configs.ts | 6 +++--- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/dev/i18n/tasks/check_compatibility.ts b/src/dev/i18n/tasks/check_compatibility.ts index fed6e00a11de..1ffde4700c49 100644 --- a/src/dev/i18n/tasks/check_compatibility.ts +++ b/src/dev/i18n/tasks/check_compatibility.ts @@ -40,6 +40,9 @@ export interface I18nFlags { } export function checkCompatibility(config: I18nConfig, flags: I18nFlags, log: ToolingLog) { + if (!config) { + throw new Error('Config is missing'); + } const { fix, ignoreIncompatible, ignoreUnused, ignoreMalformed, ignoreMissing } = flags; return config.translations.map((translationsPath) => ({ task: async ({ messages }: { messages: Map }) => { diff --git a/src/dev/i18n/tasks/check_configs.ts b/src/dev/i18n/tasks/check_configs.ts index df57c874f258..d9e7d37f1e1b 100644 --- a/src/dev/i18n/tasks/check_configs.ts +++ b/src/dev/i18n/tasks/check_configs.ts @@ -27,10 +27,10 @@ * specific language governing permissions and limitations * under the License. */ - +import { ListrContext } from 'src/dev/run_i18n_check'; import { resolve, join } from 'path'; import { I18N_RC } from '../constants'; -import { ErrorReporter, checkConfigNamespacePrefix, arrayify } from '..'; +import { checkConfigNamespacePrefix, arrayify } from '..'; export function checkConfigs(additionalConfigPaths: string | string[] = []) { const root = join(__dirname, '../../../../'); @@ -39,7 +39,7 @@ export function checkConfigs(additionalConfigPaths: string | string[] = []) { const configPaths = [opensearchDashboardsRC, ...arrayify(additionalConfigPaths)]; return configPaths.map((configPath) => ({ - task: async (context: { reporter: ErrorReporter }) => { + task: async (context: ListrContext) => { try { await checkConfigNamespacePrefix(configPath); } catch (err) { diff --git a/src/dev/i18n/tasks/extract_default_translations.ts b/src/dev/i18n/tasks/extract_default_translations.ts index 42eda5726eef..580f8231eb81 100644 --- a/src/dev/i18n/tasks/extract_default_translations.ts +++ b/src/dev/i18n/tasks/extract_default_translations.ts @@ -33,6 +33,9 @@ import { createFailError } from '@osd/dev-utils'; import { ErrorReporter, extractMessagesFromPathToMap, filterConfigPaths, I18nConfig } from '..'; export function extractDefaultMessages(config: I18nConfig, inputPaths: string[]) { + if (!config) { + throw new Error('Config is missing'); + } const filteredPaths = filterConfigPaths(inputPaths, config) as string[]; if (filteredPaths.length === 0) { throw createFailError( diff --git a/src/dev/i18n/tasks/extract_untracked_translations.ts b/src/dev/i18n/tasks/extract_untracked_translations.ts index a30e28fa41d3..77575b2f311e 100644 --- a/src/dev/i18n/tasks/extract_untracked_translations.ts +++ b/src/dev/i18n/tasks/extract_untracked_translations.ts @@ -29,13 +29,8 @@ */ import { createFailError } from '@osd/dev-utils'; -import { - I18nConfig, - matchEntriesWithExctractors, - normalizePath, - readFileAsync, - ErrorReporter, -} from '..'; +import { ListrContext } from 'src/dev/run_i18n_check'; +import { I18nConfig, matchEntriesWithExctractors, normalizePath, readFileAsync } from '..'; function filterEntries(entries: string[], exclude: string[]) { return entries.filter((entry: string) => @@ -104,8 +99,11 @@ export async function extractUntrackedMessagesTask({ export function extractUntrackedMessages(inputPaths: string[]) { return inputPaths.map((inputPath) => ({ title: `Checking untracked messages in ${inputPath}`, - task: async (context: { reporter: ErrorReporter; config: I18nConfig }) => { + task: async (context: ListrContext) => { const { reporter, config } = context; + if (!config) { + throw new Error('Config is not defined'); + } const initialErrorsNumber = reporter.errors.length; const result = await extractUntrackedMessagesTask({ path: inputPath, config, reporter }); if (reporter.errors.length === initialErrorsNumber) { diff --git a/src/dev/i18n/tasks/merge_configs.ts b/src/dev/i18n/tasks/merge_configs.ts index 83e94d4da6f6..fe86845205cb 100644 --- a/src/dev/i18n/tasks/merge_configs.ts +++ b/src/dev/i18n/tasks/merge_configs.ts @@ -27,9 +27,9 @@ * specific language governing permissions and limitations * under the License. */ - +import { ListrContext } from 'src/dev/run_i18n_check'; import { resolve, join } from 'path'; -import { ErrorReporter, I18nConfig, assignConfigFromPath, arrayify } from '..'; +import { assignConfigFromPath, arrayify } from '..'; export function mergeConfigs(additionalConfigPaths: string | string[] = []) { const root = join(__dirname, '../../../../'); @@ -38,7 +38,7 @@ export function mergeConfigs(additionalConfigPaths: string | string[] = []) { const configPaths = [opensearchDashboardsRC, ...arrayify(additionalConfigPaths)]; return configPaths.map((configPath) => ({ - task: async (context: { reporter: ErrorReporter; config?: I18nConfig }) => { + task: async (context: ListrContext) => { try { context.config = await assignConfigFromPath(context.config, configPath); } catch (err) { From cc6494b3387f8535fc9c8402df23e529825cc6a2 Mon Sep 17 00:00:00 2001 From: Alexei Karikov Date: Thu, 23 Mar 2023 21:37:11 +0600 Subject: [PATCH 3/6] Corrected the deficiencies Signed-off-by: Alexei Karikov --- src/dev/i18n/tasks/check_compatibility.ts | 6 ++++- .../tasks/extract_default_translations.ts | 2 +- src/dev/i18n/utils/verify_icu_message.ts | 22 ++++++++----------- src/dev/run_i18n_check.ts | 8 +++---- src/dev/run_i18n_integrate.ts | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/dev/i18n/tasks/check_compatibility.ts b/src/dev/i18n/tasks/check_compatibility.ts index 1ffde4700c49..7af9ef5604a9 100644 --- a/src/dev/i18n/tasks/check_compatibility.ts +++ b/src/dev/i18n/tasks/check_compatibility.ts @@ -39,7 +39,11 @@ export interface I18nFlags { ignoreMissing: boolean; } -export function checkCompatibility(config: I18nConfig, flags: I18nFlags, log: ToolingLog) { +export function checkCompatibility( + config: I18nConfig | undefined, + flags: I18nFlags, + log: ToolingLog +) { if (!config) { throw new Error('Config is missing'); } diff --git a/src/dev/i18n/tasks/extract_default_translations.ts b/src/dev/i18n/tasks/extract_default_translations.ts index 580f8231eb81..0955ce884ed9 100644 --- a/src/dev/i18n/tasks/extract_default_translations.ts +++ b/src/dev/i18n/tasks/extract_default_translations.ts @@ -32,7 +32,7 @@ import chalk from 'chalk'; import { createFailError } from '@osd/dev-utils'; import { ErrorReporter, extractMessagesFromPathToMap, filterConfigPaths, I18nConfig } from '..'; -export function extractDefaultMessages(config: I18nConfig, inputPaths: string[]) { +export function extractDefaultMessages(config: I18nConfig | undefined, inputPaths: string[]) { if (!config) { throw new Error('Config is missing'); } diff --git a/src/dev/i18n/utils/verify_icu_message.ts b/src/dev/i18n/utils/verify_icu_message.ts index 94f0d8ca4664..db9180039208 100644 --- a/src/dev/i18n/utils/verify_icu_message.ts +++ b/src/dev/i18n/utils/verify_icu_message.ts @@ -71,19 +71,15 @@ export function verifyICUMessage(message: string) { } } } catch (error: unknown) { - if (error instanceof Error) { - if (error instanceof parser.SyntaxError) { - if (error.name === 'SyntaxError') { - const errorWithContext = createParserErrorMessage(message, { - loc: { - line: error.location.start.line, - column: error.location.start.column - 1, - }, - message: error.message, - }); - throw errorWithContext; - } - } + if (error instanceof parser.SyntaxError && error.name === 'SyntaxError') { + const errorWithContext = createParserErrorMessage(message, { + loc: { + line: error.location.start.line, + column: error.location.start.column - 1, + }, + message: error.message, + }); + throw errorWithContext; } } } diff --git a/src/dev/run_i18n_check.ts b/src/dev/run_i18n_check.ts index d3f06fddd1b2..a0757ea0c162 100644 --- a/src/dev/run_i18n_check.ts +++ b/src/dev/run_i18n_check.ts @@ -90,7 +90,7 @@ run( const srcPaths = Array().concat(path || ['./src', './packages']); - const list = new Listr( + const list = new Listr( [ { title: 'Checking .i18nrc.json files', @@ -111,16 +111,16 @@ run( title: 'Validating Default Messages', skip: skipOnNoTranslations, task: ({ config }) => { - return new Listr(extractDefaultMessages(config!, srcPaths), { exitOnError: true }); + return new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }); }, }, { title: 'Compatibility Checks', skip: skipOnNoTranslations, task: ({ config }) => { - new Listr( + return new Listr( checkCompatibility( - config!, + config, { ignoreMalformed: !!ignoreMalformed, ignoreIncompatible: !!ignoreIncompatible, diff --git a/src/dev/run_i18n_integrate.ts b/src/dev/run_i18n_integrate.ts index ffc1fca8e2c0..00ad1da2ca81 100644 --- a/src/dev/run_i18n_integrate.ts +++ b/src/dev/run_i18n_integrate.ts @@ -99,7 +99,7 @@ run( { title: 'Extracting Default Messages', task: ({ config }) => - new Listr(extractDefaultMessages(config!, srcPaths), { exitOnError: true }), + new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), }, { title: 'Integrating Locale File', From 8b22e9b877da5ad1e2afa8ef53dc282e9800a895 Mon Sep 17 00:00:00 2001 From: Alexei Karikov Date: Thu, 23 Mar 2023 21:57:00 +0600 Subject: [PATCH 4/6] Adding a changelog entry and adding a missing bracket Signed-off-by: Alexei Karikov --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6050246a2c9a..8c997563c055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -145,7 +145,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [MD] Refactor data source error handling ([#2661](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2661)) - Refactor and improve Discover field summaries ([#2391](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2391)) - [Vis Builder] Removed Hard Coded Strings and Used i18n to transalte([#2867](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2867)) -- [Console] Replace jQuery.ajax with core.http when calling OSD APIs in console ([#3080]https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3080)) +- [Console] Replace jQuery.ajax with core.http when calling OSD APIs in console ([#3080](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3080)) +- [I18n] Fix Listr type errors and error handlers ([#3629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3629)) ### 🔩 Tests From 5b68cf63e4c1a3e664198635b2a81e7b490b6736 Mon Sep 17 00:00:00 2001 From: Alexei Karikov Date: Tue, 28 Mar 2023 15:58:08 +0600 Subject: [PATCH 5/6] Added changes to missed commits and also added tasks Listr interface to common source Signed-off-by: Alexei Karikov --- src/dev/i18n/tasks/index.ts | 8 ++++++++ src/dev/run_i18n_check.ts | 9 ++------- src/dev/run_i18n_extract.ts | 6 +++--- src/dev/run_i18n_integrate.ts | 7 ++++--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/dev/i18n/tasks/index.ts b/src/dev/i18n/tasks/index.ts index 53038e7da605..6b9c899b5649 100644 --- a/src/dev/i18n/tasks/index.ts +++ b/src/dev/i18n/tasks/index.ts @@ -28,8 +28,16 @@ * under the License. */ +import { ErrorReporter, I18nConfig } from '..'; + export { extractDefaultMessages } from './extract_default_translations'; export { extractUntrackedMessages } from './extract_untracked_translations'; export { checkCompatibility } from './check_compatibility'; export { mergeConfigs } from './merge_configs'; export { checkConfigs } from './check_configs'; + +export interface ListrContext { + config?: I18nConfig; + reporter: ErrorReporter; + messages: Map; +} diff --git a/src/dev/run_i18n_check.ts b/src/dev/run_i18n_check.ts index a0757ea0c162..17fc397a7bf1 100644 --- a/src/dev/run_i18n_check.ts +++ b/src/dev/run_i18n_check.ts @@ -32,21 +32,16 @@ import chalk from 'chalk'; import Listr from 'listr'; import { createFailError, run } from '@osd/dev-utils'; -import { ErrorReporter, I18nConfig } from './i18n'; +import { ErrorReporter } from './i18n'; import { extractDefaultMessages, extractUntrackedMessages, checkCompatibility, checkConfigs, mergeConfigs, + ListrContext, } from './i18n/tasks'; -export interface ListrContext { - config?: I18nConfig; - reporter: ErrorReporter; - messages: Map; -} - const skipOnNoTranslations = (context: ListrContext) => !context.config?.translations?.length && 'No translations found.'; run( diff --git a/src/dev/run_i18n_extract.ts b/src/dev/run_i18n_extract.ts index 86a2c844dc7d..6de6b0904abb 100644 --- a/src/dev/run_i18n_extract.ts +++ b/src/dev/run_i18n_extract.ts @@ -34,8 +34,8 @@ import { resolve } from 'path'; import { createFailError, run } from '@osd/dev-utils'; import { ErrorReporter, serializeToJson, serializeToJson5, writeFileAsync } from './i18n'; -import { extractDefaultMessages, mergeConfigs } from './i18n/tasks'; -import { ListrContext } from './run_i18n_check'; +import { extractDefaultMessages, mergeConfigs, ListrContext } from './i18n/tasks'; + run( async ({ flags: { @@ -67,7 +67,7 @@ run( { title: 'Extracting Default Messages', task: ({ config }) => - new Listr(extractDefaultMessages(config!, srcPaths), { exitOnError: true }), + new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), }, { title: 'Writing to file', diff --git a/src/dev/run_i18n_integrate.ts b/src/dev/run_i18n_integrate.ts index 00ad1da2ca81..6f0314e757e2 100644 --- a/src/dev/run_i18n_integrate.ts +++ b/src/dev/run_i18n_integrate.ts @@ -33,8 +33,7 @@ import Listr from 'listr'; import { createFailError, run } from '@osd/dev-utils'; import { ErrorReporter, integrateLocaleFiles } from './i18n'; -import { extractDefaultMessages, mergeConfigs } from './i18n/tasks'; -import { ListrContext } from './run_i18n_check'; +import { extractDefaultMessages, mergeConfigs, ListrContext } from './i18n/tasks'; run( async ({ @@ -104,7 +103,9 @@ run( { title: 'Integrating Locale File', task: async ({ messages, config }) => { - if (config) { + if (!config) { + throw new Error('Config is missing'); + } else { await integrateLocaleFiles(messages, { sourceFileName: source, targetFileName: target, From efbcbdb8e688ac38f75c9381bb3b3dd1a336b701 Mon Sep 17 00:00:00 2001 From: Alexei Karikov Date: Tue, 28 Mar 2023 16:11:22 +0600 Subject: [PATCH 6/6] Update imports for other files that using ListrContext interface Signed-off-by: Alexei Karikov --- src/dev/i18n/tasks/check_configs.ts | 2 +- src/dev/i18n/tasks/extract_untracked_translations.ts | 2 +- src/dev/i18n/tasks/merge_configs.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dev/i18n/tasks/check_configs.ts b/src/dev/i18n/tasks/check_configs.ts index d9e7d37f1e1b..2e37a5e00cf0 100644 --- a/src/dev/i18n/tasks/check_configs.ts +++ b/src/dev/i18n/tasks/check_configs.ts @@ -27,8 +27,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ListrContext } from 'src/dev/run_i18n_check'; import { resolve, join } from 'path'; +import { ListrContext } from '.'; import { I18N_RC } from '../constants'; import { checkConfigNamespacePrefix, arrayify } from '..'; diff --git a/src/dev/i18n/tasks/extract_untracked_translations.ts b/src/dev/i18n/tasks/extract_untracked_translations.ts index 77575b2f311e..9c98d22db3f2 100644 --- a/src/dev/i18n/tasks/extract_untracked_translations.ts +++ b/src/dev/i18n/tasks/extract_untracked_translations.ts @@ -29,7 +29,7 @@ */ import { createFailError } from '@osd/dev-utils'; -import { ListrContext } from 'src/dev/run_i18n_check'; +import { ListrContext } from '.'; import { I18nConfig, matchEntriesWithExctractors, normalizePath, readFileAsync } from '..'; function filterEntries(entries: string[], exclude: string[]) { diff --git a/src/dev/i18n/tasks/merge_configs.ts b/src/dev/i18n/tasks/merge_configs.ts index fe86845205cb..79c1fde91e95 100644 --- a/src/dev/i18n/tasks/merge_configs.ts +++ b/src/dev/i18n/tasks/merge_configs.ts @@ -27,8 +27,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ListrContext } from 'src/dev/run_i18n_check'; import { resolve, join } from 'path'; +import { ListrContext } from '.'; import { assignConfigFromPath, arrayify } from '..'; export function mergeConfigs(additionalConfigPaths: string | string[] = []) {