fix translation import, added one more

Signed-off-by: Piotr Piątkiewicz <piatkiewicz.piotr@gmail.com>
This commit is contained in:
Piotr Piątkiewicz
2024-02-13 08:37:06 +01:00
parent 5bc5d5cf30
commit 8d3734b42a
6 changed files with 15 additions and 6 deletions
+10
View File
@@ -4,10 +4,20 @@
```ts
import { BackstagePlugin } from '@backstage/frontend-plugin-api';
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
// @alpha (undocumented)
const _default: BackstagePlugin<{}, {}>;
export default _default;
// @alpha (undocumented)
export const linguistTranslationRef: TranslationRef<
'linguist',
{
readonly 'component.title': 'Languages';
readonly 'component.noData': 'There is currently no language data for this entity.';
}
>;
// (No @packageDocumentation comment for this package)
```
+1 -2
View File
@@ -10,8 +10,7 @@
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
"./package.json": "./package.json",
"./src/translation": "./src/translation.ts"
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
+1
View File
@@ -16,3 +16,4 @@
export * from './alpha/index';
export { default } from './alpha/index';
export * from './translation';
@@ -76,9 +76,7 @@ export const LinguistCard = () => {
<InfoCard title={t('component.title')} className={classes.infoCard}>
<Grid container spacing={3}>
<Box p={2}>
<Typography>
There is currently no language data for this entity.
</Typography>
<Typography>{t('component.noData')}</Typography>
</Box>
</Grid>
</InfoCard>
+1
View File
@@ -21,6 +21,7 @@ export const linguistTranslationRef = createTranslationRef({
messages: {
component: {
title: 'Languages',
noData: 'There is currently no language data for this entity.',
},
},
});