Stabilize translation API in the new frontend system
Remove @alpha tags from translation-related types and switch all translation API imports in new frontend system packages to use stable paths from @backstage/frontend-plugin-api instead of @backstage/core-plugin-api/alpha. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createTranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { createTranslationRef } from '@backstage/frontend-plugin-api';
|
||||
import { MockTranslationApi } from './MockTranslationApi';
|
||||
|
||||
describe('MockTranslationApi', () => {
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
TranslationApi,
|
||||
TranslationRef,
|
||||
TranslationSnapshot,
|
||||
} from '@backstage/core-plugin-api/alpha';
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { createInstance as createI18n, type i18n as I18n } from 'i18next';
|
||||
import ObservableImpl from 'zen-observable';
|
||||
|
||||
@@ -32,7 +32,7 @@ import { JsxInterpolator } from '../../../../core-app-api/src/apis/implementatio
|
||||
const DEFAULT_LANGUAGE = 'en';
|
||||
|
||||
/**
|
||||
* Mock implementation of {@link @backstage/core-plugin-api/alpha#TranslationApi}.
|
||||
* Mock implementation of {@link @backstage/frontend-plugin-api#TranslationApi}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -201,7 +201,7 @@ export namespace mockApis {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake implementation of {@link @backstage/core-plugin-api/alpha#TranslationApi}.
|
||||
* Fake implementation of {@link @backstage/frontend-plugin-api#TranslationApi}.
|
||||
* By default returns the default translation.
|
||||
*
|
||||
* @public
|
||||
@@ -216,14 +216,14 @@ export namespace mockApis {
|
||||
}
|
||||
|
||||
/**
|
||||
* Mock helpers for {@link @backstage/core-plugin-api/alpha#TranslationApi}.
|
||||
* Mock helpers for {@link @backstage/frontend-plugin-api#TranslationApi}.
|
||||
*
|
||||
* @see {@link @backstage/frontend-plugin-api#mockApis.translation}
|
||||
* @public
|
||||
*/
|
||||
export namespace translation {
|
||||
/**
|
||||
* Creates a mock of {@link @backstage/core-plugin-api/alpha#TranslationApi}.
|
||||
* Creates a mock of {@link @backstage/frontend-plugin-api#TranslationApi}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user