(npm): export translation files (#5020)
Signed-off-by: Debsmita Santra <debsmita.santra@gmail.com>
This commit is contained in:
parent
496b5ea76f
commit
4d645136fd
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@backstage-community/plugin-npm': patch
|
||||
---
|
||||
|
||||
Export `npmTranslationRef` and `npmTranslations` also in the stable/'old' frontend system build.
|
||||
|
|
@ -8,6 +8,7 @@ import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
|||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { isNpmAvailable } from '@backstage-community/plugin-npm-common';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationResource } from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
// @alpha
|
||||
|
|
@ -38,7 +39,39 @@ export const npmBackendApi: ExtensionDefinition<{
|
|||
};
|
||||
}>;
|
||||
|
||||
// @alpha (undocumented)
|
||||
// @public (undocumented)
|
||||
export const npmTranslationRef: TranslationRef<
|
||||
'plugin.npm.translation-ref',
|
||||
{
|
||||
readonly 'infoCard.title': 'NPM package {{packageName}}';
|
||||
readonly 'infoCard.latestVersion': 'Latest version';
|
||||
readonly 'infoCard.publishedAt': 'Published at';
|
||||
readonly 'infoCard.license': 'License';
|
||||
readonly 'infoCard.description': 'Description';
|
||||
readonly 'infoCard.keywords': 'Keywords';
|
||||
readonly 'infoCard.registryName': 'Registry name';
|
||||
readonly 'infoCard.npmRepository': 'NPM repository';
|
||||
readonly 'infoCard.codeRepository': 'Code repository';
|
||||
readonly 'infoCard.issueTracker': 'Issue tracker';
|
||||
readonly 'infoCard.homepage': 'Homepage';
|
||||
readonly 'releaseOverviewCard.title': 'Current Tags';
|
||||
readonly 'releaseOverviewCard.toolbar.searchPlaceholder': 'Search';
|
||||
readonly 'releaseOverviewCard.columns.tag': 'Tag';
|
||||
readonly 'releaseOverviewCard.columns.version': 'Version';
|
||||
readonly 'releaseOverviewCard.columns.published': 'Published';
|
||||
readonly 'releaseTableCard.title': 'Current Tags';
|
||||
readonly 'releaseTableCard.toolbar.searchPlaceholder': 'Search';
|
||||
readonly 'releaseTableCard.columns.tag': 'Tag';
|
||||
readonly 'releaseTableCard.columns.version': 'Version';
|
||||
readonly 'releaseTableCard.columns.published': 'Published';
|
||||
readonly 'versionHistoryCard.title': 'Version History';
|
||||
readonly 'versionHistoryCard.toolbar.searchPlaceholder': 'Search';
|
||||
readonly 'versionHistoryCard.columns.version': 'Version';
|
||||
readonly 'versionHistoryCard.columns.published': 'Published';
|
||||
}
|
||||
>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const npmTranslations: TranslationResource<'plugin.npm.translation-ref'>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import { BackstagePlugin } from '@backstage/core-plugin-api';
|
|||
import { isNpmAvailable } from '@backstage-community/plugin-npm-common';
|
||||
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationResource } from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
// @public
|
||||
export const EntityNpmInfoCard: () => JSX_2.Element;
|
||||
|
|
@ -36,4 +38,39 @@ export const NpmReleaseOverviewCard: () => JSX_2.Element;
|
|||
|
||||
// @public @deprecated (undocumented)
|
||||
export const NpmReleaseTableCard: () => JSX_2.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const npmTranslationRef: TranslationRef<
|
||||
'plugin.npm.translation-ref',
|
||||
{
|
||||
readonly 'infoCard.title': 'NPM package {{packageName}}';
|
||||
readonly 'infoCard.latestVersion': 'Latest version';
|
||||
readonly 'infoCard.publishedAt': 'Published at';
|
||||
readonly 'infoCard.license': 'License';
|
||||
readonly 'infoCard.description': 'Description';
|
||||
readonly 'infoCard.keywords': 'Keywords';
|
||||
readonly 'infoCard.registryName': 'Registry name';
|
||||
readonly 'infoCard.npmRepository': 'NPM repository';
|
||||
readonly 'infoCard.codeRepository': 'Code repository';
|
||||
readonly 'infoCard.issueTracker': 'Issue tracker';
|
||||
readonly 'infoCard.homepage': 'Homepage';
|
||||
readonly 'releaseOverviewCard.title': 'Current Tags';
|
||||
readonly 'releaseOverviewCard.toolbar.searchPlaceholder': 'Search';
|
||||
readonly 'releaseOverviewCard.columns.tag': 'Tag';
|
||||
readonly 'releaseOverviewCard.columns.version': 'Version';
|
||||
readonly 'releaseOverviewCard.columns.published': 'Published';
|
||||
readonly 'releaseTableCard.title': 'Current Tags';
|
||||
readonly 'releaseTableCard.toolbar.searchPlaceholder': 'Search';
|
||||
readonly 'releaseTableCard.columns.tag': 'Tag';
|
||||
readonly 'releaseTableCard.columns.version': 'Version';
|
||||
readonly 'releaseTableCard.columns.published': 'Published';
|
||||
readonly 'versionHistoryCard.title': 'Version History';
|
||||
readonly 'versionHistoryCard.toolbar.searchPlaceholder': 'Search';
|
||||
readonly 'versionHistoryCard.columns.version': 'Version';
|
||||
readonly 'versionHistoryCard.columns.published': 'Published';
|
||||
}
|
||||
>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const npmTranslations: TranslationResource<'plugin.npm.translation-ref'>;
|
||||
```
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import { isNpmAvailable } from '@backstage-community/plugin-npm-common';
|
|||
|
||||
import { NpmBackendApiRef, NpmBackendClient } from './api';
|
||||
|
||||
export { npmTranslations } from './translations';
|
||||
export { npmTranslationRef, npmTranslations } from './translations';
|
||||
|
||||
export { isNpmAvailable } from '@backstage-community/plugin-npm-common';
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ export const entityNpmReleaseTableCard: any = EntityContentBlueprint.make({
|
|||
* @alpha
|
||||
*/
|
||||
export default createFrontendPlugin({
|
||||
id: 'npm',
|
||||
pluginId: 'npm',
|
||||
extensions: [
|
||||
npmBackendApi,
|
||||
entityNpmReleaseTableCard,
|
||||
|
|
|
|||
|
|
@ -31,3 +31,5 @@ export {
|
|||
NpmReleaseOverviewCard,
|
||||
NpmReleaseTableCard,
|
||||
} from './plugin';
|
||||
|
||||
export { npmTranslationRef, npmTranslations } from './translations';
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import { npmTranslationRef } from './ref';
|
|||
export { npmTranslationRef } from './ref';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const npmTranslations = createTranslationResource({
|
||||
ref: npmTranslationRef,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
import { createTranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const npmTranslationRef = createTranslationRef({
|
||||
id: 'plugin.npm.translation-ref',
|
||||
|
|
|
|||
Loading…
Reference in New Issue