fix: revert suffix translation keys
Signed-off-by: rui ma <ruima@alauda.io>
This commit is contained in:
@@ -38,10 +38,6 @@ export const coreComponentsTranslationRef: TranslationRef<
|
||||
readonly 'emptyState.missingAnnotation.title': 'Missing Annotation';
|
||||
readonly 'emptyState.missingAnnotation.actionTitle': 'Add the annotation to your component YAML as shown in the highlighted example below:';
|
||||
readonly 'emptyState.missingAnnotation.readMore': 'Read more';
|
||||
readonly 'emptyState.missingAnnotation.descriptionPrefix_one': 'The annotation ';
|
||||
readonly 'emptyState.missingAnnotation.descriptionPrefix_other': 'The annotations ';
|
||||
readonly 'emptyState.missingAnnotation.descriptionSuffix_one': ' is missing. You need to add the annotation to your component if you want to enable this tool.';
|
||||
readonly 'emptyState.missingAnnotation.descriptionSuffix_other': ' are missing. You need to add the annotations to your component if you want to enable this tool.';
|
||||
readonly 'supportConfig.default.title': 'Support Not Configured';
|
||||
readonly 'supportConfig.default.linkTitle': 'Add `app.support` config key';
|
||||
readonly 'errorBoundary.title': 'Please contact {{slackChannel}} for help.';
|
||||
@@ -54,10 +50,6 @@ export const coreComponentsTranslationRef: TranslationRef<
|
||||
readonly 'alertDisplay.message_one': '({{ count }} older message)';
|
||||
readonly 'alertDisplay.message_other': '({{ count }} older messages)';
|
||||
readonly 'autoLogout.stillTherePrompt.title': 'Logging out due to inactivity';
|
||||
readonly 'autoLogout.stillTherePrompt.description': 'You are about to be disconnected in';
|
||||
readonly 'autoLogout.stillTherePrompt.second_one': 'second';
|
||||
readonly 'autoLogout.stillTherePrompt.second_other': 'seconds';
|
||||
readonly 'autoLogout.stillTherePrompt.descriptionSuffix': 'Are you still there?';
|
||||
readonly 'autoLogout.stillTherePrompt.buttonText': "Yes! Don't log me out";
|
||||
readonly 'proxiedSignInPage.title': 'You do not appear to be signed in. Please try reloading the browser page.';
|
||||
}
|
||||
|
||||
@@ -64,18 +64,18 @@ export const StillTherePrompt = (props: StillTherePromptProps) => {
|
||||
remainingTime - promptTimeoutMillis / 1000,
|
||||
0,
|
||||
);
|
||||
const seconds = timeTillPrompt > 1 ? 'seconds' : 'second';
|
||||
|
||||
return (
|
||||
<Dialog open={open} data-testid="inactivity-prompt-dialog">
|
||||
<DialogTitle>{t('autoLogout.stillTherePrompt.title')}</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
{t('autoLogout.stillTherePrompt.description')}{' '}
|
||||
You are about to be disconnected in{' '}
|
||||
<b>
|
||||
{Math.ceil(remainingTime / 1000)}{' '}
|
||||
{t('autoLogout.stillTherePrompt.second', { count: timeTillPrompt })}
|
||||
{Math.ceil(remainingTime / 1000)} {seconds}
|
||||
</b>
|
||||
. {t('autoLogout.stillTherePrompt.descriptionSuffix')}
|
||||
. Are you still there?
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
|
||||
@@ -79,12 +79,10 @@ function generateComponentYaml(annotations: string[]) {
|
||||
}
|
||||
|
||||
function useGenerateDescription(annotations: string[]) {
|
||||
const { t } = useTranslationRef(coreComponentsTranslationRef);
|
||||
const isSingular = annotations.length <= 1;
|
||||
return (
|
||||
<>
|
||||
{t('emptyState.missingAnnotation.descriptionPrefix', {
|
||||
count: annotations.length,
|
||||
})}
|
||||
The {isSingular ? 'annotation' : 'annotations'}{' '}
|
||||
{annotations
|
||||
.map(ann => <code>{ann}</code>)
|
||||
.reduce((prev, curr) => (
|
||||
@@ -92,9 +90,9 @@ function useGenerateDescription(annotations: string[]) {
|
||||
{prev}, {curr}
|
||||
</>
|
||||
))}{' '}
|
||||
{t('emptyState.missingAnnotation.descriptionSuffix', {
|
||||
count: annotations.length,
|
||||
})}
|
||||
{isSingular ? 'is' : 'are'} missing. You need to add the{' '}
|
||||
{isSingular ? 'annotation' : 'annotations'} to your component if you want
|
||||
to enable this tool.
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -63,12 +63,6 @@ export const coreComponentsTranslationRef = createTranslationRef({
|
||||
actionTitle:
|
||||
'Add the annotation to your component YAML as shown in the highlighted example below:',
|
||||
readMore: 'Read more',
|
||||
descriptionPrefix_one: 'The annotation ',
|
||||
descriptionPrefix_other: 'The annotations ',
|
||||
descriptionSuffix_one:
|
||||
' is missing. You need to add the annotation to your component if you want to enable this tool.',
|
||||
descriptionSuffix_other:
|
||||
' are missing. You need to add the annotations to your component if you want to enable this tool.',
|
||||
},
|
||||
},
|
||||
supportConfig: {
|
||||
@@ -106,10 +100,6 @@ export const coreComponentsTranslationRef = createTranslationRef({
|
||||
autoLogout: {
|
||||
stillTherePrompt: {
|
||||
title: 'Logging out due to inactivity',
|
||||
description: 'You are about to be disconnected in',
|
||||
second_one: 'second',
|
||||
second_other: 'seconds',
|
||||
descriptionSuffix: 'Are you still there?',
|
||||
buttonText: "Yes! Don't log me out",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user